CN111107667B - Bluetooth headset pairing method and device and readable storage medium - Google Patents

Bluetooth headset pairing method and device and readable storage medium Download PDF

Info

Publication number
CN111107667B
CN111107667B CN201911424130.7A CN201911424130A CN111107667B CN 111107667 B CN111107667 B CN 111107667B CN 201911424130 A CN201911424130 A CN 201911424130A CN 111107667 B CN111107667 B CN 111107667B
Authority
CN
China
Prior art keywords
earphone
equipment
pairing
bluetooth
rssi
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.)
Active
Application number
CN201911424130.7A
Other languages
Chinese (zh)
Other versions
CN111107667A (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.)
Goertek Inc
Original Assignee
Goertek Inc
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 Inc filed Critical Goertek Inc
Priority to CN201911424130.7A priority Critical patent/CN111107667B/en
Publication of CN111107667A publication Critical patent/CN111107667A/en
Application granted granted Critical
Publication of CN111107667B publication Critical patent/CN111107667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • 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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Abstract

The invention discloses a pairing method and a device of a Bluetooth headset and a readable storage medium, wherein the pairing method of the Bluetooth headset searches and obtains equipment to be connected within a preset distance through a first headset, and determines the RSSI (received signal strength indicator) strength of the RSSI within a preset distance; acquiring the equipment information of the first earphone and the equipment to be connected, and determining a second earphone to be paired based on the RSSI strength and the equipment information of the first earphone and the equipment to be connected; and pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone. According to the method and the device, the device to be connected is screened out based on the RSSI strength, and then the second earphone to be paired is screened out based on the device information of the first earphone, so that the hardware cost of the earphones is reduced, the earphone pairing is not required to be carried out by means of a charging box, the earphone pairing operation is simplified, the earphone pairing efficiency is improved, and the user experience is improved.

Description

Bluetooth headset pairing method and device and readable storage medium
Technical Field
The present invention relates to the field of bluetooth communication technologies, and in particular, to a pairing method and apparatus for bluetooth headsets and a computer-readable storage medium.
Background
Along with the rapid development of mobile terminal technology and chip technology, the earphone market has been developed rapidly, especially the wireless earphone market. Among various Wireless headset products, a True Wireless Stereo (TWS) headset can realize Stereo playback of left and right channels, and provides a good playback sound quality for a Wireless headset user while being convenient to wear, thus being popular among Wireless headset users. At present, the main earphone and the slave earphone of the TWS earphone are paired, generally, communication is carried out by means of a charging box or other hardware modules, bluetooth addresses of the two earphones are obtained, then pairing connection is completed based on the Bluetooth addresses, and hardware cost of the TWS earphone is increased.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a pairing method and device of a Bluetooth headset and a readable storage medium, and aims to solve the technical problem that the existing pairing method of the Bluetooth headset increases the hardware cost of the headset.
In order to achieve the above object, the present invention provides a pairing method for a bluetooth headset, which comprises the following steps:
when a pairing instruction is detected, searching and acquiring equipment to be connected within a preset distance through a first earphone, and determining the RSSI (Received Signal Strength Indication, RSSI) Strength of the equipment to be connected;
acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI strength, the equipment information of the first earphone and the equipment information of the equipment to be connected;
and pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone.
Optionally, the obtaining the device information of the first headset and the device information of the device to be connected, and determining, in the device to be connected, a second headset to be paired based on the RSSI strength, the device information of the first headset, and the device information of the device to be connected includes:
determining a device to be matched with the RSSI (received signal strength indicator) intensity of which is greater than a preset intensity threshold value in the device to be connected, and acquiring target device information of the first earphone and related device information of the device to be matched;
and comparing the target equipment information with the related equipment information, and determining the equipment to be matched corresponding to the related equipment information matched with the target equipment information as a second earphone to be matched.
Optionally, the step of comparing the target device information with the related device information, and determining a device to be matched corresponding to the related device information matched with the target device information as a second headset to be paired specifically includes:
according to the RSSI intensity of the equipment to be matched, sequentially adding the relevant equipment information of the equipment to be matched to a preset comparison list;
comparing the target equipment information with each piece of relevant equipment information in the comparison list in sequence according to the arrangement sequence of the relevant equipment information in the comparison list;
and determining the equipment to be matched corresponding to the relevant equipment information matched with the target equipment information as a second earphone to be paired.
Optionally, the step of comparing the target device information with the related device information, and determining a device to be matched corresponding to the related device information matched with the target device information as a second headset to be paired specifically includes:
comparing the Bluetooth addresses in the target device information with the Bluetooth addresses in the related device information in sequence, and judging whether target devices matched with the Bluetooth address of the first earphone exist in the devices to be matched or not;
when the target equipment exists in the equipment to be matched, judging whether the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone or not;
and when the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone, determining the target equipment as a second earphone to be paired.
Optionally, before the steps of searching and acquiring a device to be connected within a preset distance through a first headset and determining an RSSI strength of a received signal strength indicator RSSI of the device to be connected when the pairing instruction is detected, the method further includes:
generating the pairing instruction upon detecting that a charging box is connected to the first and second earphones.
Optionally, when it is detected that the charging box is connected to the first earphone and the second earphone, the step of generating the pairing instruction specifically includes:
when the charging box is detected to be connected with the first earphone and the second earphone, judging whether the first earphone is in a connected state;
and if the first earphone is not in the connected state, generating the pairing instruction.
Optionally, when the pairing instruction is detected, the step of searching and acquiring the to-be-connected device within the preset distance through the first earphone, and determining the RSSI strength of the received signal strength indicator RSSI of the to-be-connected device specifically includes:
when the pairing instruction is detected, controlling the first earphone to enter an equipment search mode Inquiry, searching and acquiring Bluetooth equipment within a preset distance of the first earphone, and receiving a response instruction fed back by the Bluetooth equipment according to the search instruction of the first earphone;
and marking the Bluetooth equipment feeding back the response instruction as equipment to be connected, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected.
Optionally, the pairing method of the bluetooth headset further includes:
when the second earphone to be paired does not exist in the equipment to be connected, acquiring the number of searched equipment of the first earphone, and judging whether the number of the searched equipment reaches a preset number threshold value;
and if the number of the searched devices reaches a preset number threshold value, displaying a reminding message of pairing failure through a terminal in communication connection with the first earphone.
In addition, to achieve the above object, the present invention also provides a bluetooth headset, including: a processor and a pairing procedure for a bluetooth headset operable on the processor, the pairing procedure for a bluetooth headset implementing the steps as described above when executed by the processor.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, which stores a bluetooth headset pairing program, and when the bluetooth headset pairing program is executed by a processor, the bluetooth headset pairing program implements the steps as described above.
The invention provides a pairing method of a Bluetooth headset, which comprises the steps of searching and acquiring equipment to be connected in a preset distance through a first headset when a pairing instruction is detected, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected; acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI strength, the equipment information of the first earphone and the equipment information of the equipment to be connected; and pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone. Through the mode, the equipment to be connected is screened out based on the RSSI strength, and then the second earphone to be paired is screened out based on the equipment information of the first earphone, so that the hardware cost of the earphone is reduced, the earphone pairing is not required to be carried out by a charging box, the earphone pairing operation is simplified, the earphone pairing efficiency is improved, and the user experience is improved.
Drawings
Fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a pairing method of bluetooth headsets according to a first embodiment of the invention;
fig. 3 is a flowchart illustrating a pairing method for bluetooth headsets according to a second embodiment of the 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 main solution of the embodiment of the invention is as follows: when a pairing instruction is detected, searching and acquiring equipment to be connected within a preset distance through a first earphone, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected; acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI strength, the equipment information of the first earphone and the equipment information of the equipment to be connected; and pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone. Through the mode, the equipment to be connected is screened out based on the RSSI strength, and then the second earphone to be paired is screened out based on the equipment information of the first earphone, so that the hardware cost of the earphone is reduced, the earphone pairing is not required to be carried out by means of a charging box, the earphone pairing operation is simplified, the earphone pairing efficiency is improved, and the user experience is improved.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3 (Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 3) player, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. 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 a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors, among others. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a pairing program of a bluetooth headset.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a pairing procedure for the bluetooth headset stored in the memory 1005 and perform the following operations:
when a pairing instruction is detected, searching and acquiring equipment to be connected within a preset distance through a first earphone, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected;
acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI strength, the equipment information of the first earphone and the equipment information of the equipment to be connected;
and pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and also perform the following operations:
determining a device to be matched with the RSSI (received signal strength indicator) intensity of which is greater than a preset intensity threshold value in the devices to be connected, and acquiring target device information of the first earphone and related device information of the device to be matched;
and comparing the target equipment information with the related equipment information, and determining the equipment to be matched corresponding to the related equipment information matched with the target equipment information as a second earphone to be matched.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and also perform the following operations:
according to the RSSI intensity of the equipment to be matched, sequentially adding the relevant equipment information of the equipment to be matched to a preset comparison list;
comparing the target equipment information with each piece of relevant equipment information in the comparison list in sequence according to the arrangement sequence of the relevant equipment information in the comparison list;
and determining the equipment to be matched corresponding to the relevant equipment information matched with the target equipment information as a second earphone to be paired.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and further perform the following operations:
comparing the Bluetooth addresses in the target device information with the Bluetooth addresses in the related device information in sequence, and judging whether target devices matched with the Bluetooth address of the first earphone exist in the devices to be matched or not;
when the target equipment exists in the equipment to be matched, judging whether the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone or not;
and when the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone, determining the target equipment as a second earphone to be paired.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and also perform the following operations:
generating the pairing instruction when detecting that a charging box is connected with the first earphone and the second earphone.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and also perform the following operations:
when the charging box is detected to be connected with the first earphone and the second earphone, judging whether the first earphone is in a connected state;
and if the first earphone is not in the connected state, generating the pairing instruction.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and further perform the following operations:
when the pairing instruction is detected, controlling the first earphone to enter an equipment search mode Inquiry, searching and acquiring Bluetooth equipment within a preset distance of the first earphone, and receiving a response instruction fed back by the Bluetooth equipment according to the search instruction of the first earphone;
and marking the Bluetooth equipment feeding back the response instruction as equipment to be connected, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected.
Further, the processor 1001 may call a pairing procedure of the bluetooth headset stored in the memory 1005, and further perform the following operations:
when the second earphone to be paired does not exist in the equipment to be connected, acquiring the number of searched equipment of the first earphone, and judging whether the number of the searched equipment reaches a preset number threshold value or not;
and if the number of the searched devices reaches a preset number threshold value, displaying a reminding message of pairing failure through a terminal in communication connection with the first earphone.
Based on the hardware structure, the invention provides various embodiments of the pairing method of the Bluetooth headset.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a first embodiment of a pairing method for bluetooth headsets according to the present invention;
the first embodiment of the present invention provides a pairing method for a bluetooth headset, where the pairing method for the bluetooth headset includes:
step S10, when a pairing instruction is detected, searching and acquiring equipment to be connected within a preset distance through a first earphone, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected;
currently, in pairing between a master earphone and a slave earphone of a TWS earphone, communication is generally performed by means of a charging box or other hardware modules to obtain bluetooth addresses of the two parties, for example, the bluetooth addresses of the master earphone and the slave earphone are obtained through the charging box and are respectively notified to the master earphone and the slave earphone, and then the master earphone and the slave earphone complete pairing connection based on the bluetooth addresses; or a hardware physical connection module is added in the double earphones to acquire the Bluetooth addresses of the master earphone and the slave earphone. Therefore, the existing pairing method of the Bluetooth headset not only increases the hardware cost of the TWS headset, but also increases the user operation of headset pairing connection, and reduces the user experience.
In order to solve the problems, the device to be connected is screened out based on the RSSI strength, and then the second earphone to be paired is screened out based on the device information of the first earphone, so that the hardware cost of the earphone is reduced, the earphone pairing is not required to be carried out by means of a charging box, the earphone pairing operation is simplified, the earphone pairing efficiency is improved, and the user experience is improved. The execution main body of the invention can be a headset, in particular a main headset. The execution main body can also be a charging box, in more embodiments, the execution main body can also be a connecting device in a neck earphone or a headset, and the charging box and the connecting device can trigger a pairing instruction based on a preset button. Specifically, in this embodiment, a main ear and a slave ear are paired and connected as an example, and when a pairing instruction is detected, the first earphone, that is, the main ear, is controlled to search for Inquiry by the bluetooth device, and search for the bluetooth device within a preset distance from the main ear as a device to be connected. And acquiring a received signal strength indication RSSI corresponding to the equipment to be connected. Wherein the device to be connected comprises at least one Bluetooth device. And when the device to be connected does not exist, displaying the reminding message of the Bluetooth device which is not searched. Each bluetooth device corresponds to one RSSI strength.
Further, before the step S10, the method further includes:
generating the pairing instruction when detecting that a charging box is connected with the first earphone and the second earphone.
Wherein, when detecting that the charging box is connected with the first earphone and the second earphone, the step of generating the pairing instruction specifically comprises:
when the charging box is detected to be connected with the first earphone and the second earphone, judging whether the first earphone is in a connected state;
and if the first earphone is not in the connected state, generating the pairing instruction.
In this embodiment, in order to reduce the power consumption of the earphones, when the master ear and the slave ear are put into the charging box, the earphone pairing instruction is triggered to perform the earphone pairing connection. That is, when it is detected that the charging box is connected to the first earphone and the second earphone (i.e., the slave ear), that is, the master ear and the slave ear are put into the charging box, a pairing instruction is generated. Specifically, when it is detected that the master ear and the slave ear are put into the charging box, it is determined whether the master ear is in a connected state, that is, whether the master ear has a connected slave ear. If there is a slave ear already connected, the existing connection device of the master ear is retained, and no pairing operation is required. And if the main ear is not in the connected state, generating a pairing instruction and entering an earphone pairing connection process. In a specific embodiment, in order to simplify user operation, a pairing instruction is generated at regular time according to a preset time interval, when the master ear and the slave ear are not successfully connected in a pairing mode, the bluetooth equipment within a preset distance is detected at regular time, and the slave ear is identified so as to carry out earphone pairing connection.
Further, the step S10 specifically includes:
when the pairing instruction is detected, controlling the first earphone to enter an equipment search mode Inquiry, searching and acquiring Bluetooth equipment within a preset distance of the first earphone, and receiving a response instruction fed back by the Bluetooth equipment according to the search instruction of the first earphone;
and marking the Bluetooth equipment feeding back the response instruction as equipment to be connected, and determining the RSSI (received signal strength indicator) strength of the RSSI to be connected.
In this embodiment, when the pairing instruction is detected, the first earphone is controlled to enter an equipment search mode Inquiry, and a bluetooth device within a preset distance from the first earphone is searched and acquired. When the Bluetooth device in the unconnected state receives the pairing command sent by the main ear, the Bluetooth device corresponds to the feedback Response command, namely the main ear receives the Response event fed back. And the main ear determines the currently connectable device to be connected according to the received Response event. And then obtaining the RSSI intensity of the equipment to be connected.
Step S20, acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI intensity, the equipment information of the first earphone and the equipment information of the equipment to be connected;
in this embodiment, device information of a main ear and device information of a device to be connected are acquired. The device information includes a bluetooth address UAP and a bluetooth name (or other bluetooth identifiers for marking different bluetooth). And comparing the equipment information of the main ear with the equipment to be connected one by one, and finding out the equipment to be connected which is the second earphone, namely the auxiliary ear, and is the same as the equipment information of the main ear from the equipment to be connected. In order to improve the earphone pairing efficiency, close-range Bluetooth equipment is preferentially identified. And determining the distance between the equipment to be connected and a main ear according to the RSSI strength corresponding to the equipment to be connected, wherein the greater the RSSI strength is, the closer the equipment to the main ear is. And then preferentially comparing and identifying the equipment information of the equipment to be connected with the equipment information of the main ear, which is closest to the equipment to be connected. And if not, removing the equipment from the equipment to be connected. And then acquiring the next device to be connected with the minimum RSSI intensity to perform device information matching until the slave ear to be paired is determined.
And S30, carrying out pairing connection on the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone.
In this embodiment, after the slave ear is determined, the paired headset connection between the master ear and the slave ear is performed based on the bluetooth address of the master ear and the bluetooth address of the slave ear.
In this embodiment, a pairing method for a bluetooth headset is provided, where when a pairing instruction is detected, a first headset searches for and acquires a device to be connected within a preset distance, and determines an RSSI strength of a received signal strength indicator RSSI of the device to be connected; acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI strength, the equipment information of the first earphone and the equipment information of the equipment to be connected; and pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone. Through the mode, the equipment to be connected is screened out based on the RSSI strength, and then the second earphone to be paired is screened out based on the equipment information of the first earphone, so that the hardware cost of the earphone is reduced, the earphone pairing is not required to be carried out by a charging box, the earphone pairing operation is simplified, the earphone pairing efficiency is improved, and the user experience is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a pairing method of a bluetooth headset according to a first embodiment of the present invention;
a second embodiment of the present invention provides a pairing method for bluetooth headsets, based on the embodiment shown in fig. 2, where the step S20 specifically includes:
step S21, determining equipment to be matched with RSSI (received signal strength indicator) intensity larger than a preset intensity threshold value in the equipment to be connected, and acquiring target equipment information of the first earphone and related equipment information of the equipment to be matched;
and S22, comparing the target device information with the related device information, and determining the device to be matched corresponding to the related device information matched with the target device information as a second earphone to be matched.
In this embodiment, in order to promote the earphone and pair efficiency, the bluetooth equipment of preferred discernment closely. Specifically, the RSSI strength corresponding to the equipment to be connected is obtained, and the equipment with the RSSI strength larger than a preset strength threshold value is screened out and used as the equipment to be matched. And deleting the equipment with the RSSI intensity smaller than the preset intensity threshold value, namely, eliminating the equipment with the distance far away from the main ear, and improving the identification efficiency of the auxiliary ear. And comparing the target equipment information of the first earphone with the related equipment information of the equipment to be matched one by one. And finding out the equipment to be matched with the target equipment information, namely determining the equipment to be matched as the second earphone.
Further, the step S22 specifically includes:
sequentially adding related equipment information of the equipment to be matched to a preset comparison list according to the RSSI (received signal strength indicator) strength of the equipment to be matched;
comparing the target equipment information with each piece of relevant equipment information in the comparison list in sequence according to the arrangement sequence of the relevant equipment information in the comparison list;
and determining the equipment to be matched corresponding to the related equipment information matched with the target equipment information as a second earphone to be paired.
In this embodiment, a bluetooth device in a close range is preferentially identified, and the distance between the device to be connected and the main ear is determined according to the RSSI strength corresponding to the device to be connected, where the greater the RSSI strength is, the closer the device to the main ear is. According to the RSSI intensity of the equipment to be matched, the equipment to be matched is preferentially added into a comparison list firstly with the maximum RSSI intensity, and the next-to-last RSSI intensity is added into the next position of the comparison list until the equipment to be matched is sequentially added into the comparison list according to the descending order of the RSSI intensities. After the addition is completed, sequentially comparing the target equipment information with each piece of relevant equipment information corresponding to each piece of equipment to be matched according to the arrangement sequence in the comparison list. Preferentially comparing and identifying the equipment information of the equipment to be connected with the equipment information of the main ear, wherein the equipment information is closest to the equipment to be connected. And if not, removing the equipment from the equipment to be connected. And then acquiring the next device to be connected with the minimum RSSI intensity to perform device information matching until the slave ear to be paired is determined.
Further, the step S22 specifically includes:
comparing the Bluetooth addresses in the target device information with the Bluetooth addresses in the related device information in sequence, and judging whether target devices matched with the Bluetooth address of the first earphone exist in the devices to be matched or not;
when the target equipment exists in the equipment to be matched, judging whether the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone or not;
and when the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone, determining the target equipment as a second earphone to be paired.
In this embodiment, the specific process of matching the target device information with the related device information is as follows: and comparing the Bluetooth address UAG in the target equipment information with the Bluetooth address UAG in each piece of relevant equipment information in sequence. If the Bluetooth address UAG of the related device information is the same as the Bluetooth address UAG of the target device information, determining the device to be matched as the target device, further comparing the Bluetooth Name BT Name corresponding to the target device with the Bluetooth Name BT Name in the target device information, and if the Bluetooth addresses are the same, determining that the target device is the slave ear to be connected corresponding to the master ear.
Further, the pairing method of the bluetooth headset further comprises the following steps:
when the second earphone to be paired does not exist in the equipment to be connected, acquiring the number of searched equipment of the first earphone, and judging whether the number of the searched equipment reaches a preset number threshold value;
and if the number of the searched devices reaches a preset number threshold value, displaying a reminding message of pairing failure through a terminal in communication connection with the first earphone.
In this embodiment, when the slave ear matched with the master ear cannot be found in the device to be connected, in order to prevent continuous power consumption caused by continuous operation of the headset pairing program, the number of currently searched devices of the master ear is obtained, and if it is determined that the number of the searched devices reaches the preset number threshold, it is determined that the currently found slave ear to be paired cannot be found, and the headset pairing operation may be suspended. In particular embodiments, the pairing instruction may be issued again upon detecting that the master and slave ears are placed into the charging box. In further embodiments, the searching time of the main ear searching slave ear can be obtained when the slave ear matched with the main ear is not found, and the earphone pairing operation is suspended when the searching time reaches a preset time threshold.
Furthermore, the invention also provides a Bluetooth headset.
The bluetooth headset of the present invention includes: a processor and a pairing procedure for a bluetooth headset operable on the processor.
The method implemented when the pairing procedure of the bluetooth headset is executed may refer to each embodiment of the pairing method of the bluetooth headset of the present invention, and details thereof are not repeated herein.
Further, the present invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a pairing program of a bluetooth headset, wherein the pairing program of the bluetooth headset is executed by a processor to implement the steps of the pairing method of the bluetooth headset as described above.
The method implemented when the pairing procedure of the bluetooth headset is executed may refer to each embodiment of the pairing method of the bluetooth headset of the present invention, and details thereof are not repeated herein.
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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional 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 only for description, and do not represent the advantages and disadvantages 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 or the portions contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (which may be 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 (7)

1. A pairing method of Bluetooth headsets is characterized in that the pairing method of the Bluetooth headsets comprises the following steps:
when a pairing instruction is detected, searching and acquiring equipment to be connected within a preset distance through a first earphone, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected;
acquiring the equipment information of the first earphone and the equipment information of the equipment to be connected, and determining a second earphone to be paired in the equipment to be connected based on the RSSI strength, the equipment information of the first earphone and the equipment information of the equipment to be connected;
pairing and connecting the first earphone and the second earphone based on the Bluetooth address of the first earphone and the Bluetooth address of the second earphone;
the step of acquiring the device information of the first earphone and the device information of the device to be connected, and determining a second earphone to be paired in the device to be connected based on the RSSI strength, the device information of the first earphone and the device information of the device to be connected includes:
determining a device to be matched with the RSSI (received signal strength indicator) intensity of which is greater than a preset intensity threshold value in the devices to be connected, and acquiring target device information of the first earphone and related device information of the device to be matched;
comparing the Bluetooth addresses in the target device information with the Bluetooth addresses in the related device information in sequence, and judging whether target devices matched with the Bluetooth address of the first earphone exist in the devices to be matched or not;
when the target equipment exists in the equipment to be matched, judging whether the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone or not;
and when the Bluetooth name of the target equipment is matched with the Bluetooth name of the first earphone, determining the target equipment as a second earphone to be paired.
2. The pairing method of the bluetooth headset according to claim 1, wherein before the steps of searching for and acquiring a device to be connected within a preset distance through the first headset and determining the RSSI strength of the RSSI indicated by the received signal strength of the device to be connected when the pairing command is detected, the method further comprises:
generating the pairing instruction upon detecting that a charging box is connected to the first and second earphones.
3. The pairing method of the bluetooth headset according to claim 2, wherein the step of generating the pairing instruction when the charging box is detected to be connected to the first headset and the second headset specifically comprises:
when the charging box is detected to be connected with the first earphone and the second earphone, judging whether the first earphone is in a connected state;
and if the first earphone is not in the connected state, generating the pairing instruction.
4. The pairing method of the bluetooth headset according to claim 1, wherein the step of searching and acquiring the to-be-connected device within a preset distance through the first headset when the pairing instruction is detected, and determining the RSSI strength of the RSSI of the Received Signal Strength Indication (RSSI) of the to-be-connected device specifically includes:
when the pairing instruction is detected, controlling the first earphone to enter an equipment search mode Inquiry, searching and acquiring Bluetooth equipment within a preset distance of the first earphone, and receiving a response instruction fed back by the Bluetooth equipment according to the search instruction of the first earphone;
and marking the Bluetooth equipment feeding back the response instruction as equipment to be connected, and determining the RSSI (received signal strength indicator) strength of the RSSI of the equipment to be connected.
5. The pairing method of the bluetooth headset of any one of claims 1 to 4, wherein the pairing method of the bluetooth headset further comprises:
when the second earphone to be paired does not exist in the equipment to be connected, acquiring the number of searched equipment of the first earphone, and judging whether the number of the searched equipment reaches a preset number threshold value or not;
and if the number of the searched devices reaches a preset number threshold value, displaying a reminding message of pairing failure through a terminal in communication connection with the first earphone.
6. A Bluetooth headset, comprising: a processor and a pairing procedure for a bluetooth headset executable on the processor, the pairing procedure for a bluetooth headset implementing the steps of the pairing method for a bluetooth headset according to any one of claims 1 to 5 when executed by the processor.
7. A computer-readable storage medium, having stored thereon a pairing program for a bluetooth headset, the pairing program for the bluetooth headset implementing the steps of the pairing method for the bluetooth headset according to any one of claims 1 to 5 when being executed by a processor.
CN201911424130.7A 2019-12-31 2019-12-31 Bluetooth headset pairing method and device and readable storage medium Active CN111107667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911424130.7A CN111107667B (en) 2019-12-31 2019-12-31 Bluetooth headset pairing method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911424130.7A CN111107667B (en) 2019-12-31 2019-12-31 Bluetooth headset pairing method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN111107667A CN111107667A (en) 2020-05-05
CN111107667B true CN111107667B (en) 2022-11-22

Family

ID=70426809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911424130.7A Active CN111107667B (en) 2019-12-31 2019-12-31 Bluetooth headset pairing method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111107667B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787553B (en) * 2020-06-01 2023-12-19 深圳市匠盟科技有限公司 Connection method, device and system of multi-type wireless equipment
CN111885596A (en) * 2020-08-03 2020-11-03 南京创通微新通信有限公司 Data forwarding system and method based on virtual port
CN111949461A (en) * 2020-08-26 2020-11-17 北京华力兴科技发展有限责任公司 Method and system for carrying out remote intelligent diagnosis on equipment
CN112004220A (en) * 2020-09-16 2020-11-27 深圳市锐尔觅移动通信有限公司 Bluetooth connection method and system, Bluetooth device and readable storage medium
CN112104943B (en) * 2020-09-22 2022-09-09 深圳市汇顶科技股份有限公司 Address transmission method, Bluetooth chip, Bluetooth headset and electronic equipment
CN112333332B (en) * 2020-10-27 2021-05-28 维沃移动通信有限公司 Prompt message display method and device and electronic equipment
CN112367654B (en) * 2020-11-06 2023-05-12 炬力(珠海)微电子有限公司 TWS equipment team forming method and device, electronic equipment and storage medium
CN112911496A (en) * 2021-03-26 2021-06-04 潍坊歌尔电子有限公司 Pairing method of sounding components, audio system and readable storage medium
CN113543102A (en) * 2021-07-12 2021-10-22 三诺生物传感股份有限公司 Bluetooth connection method
CN114567918B (en) * 2022-03-02 2023-04-07 北京奕斯伟计算技术股份有限公司 Communication method, communication device, communication chip and computer-readable storage medium
CN114827282A (en) * 2022-03-30 2022-07-29 阿里云计算有限公司 Service routing method, device, equipment and storage medium
WO2024046481A1 (en) * 2022-09-02 2024-03-07 深圳迈瑞生物医疗电子股份有限公司 Mobile monitoring device and wireless pairing method thereof
CN115297462B (en) * 2022-10-09 2023-03-24 深圳市金威澎电子有限公司 Anti-lost awakening method of earphone part and earphone anti-lost method based on pairing relationship
CN116846429A (en) * 2023-07-07 2023-10-03 苏州墨觉智能电子有限公司 Near field communication method and device between earphones, earphone and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038263A (en) * 2014-06-18 2014-09-10 小米科技有限责任公司 Method and device for establishing Bluetooth connection
WO2014204641A1 (en) * 2013-06-21 2014-12-24 Bose Corporation Low energy wireless proximity pairing
CN107257516A (en) * 2017-07-17 2017-10-17 湖南海翼电子商务股份有限公司 Wireless headset and its matching method
CN108174459A (en) * 2018-02-08 2018-06-15 深圳市沃特沃德股份有限公司 Wireless audio devices matching method and wireless audio devices
CN109451473A (en) * 2018-10-15 2019-03-08 倬韵科技(深圳)有限公司 The method and system of true wireless stereo Bluetooth earphone and the pairing of bluetooth playback equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014204641A1 (en) * 2013-06-21 2014-12-24 Bose Corporation Low energy wireless proximity pairing
CN104038263A (en) * 2014-06-18 2014-09-10 小米科技有限责任公司 Method and device for establishing Bluetooth connection
CN107257516A (en) * 2017-07-17 2017-10-17 湖南海翼电子商务股份有限公司 Wireless headset and its matching method
CN108174459A (en) * 2018-02-08 2018-06-15 深圳市沃特沃德股份有限公司 Wireless audio devices matching method and wireless audio devices
CN109451473A (en) * 2018-10-15 2019-03-08 倬韵科技(深圳)有限公司 The method and system of true wireless stereo Bluetooth earphone and the pairing of bluetooth playback equipment

Also Published As

Publication number Publication date
CN111107667A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN111107667B (en) Bluetooth headset pairing method and device and readable storage medium
CN110582078B (en) Bluetooth pairing method and device, storage medium and electronic equipment
CN106296255B (en) Page information display method and device
CN108279948B (en) Application program starting method and mobile terminal
CN109284144B (en) Fast application processing method and mobile terminal
US20190080120A1 (en) Unlocking methods and related products
CN107251536A (en) A kind of mobile terminal shows the method and mobile terminal of multiple application widgets
US20210349589A1 (en) Image storage method and terminal device
US11250046B2 (en) Image viewing method and mobile terminal
US10463965B2 (en) Control method of scene sound effect and related products
CN109032491B (en) Data processing method and device and mobile terminal
CN109857297B (en) Information processing method and terminal equipment
CN111818499B (en) Quick pairing method, device, equipment and computer readable storage medium
CN106791916B (en) Method, device and system for recommending audio data
CN110096203B (en) Screenshot method and mobile terminal
CN111971985A (en) Earphone pairing method, earphone control method, Bluetooth earphone accommodating device and medium
US11212020B2 (en) FM channel finding and searching method, mobile terminal and storage apparatus
KR20200141702A (en) Electronic device for displaying inquiry list of external electronic device in bluetooth network environment and method thereof
CN108196663B (en) Face recognition method and mobile terminal
JP2012039282A (en) Electronic apparatus, information display program for the same, and information display method for the same
CN110831114A (en) Connection method with wireless device, terminal and readable storage medium
CN109521916B (en) File processing method based on flexible screen, mobile terminal and storage medium
CN107844203B (en) Input method candidate word recommendation method and mobile terminal
CN106294528B (en) Method and device for realizing information transmission
CN109857673B (en) Control identification method and 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
GR01 Patent grant
GR01 Patent grant