CN111885571A - Bluetooth device pairing method, device and storage medium - Google Patents

Bluetooth device pairing method, device and storage medium Download PDF

Info

Publication number
CN111885571A
CN111885571A CN202010707013.8A CN202010707013A CN111885571A CN 111885571 A CN111885571 A CN 111885571A CN 202010707013 A CN202010707013 A CN 202010707013A CN 111885571 A CN111885571 A CN 111885571A
Authority
CN
China
Prior art keywords
bluetooth
target
information
pairing
target bluetooth
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.)
Pending
Application number
CN202010707013.8A
Other languages
Chinese (zh)
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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202010707013.8A priority Critical patent/CN111885571A/en
Publication of CN111885571A publication Critical patent/CN111885571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a pairing method, equipment and a storage medium of Bluetooth equipment, namely, the pairing method, the equipment and the storage medium receive target Bluetooth information sent by target Bluetooth equipment through wired connection of carrier communication with the target Bluetooth equipment; searching Bluetooth equipment to be paired in a preset range, and acquiring a Bluetooth equipment information set of the Bluetooth equipment to be paired; judging whether the target Bluetooth information exists in the Bluetooth device information set or not; and if so, carrying out Bluetooth pairing with the target Bluetooth equipment based on the target Bluetooth information. The invention sends the target Bluetooth information of the target Bluetooth equipment of the Bluetooth equipment to be subjected to Bluetooth pairing to the Bluetooth equipment to be subjected to Bluetooth pairing through carrier communication wired connection, automatically triggers the pairing process between the Bluetooth equipment, does not need a user to manually perform Bluetooth search, reduces user operation and improves Bluetooth pairing efficiency.

Description

Bluetooth device pairing method, device and storage medium
Technical Field
The present invention relates to the field of bluetooth communication technologies, and in particular, to a pairing method and device for bluetooth devices, and a computer-readable storage medium.
Background
With the development of technology and the improvement of living standard of people, electronic devices (i.e. bluetooth devices) with bluetooth function are becoming more and more popular. Currently, pairing among bluetooth devices requires a user to open a bluetooth configuration interface of the bluetooth device, scan the paired bluetooth devices, and manually select a corresponding bluetooth device from a plurality of bluetooth device connection lists for pairing. Not only the bluetooth pairs inefficiency, and the bluetooth pairs complex operation degree higher moreover.
Disclosure of Invention
The invention mainly aims to provide a pairing method and equipment of Bluetooth equipment and a computer readable storage medium, and aims to solve the technical problems that the existing Bluetooth pairing efficiency is low and the Bluetooth pairing operation complexity is high.
In order to achieve the above object, the present invention provides a pairing method for bluetooth devices, including the following steps:
when a carrier communication connection instruction is detected, receiving target Bluetooth information sent by target Bluetooth equipment through carrier communication wired connection between the target Bluetooth equipment and the target Bluetooth equipment;
searching Bluetooth equipment to be paired in a preset range, and acquiring a Bluetooth equipment information set of the Bluetooth equipment to be paired;
matching the target Bluetooth information with the Bluetooth equipment information set, and judging whether the target Bluetooth information exists in the Bluetooth equipment information set or not;
and if the target Bluetooth information exists in the Bluetooth device information set, carrying out Bluetooth pairing with the target Bluetooth device based on the target Bluetooth information.
Optionally, before the step of receiving, by wired connection in carrier communication with a target bluetooth device when a carrier communication connection instruction is detected, target bluetooth information sent by the target bluetooth device, the method further includes:
acquiring the device distance between the target Bluetooth devices, and judging whether the device distance meets a preset detection condition;
if the equipment interval meets the detection condition, sending a carrier connection detection instruction to the target Bluetooth equipment;
and when a connectable instruction fed back by the target Bluetooth device based on the carrier connection detection instruction is received, generating the carrier communication connection instruction.
Optionally, the step of obtaining the device distance between the target bluetooth devices and determining whether the device distance meets a preset detection condition specifically includes:
and acquiring the distance between the target Bluetooth devices based on an infrared proximity sensor, and judging whether the target Bluetooth devices are contacted or not based on the distance between the target Bluetooth devices and the infrared proximity sensor.
Optionally, if the device distance meets the detection condition, the step of sending a carrier connection detection instruction to the target bluetooth device specifically includes:
and if the Bluetooth device is in contact with the target Bluetooth device, sending a connection state detection data packet to the target Bluetooth device based on a carrier communication module to serve as the carrier connection detection instruction.
Optionally, the step of generating the carrier communication connection instruction when receiving a connectable instruction fed back by the target bluetooth device based on the carrier connection detection instruction specifically includes:
when a check data packet sent by a carrier communication module of the target Bluetooth device is received, judging whether effective contact is carried out with the target Bluetooth device or not based on the check data packet and the connection state detection data packet;
and if the Bluetooth device is effectively contacted with the target Bluetooth device, taking the verification data packet as the connectable instruction and generating the carrier communication connection instruction.
Optionally, after the step of determining whether to make effective contact with the target bluetooth device based on the check data packet and the connection status detection data packet when receiving the check data packet sent by the carrier communication module of the target bluetooth device, the method further includes:
and if the Bluetooth device is not in effective contact with the target Bluetooth device, adjusting a reminding message through a terminal output device in communication connection with the target Bluetooth headset so as to remind a user to adjust the relative position between the Bluetooth devices to be paired.
Optionally, the step of matching the target bluetooth information with the bluetooth device information set and determining whether the target bluetooth information exists in the bluetooth device information set specifically includes:
generating a Bluetooth information list to be paired based on the Bluetooth connection address and the Bluetooth name of each piece of Bluetooth equipment information in the Bluetooth equipment information set;
and matching the Bluetooth connection address and the Bluetooth name in the target Bluetooth information with the to-be-paired Bluetooth information list, and judging whether the target Bluetooth information exists in the to-be-paired Bluetooth information list.
Optionally, after the step of matching the bluetooth connection address and the bluetooth name in the target bluetooth information with the to-be-paired bluetooth information list and determining whether the target bluetooth information exists in the to-be-paired bluetooth information list, the method further includes:
and if the target Bluetooth information does not exist in the to-be-paired Bluetooth information list, generating and outputting a reminding message of failed matching of the Bluetooth equipment information, so that a user can adjust the relative position of the to-be-paired Bluetooth equipment.
In addition, to achieve the above object, the present invention further provides a bluetooth device, which includes a processor, a memory, and a pairing program of the bluetooth device stored on the memory and executable by the processor, wherein the pairing program of the bluetooth device, when executed by the processor, implements the steps of the pairing method of the bluetooth device as described above.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium having a bluetooth device pairing program stored thereon, wherein the bluetooth device pairing program, when executed by a processor, implements the steps of the bluetooth device pairing method as described above.
The invention provides a pairing method of Bluetooth equipment, which comprises the steps of receiving target Bluetooth information sent by target Bluetooth equipment through carrier communication wired connection between the target Bluetooth equipment and the target Bluetooth equipment when a carrier communication connection instruction is detected; searching Bluetooth equipment to be paired in a preset range, and acquiring a Bluetooth equipment information set of the Bluetooth equipment to be paired; matching the target Bluetooth information with the Bluetooth equipment information set, and judging whether the target Bluetooth information exists in the Bluetooth equipment information set or not; and if the target Bluetooth information exists in the Bluetooth device information set, carrying out Bluetooth pairing with the target Bluetooth device based on the target Bluetooth information. Through the method, the target Bluetooth information of the target Bluetooth equipment to be subjected to Bluetooth pairing is sent to the Bluetooth equipment to be subjected to Bluetooth connection, such as a Bluetooth earphone, VR equipment or other Bluetooth terminals, through carrier communication wired connection, so that the Bluetooth equipment to be subjected to Bluetooth connection determines the target Bluetooth information in the searched information of the Bluetooth equipment to be paired, and Bluetooth pairing is performed. Therefore, the pairing process between the Bluetooth devices is automatically triggered based on the carrier connection touch operation between the devices, the user does not need to manually search for the Bluetooth, the user operation is reduced, the Bluetooth pairing efficiency is improved, and the technical problems that the existing Bluetooth pairing efficiency is low and the Bluetooth pairing operation complexity is high are solved.
Drawings
Fig. 1 is a schematic hardware structure diagram of a bluetooth headset according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a pairing method of bluetooth devices according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a pairing method of bluetooth devices according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating a pairing method of bluetooth devices according to a third embodiment of the present invention;
fig. 5 is a functional block diagram of a pairing apparatus of bluetooth devices according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The pairing method of the Bluetooth equipment related by the embodiment of the invention is mainly applied to the Bluetooth earphone, and the Bluetooth earphone can be equipment with display and processing functions, such as a PC (personal computer), a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a bluetooth headset according to an embodiment of the present invention. In an embodiment of the present invention, the bluetooth headset may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the bluetooth headset and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and a pairing program of a bluetooth device.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; and the processor 1001 may call a pairing procedure of the bluetooth device stored in the memory 1005 and perform the pairing method of the bluetooth device provided by the embodiment of the present invention.
The embodiment of the invention provides a pairing method of Bluetooth equipment.
Referring to fig. 2, fig. 2 is a flowchart illustrating a pairing method of bluetooth devices according to a first embodiment of the present invention.
In this embodiment, the pairing method of the bluetooth device includes the following steps:
step S10, when a carrier communication connection instruction is detected, receiving target Bluetooth information sent by a target Bluetooth device through carrier communication wired connection with the target Bluetooth device;
currently, the pairing between bluetooth devices requires a user to open a bluetooth configuration interface of the bluetooth device, scan the paired bluetooth devices, and manually select corresponding bluetooth devices from a plurality of bluetooth device connection lists for pairing. Not only the bluetooth pairs inefficiency, and the bluetooth pairs complex operation degree higher moreover. In order to solve the above problem, in this embodiment, the target bluetooth information of the target bluetooth device of the bluetooth device to be subjected to bluetooth pairing is sent to the bluetooth device to be subjected to bluetooth pairing through carrier communication wired connection, a pairing process between the bluetooth devices is automatically triggered, a user does not need to manually perform bluetooth search, user operations are reduced, and bluetooth pairing efficiency is improved. Specifically, the user may contact the designated positions of the two bluetooth devices to be paired to connect the two bluetooth devices in a wired carrier communication manner. Wherein, two bluetooth equipments can be the bluetooth equipment that has carrier communication module such as TV and remote controller, VR TV and VR handle, two bluetooth earphones or two cell-phones of treating to be connected. When a carrier communication connection instruction is detected, that is, effective contact between two bluetooth devices is detected, the target bluetooth information (that is, the bluetooth name and the bluetooth address) of the slave is sent to the host based on the carrier communication wired connection between the bluetooth device (that is, the host, such as a bluetooth headset) to be subjected to bluetooth pairing and the target bluetooth device (that is, the slave, such as a mobile phone).
Step S20, searching for Bluetooth equipment to be paired in a preset range, and acquiring a Bluetooth equipment information set of the Bluetooth equipment to be paired;
in this embodiment, the host searches for the bluetooth devices to be paired within a preset range at a preset frequency, and generates a bluetooth device set according to the bluetooth devices to be paired. Wherein the set of Bluetooth devices includes at least one Bluetooth device.
Step S30, matching the target Bluetooth information with the Bluetooth device information set, and judging whether the target Bluetooth information exists in the Bluetooth device information set;
in this embodiment, the target bluetooth information is compared and matched with the bluetooth device information set, and whether the target bluetooth information exists in the bluetooth device information set is determined. Namely, when the target bluetooth information exists in the bluetooth device information set, the target bluetooth information to be paired is determined from the plurality of searched bluetooth devices. In a specific embodiment, after the target bluetooth information of the slave, that is, the bluetooth name and the bluetooth address, is sent to the host through the carrier communication wired connection, the host is controlled to search according to the bluetooth name and the bluetooth address of the slave, and the target bluetooth device information to be connected is determined. Synchronously or asynchronously, the host feeds back and receives the instruction of completing the Bluetooth equipment information to the slave machine through the carrier communication wired connection, namely, the synchronous control slave machine or the asynchronous control slave machine broadcasts the target Bluetooth information of the slave machine, namely the Bluetooth name and the Bluetooth address. Therefore, a Bluetooth pairing instruction between the devices is started, so that the master can determine whether the searched target Bluetooth device information is the Bluetooth information to be paired or not based on the target Bluetooth information broadcast by the slave.
Step S40, if the target bluetooth information exists in the bluetooth device information set, performing bluetooth pairing with the target bluetooth device based on the target bluetooth information.
And when the target Bluetooth device information searched by the host is determined to be the same as the target Bluetooth device information corresponding to the slave to which the host is to be paired, determining the target Bluetooth device information currently searched by the host to be the Bluetooth name and the Bluetooth address to be paired. And controlling the master Bluetooth device and the slave Bluetooth device to perform Bluetooth pairing based on the target Bluetooth device information or the target Bluetooth information corresponding to the slave, so as to complete Bluetooth connection between the two Bluetooth devices. That is, according to the pairing method for bluetooth devices provided in this embodiment, the bluetooth address and the device name of the slave device are sent to the bluetooth host device in a carrier communication manner, and the master device realizes automatic pairing connection according to the obtained slave device name and the bluetooth address, so that a user who needs to perform bluetooth device pairing can complete cumbersome user operations such as a pairing process without a bluetooth interface, and only by placing the slave device in an assigned position or effectively contacting an assigned part of the slave device with an assigned part of the host device, the bluetooth connection operation between the bluetooth devices can be triggered, so that two bluetooth devices perform automatic pairing connection, the bluetooth pairing efficiency is improved, and user experience is enhanced.
The embodiment provides a pairing method of bluetooth devices, which includes receiving target bluetooth information sent by a target bluetooth device through carrier communication wired connection with the target bluetooth device when a carrier communication connection instruction is detected; searching Bluetooth equipment to be paired in a preset range, and acquiring a Bluetooth equipment information set of the Bluetooth equipment to be paired; matching the target Bluetooth information with the Bluetooth equipment information set, and judging whether the target Bluetooth information exists in the Bluetooth equipment information set or not; and if the target Bluetooth information exists in the Bluetooth device information set, carrying out Bluetooth pairing with the target Bluetooth device based on the target Bluetooth information. Through the method, the target Bluetooth information of the target Bluetooth equipment to be subjected to Bluetooth pairing is sent to the Bluetooth equipment to be subjected to Bluetooth connection, such as a Bluetooth earphone, VR equipment or other Bluetooth terminals, through carrier communication wired connection, so that the Bluetooth equipment to be subjected to Bluetooth connection determines the target Bluetooth information in the searched information of the Bluetooth equipment to be paired, and Bluetooth pairing is performed. Therefore, the pairing process between the Bluetooth devices is automatically triggered based on the carrier connection touch operation between the devices, the user does not need to manually search for the Bluetooth, the user operation is reduced, the Bluetooth pairing efficiency is improved, and the technical problems that the existing Bluetooth pairing efficiency is low and the Bluetooth pairing operation complexity is high are solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a pairing method for bluetooth devices according to a second embodiment of the present invention.
Based on the foregoing embodiment shown in fig. 2, in this embodiment, before the step S10, the method further includes:
step S40, obtaining the device distance between the target Bluetooth devices, and judging whether the device distance meets the preset detection condition;
wherein, the step S40 specifically includes:
and acquiring the distance between the target Bluetooth devices based on an infrared proximity sensor, and judging whether the target Bluetooth devices are contacted or not based on the distance between the target Bluetooth devices and the infrared proximity sensor.
Step S50, if the device distance meets the detection condition, a carrier connection detection instruction is sent to the target Bluetooth device;
wherein, the step S50 specifically includes:
and if the Bluetooth device is in contact with the target Bluetooth device, sending a connection state detection data packet to the target Bluetooth device based on a carrier communication module to serve as the carrier connection detection instruction.
Step S60, when a connectable instruction fed back by the target bluetooth device based on the carrier connection detection instruction is received, generating the carrier communication connection instruction.
Wherein, the step S60 specifically includes:
when a check data packet sent by a carrier communication module of the target Bluetooth device is received, judging whether effective contact is carried out with the target Bluetooth device or not based on the check data packet and the connection state detection data packet;
and if the Bluetooth device is effectively contacted with the target Bluetooth device, taking the verification data packet as the connectable instruction and generating the carrier communication connection instruction.
And if the Bluetooth device is not in effective contact with the target Bluetooth device, adjusting a reminding message through a terminal output device in communication connection with the target Bluetooth headset so as to remind a user to adjust the relative position between the Bluetooth devices to be paired.
The embodiment sends the name and the address of the Bluetooth device of the slave to be paired to the host device in a carrier communication mode, thereby reducing the pairing operation of a user. In order to ensure the effective connection of the wired connection of the carrier communication, whether the host machine is in effective contact with the slave machine (namely, the carrier communication module of the host machine is in correct contact with the carrier communication module of the slave machine) is judged by using the infrared proximity sensor, so that whether the host machine is in effective connection with the slave machine is judged. Specifically, the device distance between the master and the slave is acquired through the infrared proximity sensor, so as to judge whether the master and the slave are in a contact state according to the device distance, that is, whether the device distance is smaller than a preset threshold value is judged, and if the device distance is equal to 0, the contact state is judged. When the host and the slave are in a contact state, the host is controlled to send a carrier connection detection instruction, such as a carrier state detection data packet, to the slave so as to judge whether the host and the slave successfully establish a carrier communication wired connection. That is, the host sends a connection state check packet to the slave through the carrier communication wired connection to detect the current data line connection state of the carrier communication. When the host receives the reply of the slave, the connection is confirmed to be normal, namely if the slave receives the carrier state detection data packet, and a corresponding connectable instruction is fed back to the host based on the carrier state detection data packet, such as a check data packet, the wired connection of the carrier communication between the host and the slave is successfully established, namely the host and the slave are in effective contact. And generating a carrier communication connection instruction so that the master machine and the slave machine can communicate based on the carrier communication wired connection, thereby transmitting the slave machine target Bluetooth information to the master machine through the carrier communication wired connection. If the slave machine does not feed back the corresponding check data packet based on the carrier state detection data packet sent by the host machine, or the data packet fed back by the slave machine is not the check data packet corresponding to the carrier state detection data packet, judging that the contact state of the host machine and the slave machine is not effective contact, indicating that the current contact state of the host machine and the slave machine is not the correct contact position, generating and displaying a device adjustment reminding message to remind a user to adjust the relative position of the Bluetooth device to be paired, so that the carrier communication module of the host machine is in contact with the carrier communication module of the slave machine.
In this embodiment, whether the master and the slave are in a contact state is detected by the infrared proximity sensor, and when the contact state is confirmed, the master inquires the slave about the connection state with the slave in a wired connection manner through carrier communication. And after receiving the confirmation reply message of the slave, determining that the connection of the carrier communication line is normal, namely the host and the slave successfully establish the wired connection of carrier communication, and further transmitting the Bluetooth name and the Bluetooth address of the slave on the basis of the wired connection of carrier communication, thereby realizing accurate and quick Bluetooth pairing.
Referring to fig. 4, fig. 4 is a flowchart illustrating a pairing method for bluetooth devices according to a third embodiment of the present invention.
Based on the foregoing embodiment shown in fig. 3, in this embodiment, the step S30 specifically includes:
step S31, generating a Bluetooth information list to be paired based on the Bluetooth connection address and the Bluetooth name of each piece of Bluetooth equipment information in the Bluetooth equipment information set;
step S32, matching the bluetooth connection address and the bluetooth name in the target bluetooth information with the to-be-paired bluetooth information list, and determining whether the target bluetooth information exists in the to-be-paired bluetooth information list.
After step S32, the method further includes:
and if the target Bluetooth information does not exist in the to-be-paired Bluetooth information list, generating and outputting a reminding message of failed matching of the Bluetooth equipment information, so that a user can adjust the relative position of the to-be-paired Bluetooth equipment.
In this embodiment, when the user needs to perform bluetooth pairing connection between the slave device and the host, the slave device may be placed in a pairing position corresponding to the host. The infrared sensor detects the position distance between the host and the slave, and after the contact state is confirmed. In order to facilitate the user to connect the current wired connection state, when the abnormal contact state of the host and the slave is detected, the red light is flashed by the indicator light connected with the host or the slave to prompt the user. And when the normal contact state of the master machine and the slave machine is detected, the green light is turned on. And then the control host sends a connection state check data packet to the slave in a carrier communication wired connection mode, and detects the connection state of the carrier communication data line. If the host receives a feedback instruction corresponding to the response of the slave, the host confirms that the carrier communication connection between the host and the slave is normal, and reminds the user of normal connection through a long bright green light, otherwise reminds the user of abnormal connection through a long bright red light. And when the connection is normal, the Bluetooth address and the equipment name of the slave are sent to the host. And when detecting that the master machine receives a slave machine reply instruction, controlling the master machine to search the Bluetooth equipment information based on the Bluetooth equipment information of the slave machine, and controlling the slave machine to start broadcasting the target Bluetooth information of the slave machine. The control host produces a Bluetooth device list according to the searched target Bluetooth device information (one or more pieces of Bluetooth device information can be included in the Bluetooth device list). And matching the Bluetooth device list with the Bluetooth address and the Bluetooth name sent by the slave. When the Bluetooth equipment information in the Bluetooth equipment list is the same as the target Bluetooth information, namely the matching is judged to be consistent, automatic Bluetooth matching between the host and the slave is realized, and a long bright green light is displayed to remind a user of successful matching. When the matching fails, a long bright red light is displayed to remind the user that the Bluetooth matching fails. The control host can search the Bluetooth equipment information again according to the preset time interval, and perform the Bluetooth automatic pairing operation again until the Bluetooth pairing operation.
In addition, the embodiment of the invention also provides a pairing device of the Bluetooth equipment.
Referring to fig. 5, fig. 5 is a functional module diagram of a first embodiment of a pairing apparatus of a bluetooth device according to the present invention.
In this embodiment, the pairing apparatus of the bluetooth device includes:
the connection information sending module 10 is configured to receive target bluetooth information sent by a target bluetooth device through carrier communication wired connection with the target bluetooth device when a carrier communication connection instruction is detected;
the information searching and broadcasting module 20 is configured to search for a bluetooth device to be paired within a preset range, and acquire a bluetooth device information set of the bluetooth device to be paired;
the bluetooth device matching module 30 is configured to match the target bluetooth information with the bluetooth device information set, and determine whether the target bluetooth information exists in the bluetooth device information set;
and the bluetooth pairing connection module 40 is configured to perform bluetooth pairing with the target bluetooth device based on the target bluetooth information if the target bluetooth information exists in the bluetooth device information set.
Further, the pairing apparatus for bluetooth devices further includes a connection instruction generation module, where the connection instruction generation module specifically includes:
the contact judgment unit is used for acquiring the equipment distance between the target Bluetooth equipment and judging whether the equipment distance meets a preset detection condition;
the connection detection unit is used for sending a carrier connection detection instruction to the target Bluetooth equipment if the equipment interval meets the detection condition;
and the connection determining unit is used for generating the carrier communication connection instruction when receiving a connectable instruction fed back by the target Bluetooth device based on the carrier connection detection instruction.
Further, the contact determination unit is further configured to:
and acquiring the distance between the target Bluetooth devices based on an infrared proximity sensor, and judging whether the target Bluetooth devices are contacted or not based on the distance between the target Bluetooth devices and the infrared proximity sensor.
Further, the connection determination unit is further configured to:
when a check data packet sent by a carrier communication module of the target Bluetooth device is received, judging whether effective contact is carried out with the target Bluetooth device or not based on the check data packet and the connection state detection data packet;
and if the Bluetooth device is effectively contacted with the target Bluetooth device, taking the verification data packet as the connectable instruction and generating the carrier communication connection instruction.
Further, the connection determination unit is further configured to:
and if the Bluetooth device is in contact with the target Bluetooth device, sending a connection state detection data packet to the target Bluetooth device based on a carrier communication module to serve as the carrier connection detection instruction.
Further, the connection determination unit is further configured to:
and if the Bluetooth device is not in effective contact with the target Bluetooth device, adjusting a reminding message through a terminal output device in communication connection with the target Bluetooth headset so as to remind a user to adjust the relative position between the Bluetooth devices to be paired.
Further, the pairing apparatus of the bluetooth device further includes a device information matching unit, and the device information matching unit is further configured to:
generating a Bluetooth information list to be paired based on the Bluetooth connection address and the Bluetooth name of each piece of Bluetooth equipment information in the Bluetooth equipment information set;
and matching the Bluetooth connection address and the Bluetooth name in the target Bluetooth information with the to-be-paired Bluetooth information list, and judging whether the target Bluetooth information exists in the to-be-paired Bluetooth information list.
Further, the device information matching unit is further configured to:
and if the target Bluetooth information does not exist in the to-be-paired Bluetooth information list, generating and outputting a reminding message of failed matching of the Bluetooth equipment information, so that a user can adjust the relative position of the to-be-paired Bluetooth equipment.
Each module in the pairing apparatus of the bluetooth device corresponds to each step in the pairing method embodiment of the bluetooth device, and the functions and implementation processes thereof are not described in detail herein.
In addition, the embodiment of the invention also provides Bluetooth equipment.
The Bluetooth device of the present invention stores a pairing program of the Bluetooth device, wherein the pairing program of the Bluetooth device is executed by a processor to implement the steps of the pairing method of the Bluetooth device.
The method implemented when the pairing procedure of the bluetooth device is executed may refer to each embodiment of the pairing method of the bluetooth device of the present invention, and details are not described herein again.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a pairing program of a bluetooth device, wherein the pairing program of the bluetooth device is executed by a processor to implement the steps of the pairing method of the bluetooth device as described above.
The method implemented when the pairing procedure of the bluetooth device is executed may refer to each embodiment of the pairing method of the bluetooth device of the present invention, and details are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A pairing method of Bluetooth devices, the pairing method of the Bluetooth devices comprising the steps of:
when a carrier communication connection instruction is detected, receiving target Bluetooth information sent by target Bluetooth equipment through carrier communication wired connection between the target Bluetooth equipment and the target Bluetooth equipment;
searching Bluetooth equipment to be paired in a preset range, and acquiring a Bluetooth equipment information set of the Bluetooth equipment to be paired;
matching the target Bluetooth information with the Bluetooth equipment information set, and judging whether the target Bluetooth information exists in the Bluetooth equipment information set or not;
and if the target Bluetooth information exists in the Bluetooth device information set, carrying out Bluetooth pairing with the target Bluetooth device based on the target Bluetooth information.
2. The pairing method of claim 1, wherein before the step of receiving the target bluetooth information transmitted by the target bluetooth device through a carrier communication wired connection with the target bluetooth device when the carrier communication connection instruction is detected, the method further comprises:
acquiring the device distance between the target Bluetooth devices, and judging whether the device distance meets a preset detection condition;
if the equipment interval meets the detection condition, sending a carrier connection detection instruction to the target Bluetooth equipment;
and when a connectable instruction fed back by the target Bluetooth device based on the carrier connection detection instruction is received, generating the carrier communication connection instruction.
3. The pairing method of the bluetooth device according to claim 2, wherein the step of acquiring the device distance from the target bluetooth device and determining whether the device distance meets a preset detection condition specifically comprises:
and acquiring the distance between the target Bluetooth devices based on an infrared proximity sensor, and judging whether the target Bluetooth devices are contacted or not based on the distance between the target Bluetooth devices and the infrared proximity sensor.
4. The pairing method of claim 3, wherein the step of sending a carrier connection detection instruction to the target bluetooth device if the device distance meets the detection condition specifically comprises:
and if the Bluetooth device is in contact with the target Bluetooth device, sending a connection state detection data packet to the target Bluetooth device based on a carrier communication module to serve as the carrier connection detection instruction.
5. The pairing method of claim 4, wherein the step of generating the carrier communication connection instruction upon receiving a connectable instruction fed back by the target bluetooth device based on the carrier connection detection instruction specifically includes:
when a check data packet sent by a carrier communication module of the target Bluetooth device is received, judging whether effective contact is carried out with the target Bluetooth device or not based on the check data packet and the connection state detection data packet;
and if the Bluetooth device is effectively contacted with the target Bluetooth device, taking the verification data packet as the connectable instruction and generating the carrier communication connection instruction.
6. The pairing method of claim 5, wherein after the step of determining whether to make effective contact with the target bluetooth device based on the check packet and the connection status detection packet when receiving the check packet sent by the carrier communication module of the target bluetooth device, the pairing method further comprises:
and if the Bluetooth device is not in effective contact with the target Bluetooth device, adjusting a reminding message through a terminal output device in communication connection with the target Bluetooth headset so as to remind a user to adjust the relative position between the Bluetooth devices to be paired.
7. The method for pairing bluetooth devices according to any one of claims 1 to 6, wherein the step of matching the target bluetooth information with the bluetooth device information set and determining whether the target bluetooth information exists in the bluetooth device information set specifically includes:
generating a Bluetooth information list to be paired based on the Bluetooth connection address and the Bluetooth name of each piece of Bluetooth equipment information in the Bluetooth equipment information set;
and matching the Bluetooth connection address and the Bluetooth name in the target Bluetooth information with the to-be-paired Bluetooth information list, and judging whether the target Bluetooth information exists in the to-be-paired Bluetooth information list.
8. The pairing method of claim 7, wherein after the step of matching the bluetooth connection address and the bluetooth name in the target bluetooth information with the to-be-paired bluetooth information list and determining whether the target bluetooth information exists in the to-be-paired bluetooth information list, the method further comprises:
and if the target Bluetooth information does not exist in the to-be-paired Bluetooth information list, generating and outputting a reminding message of failed matching of the Bluetooth equipment information, so that a user can adjust the relative position of the to-be-paired Bluetooth equipment.
9. A bluetooth device, characterized in that the bluetooth device comprises a processor, a memory, and a pairing procedure of the bluetooth device stored on the memory and executable by the processor, wherein the pairing procedure of the bluetooth device, when executed by the processor, implements the steps of the pairing method of the bluetooth device according to any one of claims 1 to 8.
10. A computer-readable storage medium, having stored thereon a pairing procedure for a bluetooth device, wherein the pairing procedure for the bluetooth device, when executed by a processor, implements the steps of the pairing method for the bluetooth device according to any one of claims 1 to 8.
CN202010707013.8A 2020-07-21 2020-07-21 Bluetooth device pairing method, device and storage medium Pending CN111885571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010707013.8A CN111885571A (en) 2020-07-21 2020-07-21 Bluetooth device pairing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010707013.8A CN111885571A (en) 2020-07-21 2020-07-21 Bluetooth device pairing method, device and storage medium

Publications (1)

Publication Number Publication Date
CN111885571A true CN111885571A (en) 2020-11-03

Family

ID=73156208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010707013.8A Pending CN111885571A (en) 2020-07-21 2020-07-21 Bluetooth device pairing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111885571A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367654A (en) * 2020-11-06 2021-02-12 炬力(珠海)微电子有限公司 TWS equipment team forming method and device, electronic equipment and storage medium
CN112566088A (en) * 2020-12-11 2021-03-26 深圳市沃特沃德股份有限公司 Microphone connection method and device of intelligent telephone, computer equipment and storage medium
CN115342592A (en) * 2022-08-31 2022-11-15 海信冰箱有限公司 Refrigerator and binding method of weighing device of refrigerator

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601207A (en) * 2014-12-08 2015-05-06 深圳市腾讯计算机系统有限公司 Data transmission method, user terminal and system
CN105204817A (en) * 2015-09-30 2015-12-30 联想(北京)有限公司 Information processing method and electronic equipment
WO2018032681A1 (en) * 2016-08-18 2018-02-22 深圳Tcl数字技术有限公司 Bluetooth pairing method and bluetooth device
CN109618318A (en) * 2018-12-21 2019-04-12 潍坊歌尔电子有限公司 A kind of matching method and TWS earphone of TWS earphone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601207A (en) * 2014-12-08 2015-05-06 深圳市腾讯计算机系统有限公司 Data transmission method, user terminal and system
CN105204817A (en) * 2015-09-30 2015-12-30 联想(北京)有限公司 Information processing method and electronic equipment
WO2018032681A1 (en) * 2016-08-18 2018-02-22 深圳Tcl数字技术有限公司 Bluetooth pairing method and bluetooth device
CN109618318A (en) * 2018-12-21 2019-04-12 潍坊歌尔电子有限公司 A kind of matching method and TWS earphone of TWS earphone

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367654A (en) * 2020-11-06 2021-02-12 炬力(珠海)微电子有限公司 TWS equipment team forming method and device, electronic equipment and storage medium
CN112566088A (en) * 2020-12-11 2021-03-26 深圳市沃特沃德股份有限公司 Microphone connection method and device of intelligent telephone, computer equipment and storage medium
CN115342592A (en) * 2022-08-31 2022-11-15 海信冰箱有限公司 Refrigerator and binding method of weighing device of refrigerator

Similar Documents

Publication Publication Date Title
CN112020048B (en) Bluetooth device pairing method, device and storage medium
CN109600694B (en) Wireless earphone pairing method and device, terminal and charging box
CN111885571A (en) Bluetooth device pairing method, device and storage medium
CN111107667B (en) Bluetooth headset pairing method and device and readable storage medium
CN110996405B (en) Earphone connection method, terminal, earphone box and computer readable storage medium
CN113490218B (en) Pairing method, pairing device, bluetooth remote controller, intelligent device and storage medium
CN103686462B (en) Control terminal and controlled terminal matching method, system and terminal
EP2838309A1 (en) Method, device and system for establishing data connection
CN106131810B (en) Method and device for connecting Bluetooth dual-mode equipment
CN106681774B (en) Software upgrading method of Bluetooth loudspeaker and intelligent terminal
CN103997570A (en) Pairing method and system for mobile terminals and mobile terminals
CN111107528A (en) Bluetooth test method and test machine
CN112203179B (en) TWS earphone, automatic reconnection method and device thereof, and computer storage medium
CN113838275B (en) Bluetooth batch pairing method, display device and readable storage medium
CN113473435B (en) Bluetooth-based device connection method and device, electronic device and storage medium
CN112492611A (en) Network configuration method, network configuration device, electronic equipment and readable storage medium
CN113055864A (en) Bluetooth connection method, device, storage medium and electronic equipment
CN110572508A (en) Address book synchronization method and device, storage medium and electronic equipment
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN108513365B (en) Control method and device of intelligent equipment, intelligent equipment and medium
CN114257922B (en) Earphone mixed loading identification method, system, equipment and computer readable storage medium
CN111246594A (en) Terminal equipment, communication system and communication connection method
CN111464990B (en) Information processing method and first device
CN107333255B (en) Network parameter matching method, device and system thereof
US20210051462A1 (en) Electronic device and method for providing service by electronic device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201103

RJ01 Rejection of invention patent application after publication