CN113613313A - Communication method, device and medium for Bluetooth equipment pairing - Google Patents

Communication method, device and medium for Bluetooth equipment pairing Download PDF

Info

Publication number
CN113613313A
CN113613313A CN202110955079.3A CN202110955079A CN113613313A CN 113613313 A CN113613313 A CN 113613313A CN 202110955079 A CN202110955079 A CN 202110955079A CN 113613313 A CN113613313 A CN 113613313A
Authority
CN
China
Prior art keywords
client
information
shared
bluetooth
pairing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110955079.3A
Other languages
Chinese (zh)
Other versions
CN113613313B (en
Inventor
林盼盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202110955079.3A priority Critical patent/CN113613313B/en
Publication of CN113613313A publication Critical patent/CN113613313A/en
Application granted granted Critical
Publication of CN113613313B publication Critical patent/CN113613313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种蓝牙设备配对的通信方法、装置以及介质,通过从已连接客户端处获取想要分享的待分享客户端的ID信息,根据ID信息将与已连接客户端配对的蓝牙设备信息发送至待分享客户端,蓝牙设备信息至少包括用于待分享客户端和蓝牙设备通信的密钥,待分享客户端即可根据蓝牙设备信息与蓝牙设备配对。由此可见,采用本技术方案可以使一个蓝牙设备配对多个客户端,实现了已配对的客户端将蓝牙设备分享给新的未配对的客户端的功能。

Figure 202110955079

The present application discloses a communication method, device and medium for pairing a Bluetooth device. By obtaining the ID information of the client to be shared to be shared from the connected client, the information of the Bluetooth device paired with the connected client is obtained according to the ID information. Sent to the client to be shared, the Bluetooth device information at least includes a key used for communication between the client to be shared and the Bluetooth device, and the client to be shared can be paired with the Bluetooth device according to the Bluetooth device information. It can be seen that, by adopting the technical solution, one Bluetooth device can be paired with multiple clients, and the function of sharing the Bluetooth device with the new unpaired client is realized by the paired client.

Figure 202110955079

Description

Communication method, device and medium for Bluetooth equipment pairing
Technical Field
The present application relates to the field of bluetooth communication technologies, and in particular, to a communication method, apparatus, and medium for pairing bluetooth devices.
Background
With the widespread use of bluetooth technology, pairing of bluetooth devices with clients is also one of the problems studied by those skilled in the art.
In recent years, the pairing between the bluetooth device and the client is performed by opening the client in advance, for example, a mobile phone application, or placing the mobile phone in the background, then scanning at intervals, when the bluetooth device is scanned, calculating a distance according to the Strength of a Received Signal Strength Indication (RSSI), and when the distance is smaller than a certain value, that is, pairing is performed, and when the distance is larger than the certain value, the pairing is not performed, which may cause the following problems: firstly, the mobile phone application is required to be in a running state, otherwise, the mobile phone application is easily killed by a system in a background, and scanning cannot be performed; secondly, after the pairing is completed for the first time, the subsequent connection process is in the application level, and frequent scanning of the application level may cause the power consumption of the mobile phone to increase. In order to solve the above problems, Human Interface Device Profile (HID) devices are introduced, and common HID devices include a mouse, a keyboard, a joystick, and the like, and are generally connected to a machine Device through a USB connection in a wired manner to serve as a user input Device. In bluetooth technology, access to HID-based bluetooth devices is wireless. The HID-based Bluetooth equipment has the characteristics that pairing is required when Bluetooth is connected for the first time, after the pairing is successful for the first time, the mobile phone can record the information of the current equipment to a local white list, and data can be directly read for pairing after the pairing is performed again. By combining the technology, the characteristic of the HID equipment is used only when pairing is needed for the first time, after pairing is successfully carried out through the pairing code, the mobile phone is used as host recording equipment and relevant information of pairing, and when the mobile phone is close to the host recording equipment next time, Bluetooth can be automatically connected, and the method is similar to vehicle-mounted Bluetooth, a Bluetooth mouse and the like.
In the existing HID-based bluetooth device, the pairing with the client is unique, that is, one device is paired with one client, however, in a specific implementation, one device often needs to be paired with a plurality of clients for various occasions. Therefore, how to enable one bluetooth device to pair a plurality of clients to realize that the paired client shares the bluetooth device with a new unpaired client is a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The purpose of the present application is to provide a communication method, apparatus and medium for pairing bluetooth devices, so that one bluetooth device can pair multiple clients, and a paired client can share a bluetooth device with a new unpaired client.
In order to solve the above technical problem, the present application provides a communication method for pairing bluetooth devices, including:
acquiring ID information of a client to be shared, which is sent by a connected client;
responding to a request sent by the client to be shared, wherein the request comprises the ID information;
and sending Bluetooth equipment information to the client to be shared according to the ID information so that the client to be shared can be paired with Bluetooth equipment according to the Bluetooth equipment information, wherein the Bluetooth equipment information at least comprises a secret key for communication between the client to be shared and the Bluetooth equipment.
Preferably, after the obtaining of the ID information of the to-be-shared client sent by the connected client, the method further includes:
judging whether the number of the ID information in the sharing list is larger than a threshold value, if so, deleting the ID information of the client to be shared; and if not, sending the ID information of the client to be shared to the sharing list.
Preferably, after the sending the ID information of the client to be shared to the sharing list, the method further includes:
and sending the sharing list to the client to be shared.
Preferably, after the determining whether the number of the ID information in the sharing list is greater than a threshold, the method further includes:
and sending a judgment result for representing sharing success/failure to the connected client.
Preferably, the bluetooth device information further includes:
and matching codes.
In order to solve the above technical problem, the present application further provides a communication method for pairing bluetooth devices, which is applied to a client to be shared, and the method includes:
sending a request to a cloud server, wherein the request comprises ID information of a client to be shared, which is obtained by the cloud server and sent by a connected client;
acquiring Bluetooth equipment information sent by the cloud server according to the ID information, wherein the Bluetooth equipment information at least comprises a secret key used for communication between the client to be shared and the Bluetooth equipment;
and pairing the Bluetooth equipment according to the Bluetooth equipment information.
In order to solve the above technical problem, the present application further provides a communication method for pairing bluetooth devices, which is applied to a connected client, and the method includes:
sending the ID information of the client to be shared to a cloud server; so that the cloud server responds to a request sent by the client to be shared, wherein the request comprises the ID information; so that the cloud server sends bluetooth device information to the to-be-shared client according to the ID information, so that the to-be-shared client pairs with bluetooth devices according to the bluetooth device information, and the bluetooth device information at least includes a secret key for communication between the to-be-shared client and the bluetooth devices.
In order to solve the above technical problem, the present application further provides a communication apparatus for bluetooth device pairing, the apparatus including:
the acquisition module is used for acquiring the ID information of the client to be shared, which is sent by the connected client;
the response module is used for responding to a request sent by the client to be shared, wherein the request comprises the ID information;
and the sending module is used for sending Bluetooth equipment information to the client to be shared according to the ID information so as to be convenient for the client to be shared to be paired with Bluetooth equipment according to the Bluetooth equipment information, and the Bluetooth equipment information at least comprises a secret key for communication between the client to be shared and the Bluetooth equipment.
In order to solve the above technical problem, the present application further provides a communication apparatus for bluetooth device pairing, the apparatus including:
a memory for storing a computer program;
a processor for implementing the steps of the communication method for pairing bluetooth devices as described above when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the communication method for pairing bluetooth devices as described above.
According to the Bluetooth device pairing communication method, the Bluetooth device pairing communication device and the Bluetooth device pairing communication medium, the ID information of the client to be shared, which is required to be shared, is acquired from the connected client, the Bluetooth device information paired with the connected client is sent to the client to be shared according to the ID information, the Bluetooth device information at least comprises a secret key used for communication between the client to be shared and the Bluetooth device, and the client to be shared can be paired with the Bluetooth device according to the Bluetooth device information. Therefore, by adopting the technical scheme, one Bluetooth device can be paired with a plurality of clients, and the function that the paired clients share the Bluetooth device with the new unpaired client is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a communication method for pairing bluetooth devices according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a communication method for pairing bluetooth devices according to another embodiment of the present application;
fig. 3 is a flowchart of a communication method for pairing bluetooth devices according to another embodiment of the present application;
fig. 4 is a structural diagram of a communication apparatus paired with bluetooth devices according to an embodiment of the present disclosure;
fig. 5 is a structural diagram of a communication apparatus paired with bluetooth devices according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a communication method, a device and a medium for pairing Bluetooth equipment.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a communication method for pairing bluetooth devices according to an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
s10: and acquiring the ID information of the client to be shared, which is sent by the connected client.
In step S10, the connected client may be a mobile phone, a tablet, a computer, or the like, and the to-be-shared client may also be a mobile phone, a tablet, a computer, or the like. It is understood that the clients may be of the same category or different categories, for example, the connected client is a mobile phone, and the client to be shared is a mobile phone, a computer, or the like. Further, when the client to be shared is a mobile phone, the ID information may be a mobile phone number, and when the client to be shared is a computer, the ID information may be an equipment number.
S11: and responding to a request sent by the client to be shared, wherein the request comprises ID information.
In step S11, the to-be-shared client sends a request to the cloud server for requesting bluetooth device information, where the request includes ID information of the to-be-shared client. The process of issuing the request may be continuous or intermittent, and may be issuing the request periodically or issuing the request after receiving the trigger signal, which is not limited herein.
S12: and sending the Bluetooth equipment information to the client to be shared according to the ID information so that the client to be shared is paired with the Bluetooth equipment according to the Bluetooth equipment information, wherein the Bluetooth equipment information at least comprises a secret key for communication between the client to be shared and the Bluetooth equipment.
In step S12, the bluetooth device information is uploaded to the cloud server when the connected client pairs with the bluetooth device, and after the cloud server receives the request, the bluetooth device information is sent to the client to be shared according to the ID information in the obtained request, and the client to be shared can pair with the bluetooth device according to the bluetooth device information. The bluetooth device information at least includes a key required for communication between the bluetooth device and the client to be shared, and of course, may also include information such as a model number, a version number, a pairing code, and the like of the bluetooth device. As a preferred option, the type of the Bluetooth device is Bluetooth Low Energy (BLE) Bluetooth device, and the BLE Bluetooth device has the advantage of Low power consumption, can be used for a long time, and improves user experience.
Fig. 2 is a flowchart of a communication method for pairing bluetooth devices according to another embodiment of the present disclosure, in which a connected client and a to-be-shared client are both mobile phones, a mobile phone a is a connected client, a mobile phone B is a to-be-shared client, and ID information of the connected client and the to-be-shared client is a mobile phone number. As shown in fig. 2, a mobile phone a sends a mobile phone number of a mobile phone B to a cloud server, the mobile phone B sends a request to the cloud server, the request includes the mobile phone number, the cloud server receives the mobile phone number sent by the mobile phone a, responds to the request of the mobile phone B, calls bluetooth device information of a bluetooth device paired with the mobile phone a, and sends the bluetooth device information to the mobile phone B according to the mobile phone number, the bluetooth device information at least includes a secret key, and the mobile phone B starts communication with the bluetooth device through the secret key, so that pairing is achieved. The pairing process is based on pairing of a client and HID-based Bluetooth equipment in the prior art, when a mobile phone B is paired with the Bluetooth equipment for the first time, the Bluetooth equipment can send broadcast to the periphery at regular time, when the mobile phone B captures the broadcast, the broadcast is analyzed, and communication is established with the Bluetooth equipment according to a secret key. If the Bluetooth equipment needs to check the identity, the corresponding pairing code needs to be input by the mobile phone B, the Bluetooth equipment is checked, and after the check is successful, equipment information such as the model, the mac address and the uuid information of the Bluetooth equipment is sent to the mobile phone B. The required pairing code may be that which handset a tells handset B, or may be contained in the bluetooth device information. Of course, this step can be omitted if the bluetooth device does not need to verify identity. After the mobile phone B acquires the device information, registering the related information of the mobile phone B and the Bluetooth device information in a cloud server for binding, and after receiving the information indicating that the binding is successful, storing the Bluetooth device information in a white list of the mobile phone B for subsequent pairing.
Meanwhile, the mobile phone B can also set the connection distance with the Bluetooth equipment, and when the connection distance exceeds the set distance, the mobile phone B is disconnected with the Bluetooth equipment. Under the condition, the Bluetooth equipment still sends a broadcast packet to the surrounding, after the mobile phone B enters the set connection distance, the broadcast is captured and analyzed, whether the Bluetooth equipment information exists in a white list is judged according to the analyzed mac address, and if the Bluetooth equipment information exists, the Bluetooth equipment is reconnected with the Bluetooth equipment according to the Bluetooth equipment information.
According to the communication method for pairing the Bluetooth devices, the ID information of the client to be shared, which is required to be shared, is acquired from the connected client, the Bluetooth device information paired with the connected client is sent to the client to be shared according to the ID information, the Bluetooth device information at least comprises a secret key used for communication between the client to be shared and the Bluetooth devices, and the client to be shared can be paired with the Bluetooth devices according to the Bluetooth device information. Therefore, by adopting the technical scheme, one Bluetooth device can be paired with a plurality of clients, and the function that the paired clients share the Bluetooth device with the new unpaired client is realized.
Due to the hardware of the bluetooth device, the information of the clients that can be stored in the bluetooth device is limited, that is, only a certain number of clients can be paired, in a specific implementation, if one bluetooth device is paired with too many clients, the pressure on the device may be increased, and if the number of the paired clients is small, the actual use may be affected.
Fig. 3 is a flowchart of a communication method for pairing bluetooth devices according to another embodiment of the present application, and as shown in fig. 3, on the basis of the foregoing embodiment, in this embodiment, after acquiring ID information of a to-be-shared client sent by a connected client, the method further includes:
s101: judging whether the number of the ID information in the sharing list is larger than a threshold value, if so, entering a step S102; if not, the process proceeds to step S103.
S102: and deleting the ID information of the client to be shared.
S103: and sending the ID information of the client to be shared to the sharing list.
The sharing list is used for storing the number of the clients paired with the Bluetooth equipment, and the ID information represents the clients. The selection of the threshold may be determined according to the storage amount of the hardware of the bluetooth device, in this embodiment, the selection threshold is 2, and it can be understood that, when 2 pieces of ID information are already stored in the sharing list, when the ID information of the client to be shared is obtained, and it is determined that the number of ID information in the sharing list is not greater than the threshold, the ID information of the client to be shared is sent to the sharing list, where the sharing list stores 3 pieces of ID information, that is, the bluetooth device may pair 3 clients; and if the ID information of the new client to be shared is obtained again, and the number of the ID information in the sharing list is larger than the threshold value, deleting the ID information of the new client to be shared.
The communication method for pairing the Bluetooth equipment provided by the embodiment of the application limits the number of clients which can be paired by the Bluetooth equipment, reasonably utilizes hardware storage of the Bluetooth equipment, and effectively prolongs the service life.
In a specific implementation, the to-be-shared client does not know that the bluetooth device is paired with a plurality of clients, and whether the user can share the to-be-shared client is determined.
As shown in fig. 3, in this embodiment, after sending the ID information of the client to be shared to the sharing list, the method further includes:
s104: and sending the sharing list to the client to be shared.
It can be understood that, the sharing list is sent to the clients to be shared, the user can check the number of the paired clients of the bluetooth device, and meanwhile, the specific paired clients can be accurately known according to the ID information in the sharing list. Certainly, the cloud server may also limit the sharing list, for example, hide ID information therein, only display the number of paired clients, and may well protect personal information of the paired clients.
According to the communication method for pairing the Bluetooth devices, the sharing list is sent to the client to be shared, so that the client to be shared can know how many clients the Bluetooth devices are paired, the client to be shared can conveniently determine whether the Bluetooth devices can be shared to other clients, and user experience is improved.
In implementations, the connected clients cannot know whether the sharing was successful.
In this embodiment, after determining whether the number of ID information in the sharing list is greater than the threshold, the method further includes:
and sending a judgment result for representing sharing success/failure to the connected client.
It can be understood that, when the determination is yes, the sharing is considered to be failed, and when the determination is no, the sharing is considered to be successful. The transmission mode may be in a text form or an audio form, and is not limited herein.
According to the communication method for pairing the Bluetooth devices, the judgment result used for representing the sharing success/failure is sent to the connected client, so that the connected client can know whether the sharing is successful, and the user experience is improved.
In specific implementation, each bluetooth device has its own pairing code for performing authentication when connected with a client, and during production, a merchant generally informs a user of the pairing code in a text form, however, when sharing, the client to be shared does not know the pairing code, and needs to be contacted with the connected client.
In this embodiment, the bluetooth device information further includes:
and matching codes.
According to the communication method for pairing the Bluetooth devices, the Bluetooth device information sent by the cloud server comprises the pairing code, the client to be shared can be directly obtained from the cloud server, and the connected client does not need to be contacted.
In the foregoing embodiment, the communication method for pairing the bluetooth devices is described in detail from the perspective of the cloud server side, and the present application also provides an embodiment corresponding to the communication method for pairing the bluetooth devices from the perspective of the to-be-shared client side.
The method comprises the following steps:
sending a request to a cloud server, wherein the request comprises ID information of a client to be shared, which is obtained by the cloud server and sent by a connected client;
acquiring Bluetooth equipment information sent by the cloud server according to the ID information, wherein the Bluetooth equipment information at least comprises a secret key used for communication between the client to be shared and the Bluetooth equipment;
and pairing with the Bluetooth equipment according to the Bluetooth equipment information.
According to the communication method for pairing the Bluetooth devices, the ID information of the client to be shared, which is required to be shared, is acquired from the connected client, the Bluetooth device information paired with the connected client is sent to the client to be shared according to the ID information, the Bluetooth device information at least comprises a secret key used for communication between the client to be shared and the Bluetooth devices, and the client to be shared can be paired with the Bluetooth devices according to the Bluetooth device information. Therefore, by adopting the technical scheme, one Bluetooth device can be paired with a plurality of clients, and the function that the paired clients share the Bluetooth device with the new unpaired client is realized.
In specific implementation, after the to-be-shared client is paired with the bluetooth device, when the to-be-shared client is offline, the bluetooth device is still in a state of being paired with the to-be-shared client, and new pairing cannot be performed, which affects use experience.
In this embodiment, after the to-be-shared client is paired with the bluetooth device, when the to-be-shared client is offline and the bluetooth device is still in a pairing state, the to-be-shared client acquires a message sent by the bluetooth device and sends a connection request; after the connection line is established, the client to be shared initiates a pairing clearing instruction for enabling the Bluetooth equipment to clear pairing; and the client to be shared acquires a clearing pairing result representing the clearing success/failure.
According to the communication method for pairing the Bluetooth devices, when the client to be shared is offline and the Bluetooth devices are still in the pairing state, the pairing of the Bluetooth devices is eliminated, so that the Bluetooth devices can be newly paired, the use efficiency of the Bluetooth devices is improved, and the user experience is improved.
The application also provides a corresponding embodiment of the communication method of the Bluetooth device pairing from the perspective of the connected client side.
The method comprises the following steps:
sending the ID information of the client to be shared to a cloud server; the cloud server responds to a request sent by the client to be shared, wherein the request comprises ID information; the method and the device for sharing the Bluetooth device are convenient for the cloud server to send the Bluetooth device information to the client to be shared according to the ID information, the client to be shared is convenient to pair with the Bluetooth device according to the Bluetooth device information, and the Bluetooth device information at least comprises a secret key used for communication between the client to be shared and the Bluetooth device.
According to the communication method for pairing the Bluetooth devices, the ID information of the client to be shared, which is required to be shared, is acquired from the connected client, the Bluetooth device information paired with the connected client is sent to the client to be shared according to the ID information, the Bluetooth device information at least comprises a secret key used for communication between the client to be shared and the Bluetooth devices, and the client to be shared can be paired with the Bluetooth devices according to the Bluetooth device information. Therefore, by adopting the technical scheme, one Bluetooth device can be paired with a plurality of clients, and the function that the paired clients share the Bluetooth device with the new unpaired client is realized.
In a specific implementation, after the connected client is paired with the bluetooth device, when the connected client is offline, the bluetooth device is still in a state of being paired with the connected client.
In the above embodiments, the detailed description is made on the communication method of bluetooth device pairing, and the present application also provides embodiments corresponding to the communication apparatus of bluetooth device pairing. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 4 is a structural diagram of a communication apparatus paired with bluetooth devices according to an embodiment of the present application, and as shown in fig. 4, the apparatus includes:
the acquiring module 10 is configured to acquire ID information of a client to be shared, which is sent by a connected client;
a response module 11, configured to respond to a request sent by the client to be shared, where the request includes the ID information;
a sending module 12, configured to send bluetooth device information to the to-be-shared client according to the ID information, so that the to-be-shared client pairs with a bluetooth device according to the bluetooth device information, where the bluetooth device information at least includes a secret key used for communication between the to-be-shared client and the bluetooth device.
According to the communication device for pairing the Bluetooth devices, the ID information of the client to be shared, which is required to be shared, is acquired from the connected client, the Bluetooth device information paired with the connected client is sent to the client to be shared according to the ID information, the Bluetooth device information at least comprises a secret key used for communication between the client to be shared and the Bluetooth devices, and the client to be shared can be paired with the Bluetooth devices according to the Bluetooth device information. Therefore, by adopting the technical scheme, one Bluetooth device can be paired with a plurality of clients, and the function that the paired clients share the Bluetooth device with the new unpaired client is realized.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Fig. 5 is a structural diagram of a communication apparatus for bluetooth device pairing according to another embodiment of the present application, and as shown in fig. 5, the communication apparatus for bluetooth device pairing includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the communication method for pairing bluetooth devices as described in the above embodiments when executing the computer program.
The communication device paired by the bluetooth device provided by this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the communication method for pairing the bluetooth devices disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, ID information, bluetooth device information, and the like.
In some embodiments, the communication device of the bluetooth device pair may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 5 does not constitute a limitation of the communication means of the bluetooth device pairing and may include more or fewer components than those shown.
The communication device paired with the bluetooth equipment provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized: one bluetooth device is paired with multiple clients, and the paired clients share the bluetooth device with new unpaired clients.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium stores a computer program, and the computer program, when executed by the processor, implements the steps described in the above method embodiments (which may be a method corresponding to a cloud server side, a method corresponding to a connected client side, or a method corresponding to a client side to be shared).
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The detailed description is given above to a communication method, apparatus and medium for pairing bluetooth devices provided by the present application. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A communication method for pairing Bluetooth devices, comprising:
acquiring ID information of a client to be shared, which is sent by a connected client;
responding to a request sent by the client to be shared, wherein the request comprises the ID information;
and sending Bluetooth equipment information to the client to be shared according to the ID information so that the client to be shared can be paired with Bluetooth equipment according to the Bluetooth equipment information, wherein the Bluetooth equipment information at least comprises a secret key for communication between the client to be shared and the Bluetooth equipment.
2. The paired communication method for bluetooth devices according to claim 1, further comprising, after acquiring ID information of the to-be-shared client sent by the connected client, the following steps:
judging whether the number of the ID information in the sharing list is larger than a threshold value, if so, deleting the ID information of the client to be shared; and if not, sending the ID information of the client to be shared to the sharing list.
3. The paired communication method of bluetooth devices according to claim 2, further comprising, after the sending the ID information of the client to be shared to the sharing list:
and sending the sharing list to the client to be shared.
4. The paired communication method of claim 2, wherein after determining whether the number of ID information in the sharing list is greater than a threshold, the method further comprises:
and sending a judgment result for representing sharing success/failure to the connected client.
5. The paired communication method according to claim 1, wherein the bluetooth device information further includes:
and matching codes.
6. A communication method for pairing Bluetooth equipment is applied to a client to be shared, and comprises the following steps:
sending a request to a cloud server, wherein the request comprises ID information of a client to be shared, which is obtained by the cloud server and sent by a connected client;
acquiring Bluetooth equipment information sent by the cloud server according to the ID information, wherein the Bluetooth equipment information at least comprises a secret key used for communication between the client to be shared and the Bluetooth equipment;
and pairing the Bluetooth equipment according to the Bluetooth equipment information.
7. A communication method for pairing Bluetooth equipment is applied to a connected client and comprises the following steps:
sending the ID information of the client to be shared to a cloud server; so that the cloud server responds to a request sent by the client to be shared, wherein the request comprises the ID information; so that the cloud server sends bluetooth device information to the to-be-shared client according to the ID information, so that the to-be-shared client pairs with bluetooth devices according to the bluetooth device information, and the bluetooth device information at least includes a secret key for communication between the to-be-shared client and the bluetooth devices.
8. A communication apparatus for pairing bluetooth devices, comprising:
the acquisition module is used for acquiring the ID information of the client to be shared, which is sent by the connected client;
the response module is used for responding to a request sent by the client to be shared, wherein the request comprises the ID information;
and the sending module is used for sending Bluetooth equipment information to the client to be shared according to the ID information so as to be convenient for the client to be shared to be paired with Bluetooth equipment according to the Bluetooth equipment information, and the Bluetooth equipment information at least comprises a secret key for communication between the client to be shared and the Bluetooth equipment.
9. A communication apparatus for pairing bluetooth devices, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the communication method of bluetooth device pairing of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the communication method of bluetooth device pairing according to any one of claims 1 to 7.
CN202110955079.3A 2021-08-19 2021-08-19 A communication method, device and medium for pairing bluetooth devices Active CN113613313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110955079.3A CN113613313B (en) 2021-08-19 2021-08-19 A communication method, device and medium for pairing bluetooth devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110955079.3A CN113613313B (en) 2021-08-19 2021-08-19 A communication method, device and medium for pairing bluetooth devices

Publications (2)

Publication Number Publication Date
CN113613313A true CN113613313A (en) 2021-11-05
CN113613313B CN113613313B (en) 2024-11-19

Family

ID=78341319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110955079.3A Active CN113613313B (en) 2021-08-19 2021-08-19 A communication method, device and medium for pairing bluetooth devices

Country Status (1)

Country Link
CN (1) CN113613313B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109610A1 (en) * 2021-12-14 2023-06-22 华为技术有限公司 Bluetooth connection establishment method, device and system
WO2024222529A1 (en) * 2023-04-23 2024-10-31 小米汽车科技有限公司 Vehicle control method and apparatus, and mobile terminal, vehicle and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104414A (en) * 2014-06-18 2014-10-15 深圳市警豹电子科技有限公司 Communication method for multiple bluetooth devices and forwarding method for bluetooth device matching information
CN106534280A (en) * 2016-10-25 2017-03-22 广东欧珀移动通信有限公司 Data sharing method and device
CN107197429A (en) * 2017-07-28 2017-09-22 苏州跬步信息技术有限公司 The method of remote analog bluetooth equipment service based on Cloud Server
CN107567009A (en) * 2017-09-28 2018-01-09 北京地平线机器人技术研发有限公司 Bluetooth equipment shares request and control method and electronic equipment
CN107708099A (en) * 2017-11-03 2018-02-16 北京地平线机器人技术研发有限公司 Bluetooth equipment shares request and control method and electronic equipment
US9949065B1 (en) * 2016-12-30 2018-04-17 Capital One Services, Llc System and method for automatic bluetooth pairing
CN108738003A (en) * 2018-05-07 2018-11-02 杨晓花 Bluetooth matching method and system based on shared bluetooth communication address
CN109151787A (en) * 2018-09-05 2019-01-04 北京字节跳动网络技术有限公司 Bluetooth communication method and device based on cloud scheduling
CN110139162A (en) * 2019-05-05 2019-08-16 腾讯科技(深圳)有限公司 The sharing method and device of media content, storage medium, electronic device
CN110611905A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Information sharing method, terminal device, storage medium, and computer program product

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104414A (en) * 2014-06-18 2014-10-15 深圳市警豹电子科技有限公司 Communication method for multiple bluetooth devices and forwarding method for bluetooth device matching information
CN106534280A (en) * 2016-10-25 2017-03-22 广东欧珀移动通信有限公司 Data sharing method and device
WO2018076873A1 (en) * 2016-10-25 2018-05-03 广东欧珀移动通信有限公司 Data sharing method, apparatus, medium, electronic device and system
US9949065B1 (en) * 2016-12-30 2018-04-17 Capital One Services, Llc System and method for automatic bluetooth pairing
CN107197429A (en) * 2017-07-28 2017-09-22 苏州跬步信息技术有限公司 The method of remote analog bluetooth equipment service based on Cloud Server
CN107567009A (en) * 2017-09-28 2018-01-09 北京地平线机器人技术研发有限公司 Bluetooth equipment shares request and control method and electronic equipment
CN107708099A (en) * 2017-11-03 2018-02-16 北京地平线机器人技术研发有限公司 Bluetooth equipment shares request and control method and electronic equipment
CN108738003A (en) * 2018-05-07 2018-11-02 杨晓花 Bluetooth matching method and system based on shared bluetooth communication address
CN109151787A (en) * 2018-09-05 2019-01-04 北京字节跳动网络技术有限公司 Bluetooth communication method and device based on cloud scheduling
CN110139162A (en) * 2019-05-05 2019-08-16 腾讯科技(深圳)有限公司 The sharing method and device of media content, storage medium, electronic device
CN110611905A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Information sharing method, terminal device, storage medium, and computer program product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109610A1 (en) * 2021-12-14 2023-06-22 华为技术有限公司 Bluetooth connection establishment method, device and system
WO2024222529A1 (en) * 2023-04-23 2024-10-31 小米汽车科技有限公司 Vehicle control method and apparatus, and mobile terminal, vehicle and storage medium

Also Published As

Publication number Publication date
CN113613313B (en) 2024-11-19

Similar Documents

Publication Publication Date Title
CN108449321B (en) Login method, server and client
CN104767713B (en) Account binding method, server and system
CN110691085B (en) Login method, login device, password management system and computer readable medium
CN104184701A (en) Third-party application log-in method, device and terminal
WO2018103405A1 (en) Method for identifying access point and hotspot, and related product
CN110167192B (en) Bluetooth connection management method and device, electronic equipment and non-transient storage medium
CN108650671B (en) Method, device, mobile terminal, storage medium and system for establishing Bluetooth connection
CN113613313A (en) Communication method, device and medium for Bluetooth equipment pairing
CN109886670B (en) Payment method, device, system, mobile terminal, payment machine and server
CN113468515A (en) User identity authentication method and device, electronic equipment and storage medium
CN112464198A (en) Identity recognition preprocessing and identity recognition method and system
WO2020156152A1 (en) Payment information binding method, apparatus, mobile terminal and system
CN104980420A (en) Business processing method, device, terminal and server
CN109617952B (en) Block chain-based user relationship establishing method and device
CN104092653A (en) Data processing method and system
CN106332000B (en) Terminal position information acquisition method and device
CN105306202A (en) Identity verification method and device, server
WO2018103404A1 (en) Wireless fidelity (wi-fi) scanning method and related product
CN111767558A (en) Data access monitoring method, device and system
US10200864B2 (en) Method and device for managing wireless access point
CN104778389A (en) Numerical value transferring method, terminal, server and system
CN108197958B (en) Method and device for counting off-line cattle and storage medium
CN105577621B (en) Business operation verification method, device and system
US10725809B2 (en) Application interaction method and apparatus, and terminal
WO2016015401A1 (en) Initialization method and apparatus, mobile terminal and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant