CN112449259B - Earphone pairing method and terminal - Google Patents

Earphone pairing method and terminal Download PDF

Info

Publication number
CN112449259B
CN112449259B CN201910823875.4A CN201910823875A CN112449259B CN 112449259 B CN112449259 B CN 112449259B CN 201910823875 A CN201910823875 A CN 201910823875A CN 112449259 B CN112449259 B CN 112449259B
Authority
CN
China
Prior art keywords
earphone
pairing
pairing information
mac address
charging box
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
CN201910823875.4A
Other languages
Chinese (zh)
Other versions
CN112449259A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910823875.4A priority Critical patent/CN112449259B/en
Priority to PCT/CN2020/112991 priority patent/WO2021043160A1/en
Publication of CN112449259A publication Critical patent/CN112449259A/en
Application granted granted Critical
Publication of CN112449259B publication Critical patent/CN112449259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Abstract

The embodiment of the application provides a method and a terminal for pairing earphones, wherein in the method for pairing earphones, a charging box can acquire first pairing information of a left earphone and second pairing information of a right earphone which enter the charging box, and then respectively sends the first pairing information and the second pairing information to an earphone pair, so that the left earphone and the right earphone can be paired with the earphone according to the received pairing information. According to the method for pairing the earphones, the two earphones in the charging box can be paired without triggering the pairing key by a user, and the pairing efficiency is improved. In the embodiment of the application, whether the stored pairing information is paired with the ear is determined by comparing the stored pairing information with the received pairing information, so that the pairing accuracy is improved.

Description

Earphone pairing method and terminal
Technical Field
The embodiment of the application relates to a communication technology, in particular to a method and a terminal for pairing earphones.
Background
The Bluetooth headset comprises a single Bluetooth headset and a double Bluetooth headset. The dual bluetooth headset is generally composed of a left headset and a right headset, and can provide stereo sound effects for a user. Common dual bluetooth headsets are a conventional in-ear bluetooth headset and a True Wireless Stereo (TWS) bluetooth headset. Although the traditional in-ear bluetooth headset omits a connecting line between two headsets and a sound source, the left headset and the right headset still need to be connected through the connecting line to synchronize audio signals. And the TWS Bluetooth earphone not only saves connecting cables between the two earphones and the sound source, but also saves connecting wires between the left earphone and the right earphone. Therefore, the left earphone and the right earphone of the TWS bluetooth earphone need to be connected in a pairing manner first to synchronize the audio signals.
In the prior art, a left earphone and a right earphone of a TWS bluetooth earphone are connected in a pairing manner as follows: the user puts the left earphone and the right earphone of the TWS Bluetooth earphone into the charging box, then presses a pairing key on the charging box, and triggers the left earphone and the right earphone to be paired. However, the method for pairing the earphones needs the user to trigger the pairing key to pair the left earphone and the right earphone, and the pairing efficiency is low.
Disclosure of Invention
The embodiment of the application provides a method and a terminal for pairing earphones, a left earphone and a right earphone in a charging box can be paired without triggering a pairing key by a user, and pairing efficiency can be improved.
In a first aspect, an embodiment of the present application provides a method for pairing earphones, where the method may be applied to a terminal including a left earphone, a right earphone, and a charging box. In the method, when a left earphone and a right earphone are both placed in a charging box and a box cover is not closed, the charging box acquires first pairing information of the left earphone and second pairing information of the right earphone; the charging box sends the first pairing information to the right earphone and the second pairing information to the left earphone; when the left earphone and the right earphone are in the charging box and the box cover is not closed or the box cover is opened, the left earphone is connected with the right earphone in a matched mode according to the second matching information, and the right earphone is connected with the left earphone in a matched mode according to the first matching information.
In the method, a charging box acquires first pairing information of the left earphone and second pairing information of the right earphone, where the first pairing information sent by the left earphone and the second pairing information sent by the right earphone are received by the charging box, the first pairing information is sent when the left earphone detects that the left earphone is plugged into the box, and the second pairing information is sent when the right earphone detects that the right earphone is plugged into the box; alternatively, the first and second electrodes may be,
the charging box acquires the first pairing information of the left earphone and the second pairing information of the right earphone, and may be acquired from the left earphone and the right earphone respectively when the charging box detects that the left earphone and the right earphone are plugged into the charging box.
In the embodiment of the application, the charging box can acquire the first pairing information of the left earphone and the second pairing information of the right earphone, and then sends the first pairing information and the second pairing information to the pair of ears respectively, so that when the left earphone and the right earphone are determined to be paired with the pair of ears according to the received pairing information, the left earphone and the right earphone can be paired when no user triggers a pairing key, and the pairing efficiency is improved.
It can be understood that, for the first aspect, the embodiment of the present application provides a method for pairing earphones, where the charging box sends the first pairing information to the right earphone, and sends the second pairing information to the left earphone. When the box cover is not closed or opened in the charging box, the left earphone can be connected with the right earphone in a matched mode according to second matching information, the right earphone can be connected with the left earphone in a matched mode not according to the first matching information, or the right earphone is connected with the left earphone in a matched mode according to the first matching information, the left earphone can be connected with the right earphone in a matched mode not according to the second matching information, or the left earphone is connected with the right earphone in a matched mode according to the second matching information, and the right earphone is connected with the left earphone in a matched mode according to the first matching information.
In a possible design, before the left earphone and the right earphone are connected in a pairing manner, the left earphone judges whether to connect in a pairing manner according to the second pairing information and the right earphone according to the first pairing information.
In this design, the charging box sends the first pairing information to the right earphone and the second pairing information to the left earphone. If the left earphone determines that the pairing information is not stored in the left earphone or the pairing information stored in the left earphone is different from the second pairing information; and if the right earphone determines that the right earphone does not store the pairing information or the pairing information stored in the right earphone is different from the first pairing information, the left earphone and the right earphone determine to be connected in a pairing mode.
If the left earphone determines that the pairing information stored in the left earphone is the same as the second pairing information; and the right earphone determines that the pairing information stored in the right earphone is the same as the first pairing information, and the left earphone and the right earphone are not connected in a pairing mode.
In one possible design, before the left earphone and the right earphone are connected in a pairing mode, the charging box judges whether the left earphone and the right earphone are connected in a pairing mode or not according to the first pairing information and the second pairing information.
In this design, after acquiring first pairing information of a left earphone and second pairing information of a right earphone, if the charging box determines that the first pairing information does not carry pairing information stored in the left earphone, or the first pairing information carries pairing information stored in the left earphone but the pairing information stored in the left earphone is different from the second pairing information; and the number of the first and second groups,
and the charging box determines that the second pairing information does not carry pairing information stored in the right earphone, or the second pairing information carries pairing information stored in the right earphone but the pairing information stored in the right earphone is different from the first pairing information, and then the charging box determines that the left earphone and the right earphone are connected in a pairing mode.
If the charging box determines that the first pairing information carries the pairing information stored in the left earphone and the pairing information stored in the left earphone is the same as the second pairing information; and if the second pairing information carries the pairing information stored in the right earphone and the pairing information stored in the right earphone is the same as the first pairing information, the charging box determines that the left earphone and the right earphone are not in pairing connection, and correspondingly, the charging box does not send the first pairing information to the right earphone and does not send the second pairing information to the left earphone.
In the two designs, whether the left earphone and the right earphone are connected in a matched mode or not can be judged through the left earphone and the right earphone or through the charging box, when the left earphone and the right earphone are determined to be connected in a matched mode, the left earphone and the right earphone can execute the step of connected in a matched mode, and therefore the purpose that the left earphone and the right earphone are matched can be achieved without triggering a matching key by a user can be achieved.
In the two designs, whether the left earphone and the right earphone are connected in a pairing mode is judged through the left earphone and the right earphone or through the charging box, and the parameters included in the first pairing information and the second pairing information are determined.
In one possible design, the first pairing information includes a MAC address of the left headset and the second pairing information includes a MAC address of the right headset. In the design, whether the left earphone and the right earphone are connected in a matched mode or not can be judged through the left earphone and the right earphone.
In one possible design, the first pairing information includes a MAC address of the left headset and pairing information stored in the left headset, and the second pairing information includes a MAC address of the right headset and pairing information stored in the right headset. It can be understood that, if the left earphone and the right earphone are not paired before being placed in the charging box, the first pairing information does not carry the pairing information stored in the left earphone, and correspondingly, the second pairing information does not carry the pairing information stored in the right earphone. In this kind of design, can judge whether pair connection is carried out to left earphone and right earphone through the box that charges.
It is to be understood that the pairing information stored in the left earphone described above includes the MAC address of the earphone paired with the left earphone, and the pairing information stored in the right earphone includes the MAC address of the earphone paired with the right earphone. The pairing information stored in the left headset and the second pairing information in the above description are different as follows: the MAC address of the pairing information stored in the left earphone is different from the MAC address of the second pairing information, and the pairing information stored in the right earphone is different from the first pairing information: the MAC address of the pairing information stored in the right earphone is different from the MAC address of the first pairing information.
Correspondingly, the pairing information stored in the left earphone is the same as the second pairing information: the MAC address of the pairing information stored in the left earphone is the same as the MAC address of the second pairing information, and the pairing information stored in the right earphone is the same as the first pairing information: the MAC address of the pairing information stored in the right earphone is the same as the MAC address of the first pairing information.
In the above design, whether the left earphone and the right earphone are connected in a paired manner or not can be determined by the left earphone and the right earphone or the charging box according to the parameters carried in the first pairing information and the second pairing information. When the charging box judges whether the left earphone and the right earphone are in pairing connection or not, if the left earphone and the right earphone are not in pairing connection, the charging box can not send second pairing information and first pairing information to the left earphone and the right earphone, and signaling overhead can be reduced.
In one possible design, the first pairing information includes a model of the left headset and the second pairing information includes a model of the right headset. In this case, before the charging box transmits the first pairing information to the right earphone and the second pairing information to the left earphone, the method further includes: and the charging box determines that the model of the left earphone is the same as the model of the right earphone.
In the design, the charging box sends the pairing information of the left earphone and the right earphone to the left earphone and the right earphone under the condition that the models of the left earphone and the right earphone are the same, so that the left earphone and the right earphone can be successfully paired, and the problem of incompatibility caused by different models in the actual use process after the left earphone and the right earphone are successfully paired is avoided.
In the first aspect and the possible designs described above, when it is determined that the left earphone and the right earphone are paired and connected, the left earphone and the right earphone may be paired and connected by the following two possible designs.
In one possible design, the MAC address of the right earphone in the second pairing information is written by the left earphone, and the MAC address of the left earphone in the first pairing information is written by the right earphone. The writing of the MAC address of the right earphone in the second pairing information by the left earphone means that the MAC address of the right earphone is stored by the left earphone, and the MAC address in the pairing information that has been stored before is deleted. And the MAC address of the left earphone written into the first pairing information by the right earphone is also the same.
After a left headset writes in the MAC address of the right headset in the second pairing information, and the right headset writes in the MAC address of the left headset in the first pairing information, a first pairing request and a second pairing request may be broadcast by the left headset, where the first pairing request includes the MAC address of the left headset, and the second pairing request includes the MAC address of the right headset.
Correspondingly, the left earphone receives the second pairing request and sends first pairing response information to the right earphone, and the right earphone receives the first pairing request and sends second pairing response information to the left earphone; wherein the first pairing response information is used for indicating that the left earphone agrees to pairing, and the second pairing response information is used for indicating that the right earphone agrees to pairing. And after the left earphone receives the second pairing response information and the right earphone receives the first pairing response information, the fact that the left earphone and the right earphone are successfully paired and connected is shown.
In another possible design, after the left headset writes the MAC address of the right headset in the second pairing information and the right headset writes the MAC address of the left headset in the first pairing information, when the left headset and the right headset are in a charging box and the box cover is not closed or the box cover is opened, a master headset broadcasts a pairing request, the pairing request includes the MAC address of the master headset, and the master headset is a left headset or a right headset; and receiving the pairing request from the slave earphone, and sending pairing response information to the master earphone, wherein the pairing response information is used for indicating that the slave earphone agrees to pairing. And when the main earphone receives the pairing response information, the main earphone indicates that the pairing connection between the left earphone and the right earphone is completed.
Optionally, the master earphone is a left earphone which is written into the MAC address in the second pairing information first, or a right earphone which is written into the MAC address in the first pairing information first, or a preset earphone.
In both designs, the left and right earphones can be paired with the opposing ear. In the first design, the left earphone and the right earphone both initiate a broadcast requesting a pairing connection, and the left earphone and the right earphone both respond to the broadcast and complete the pairing connection. The second design is a broadcast initiated by one earphone (i.e. the master earphone) requesting the pairing connection, and the pairing connection is completed after receiving the response from the earphone, compared with the first design, so that the signaling interaction can be reduced.
In a second aspect, an embodiment of the present application provides a method for pairing earphones, including:
when the left earphone and the right earphone are placed in the charging box and the box cover is not closed, the charging box acquires first pairing information of the left earphone and second pairing information of the right earphone; the charging box sends the first pairing information to the right earphone, and sends the second pairing information to the left earphone, so that when the left earphone and the right earphone are in the charging box, the box cover is not closed or the box cover is opened, the left earphone is in pairing connection with the right earphone according to the second pairing information, and the right earphone is in pairing connection with the left earphone according to the first pairing information.
In one possible design, the first pairing information includes a model of the left headset, and the second pairing information includes a model of the right headset; before the charging box sends the first pairing information to the right earphone and sends the second pairing information to the left earphone, the method further includes:
and the charging box determines that the model of the left earphone is the same as the model of the right earphone.
In one possible design, before the charging box sends the first pairing information to the right earphone and the second pairing information to the left earphone, the method further includes: the charging box determines that the first pairing information does not carry pairing information stored in the left earphone, or the first pairing information carries pairing information stored in the left earphone, but the pairing information stored in the left earphone is different from the second pairing information; and the number of the first and second groups,
the charging box determines that the second pairing information does not carry pairing information stored in the right earphone, or the second pairing information carries pairing information stored in the right earphone, but the pairing information stored in the right earphone is different from the first pairing information.
In one possible design, the method further includes: if the charging box determines that the first pairing information carries the pairing information stored in the left earphone and the pairing information stored in the left earphone is the same as the second pairing information; and the second pairing information carries the pairing information stored in the right earphone, and the pairing information stored in the right earphone is the same as the first pairing information, the charging box determines not to send the first pairing information to the right earphone and not to send the second pairing information to the left earphone.
In one possible design, the first pairing information includes a MAC address of the left headset, the second pairing information includes a MAC address of the right headset, the pairing information stored in the left headset includes a MAC address of a headset paired with the left headset, and the pairing information stored in the right headset includes a MAC address of a headset paired with the right headset;
the pairing information stored in the left earphone is different from the second pairing information in that: the MAC address of the pairing information stored in the left earphone is different from the MAC address of the second pairing information, and the pairing information stored in the right earphone is different from the first pairing information: and the MAC address of the pairing information stored in the right earphone is different from the MAC address of the first pairing information.
In one possible design, the obtaining, by the charging box, first pairing information of the left headset and second pairing information of the right headset includes: the charging box receives the first pairing information sent by the left earphone and the second pairing information sent by the right earphone, wherein the first pairing information is sent when the left earphone detects that the left earphone is put into the charging box, and the second pairing information is sent when the right earphone detects that the right earphone is put into the charging box.
The beneficial effects of the method for pairing earphones provided by the second aspect of the embodiment of the present application may refer to the beneficial effects brought by the first aspect and the designs, which are not described herein again.
A third aspect of embodiments of the present application provides a method for pairing earphones, including:
the earphone receives the pairing information of the ears sent by the charging box; and the earphone is connected with the pair of ears in a pairing mode according to the pairing information.
In one possible design, the pairing information includes a model of the pair of ears, and the pairing information of the pair of ears is sent after the charging box determines that the model of the headset and the model of the pair of ears are the same.
In a possible design, before the earphone performs the pairing connection with the pair of ears according to the pairing information, the earphone further includes: the headset determines that no pairing information is stored in the headset or that the stored pairing information in the headset is different from the pairing information for the ears.
In one possible design, the pairing information for the ear is: the charging box determines that pairing information sent by the earphone does not carry pairing information stored in the earphone, or pairing information sent by the earphone carries pairing information stored in the earphone, but the pairing information stored in the earphone is different from the pairing information of the pair of ears; and the charging box determines that the pairing information sent by the pair of ears does not carry the pairing information stored in the pair of ears, or the pairing information sent by the pair of ears carries the pairing information stored in the pair of ears but is sent after the pairing information stored in the pair of ears is different from the pairing information of the earphone.
In one possible design, the sent pairing information of the headset includes a MAC address of the headset, the pairing information of the pair of ears includes the pairing information of the pair of ears, the pairing information stored in the headset includes a MAC address of the headset paired with the headset, and the pairing information stored in the pair of ears includes a MAC address of the headset paired with the pair of ears;
the pairing information stored in the headset is different from the pairing information of the pair of ears: the MAC address of the pairing information stored in the earphone is different from the MAC address of the pairing information of the pair of ears; the pairing information stored in the pair of ears is different from the pairing information of the earphone: the MAC address of the pairing information stored in the pair of ears is different from the MAC address of the pairing information of the headset.
In one possible design, the headset performs pairing connection with the pair of ears according to the pairing information, including:
the earphone writes the MAC address of the pair of ears in the pairing information of the pair of ears; when the earphone and the counter ear are in a charging box and a box cover is not closed or the box cover is opened, the earphone broadcasts a pairing request, wherein the pairing request comprises the MAC address of the earphone; and receiving pairing response information sent by the pair of ears, wherein the pairing response information is used for indicating that the pair of ears agree to pairing.
In a possible design, before the earphone receives pairing information of the ear sent by the charging box, the earphone further includes:
when the earphone detects that the earphone enters the box, the pairing information of the earphone is sent to the charging box, and when the paired ears detect that the paired ears enter the box, the pairing information of the paired ears is sent to the charging box.
The beneficial effects of the method for pairing earphones provided by the third aspect of the embodiment of the present application may refer to the beneficial effects brought by the first aspect and the respective designs, which are not described herein again.
A fourth aspect of the embodiments of the present application provides a terminal, including: a charging box, a left earphone and a right earphone;
the charging box is used for acquiring first pairing information of the left earphone and second pairing information of the right earphone when the left earphone and the right earphone are not closed; the charging box is used for sending the first pairing information to the right earphone and sending the second pairing information to the left earphone; when the left earphone and the right earphone are placed in the box and the box cover is not closed or the box cover is opened, the left earphone is connected with the right earphone in a matched mode according to the second matching information, and the right earphone is connected with the left earphone in a matched mode according to the first matching information.
In one possible design, the first pairing information includes a model of the left headset and the second pairing information includes a model of the right headset; the charging box is further configured to determine that the model of the left earphone is the same as the model of the right earphone before the first pairing information is sent to the right earphone and the second pairing information is sent to the left earphone.
In one possible design, before the left earphone is configured to be coupled to the right earphone according to the second pairing information and the right earphone is configured to be coupled to the left earphone according to the first pairing information, the left earphone is further configured to determine that no pairing information is stored in the left earphone or that pairing information stored in the left earphone is different from the second pairing information, and the right earphone is further configured to determine that no pairing information is stored in the right earphone or that pairing information stored in the right earphone is different from the first pairing information.
In a possible design, before the charging box is configured to send the first pairing information to the right earphone and send the second pairing information to the left earphone, the charging box is further configured to determine that the first pairing information does not carry pairing information stored in the left earphone, or that the first pairing information carries pairing information stored in the left earphone but the pairing information stored in the left earphone is different from the second pairing information; and the number of the first and second groups,
the charging box is further configured to determine that the second pairing information does not carry pairing information that has been stored in the right earphone, or that the second pairing information carries pairing information that has been stored in the right earphone but the pairing information that has been stored in the right earphone is different from the first pairing information.
In one possible design, the first pairing information includes a MAC address of the left headset, the second pairing information includes a MAC address of the right headset, the pairing information stored in the left headset includes a MAC address of a headset paired with the left headset, and the pairing information stored in the right headset includes a MAC address of a headset paired with the right headset;
the pairing information stored in the left earphone is different from the second pairing information in that: the MAC address of the pairing information stored in the left earphone is different from the MAC address of the second pairing information, and the pairing information stored in the right earphone is different from the first pairing information: the MAC address of the pairing information stored in the right earphone is different from the MAC address of the first pairing information.
In one possible design, the left earphone is specifically configured to write the MAC address of the right earphone in the second pairing information, and the right earphone is specifically configured to write the MAC address of the left earphone in the first pairing information;
when the left earphone and the right earphone are in a charging box and the box cover is not closed or the box cover is opened, the left earphone is further used for broadcasting a first pairing request, and the right earphone is further used for broadcasting a second pairing request, wherein the first pairing request comprises the MAC address of the left earphone, and the second pairing request comprises the MAC address of the right earphone.
The left earphone is further configured to receive the second pairing request and send first pairing response information to the right earphone, and the right earphone is further configured to receive the first pairing request and send second pairing response information to the left earphone; wherein the first pairing response information is used for indicating that the left earphone agrees to pairing, and the second pairing response information is used for indicating that the right earphone agrees to pairing.
In a possible design, the left earpiece is further configured to write a MAC address in the second pairing information, and the right earpiece is further configured to write a MAC address in the first pairing information.
When the left earphone and the right earphone are in a charging box and the box cover is not closed or the box cover is opened, the main earphone is used for broadcasting a pairing request, the pairing request comprises an MAC (media access control) address of the main earphone, and the main earphone is the left earphone or the right earphone; and the slave earphone is used for receiving the pairing request and sending pairing response information to the master earphone, and the pairing response information is used for indicating that the slave earphone agrees to pairing.
In a possible design, the master earphone is a left earphone written with the MAC address in the second pairing information first, or a right earphone written with the MAC address in the first pairing information first, or a preset earphone.
In a possible design, the charging box is specifically configured to receive the first pairing information sent by the left earphone and the second pairing information sent by the right earphone, where the first pairing information is sent when the left earphone detects that the left earphone is plugged into the box, and the second pairing information is sent when the right earphone detects that the right earphone is plugged into the box.
In one possible design, the first pairing information includes at least one of a MAC address of the left headset, a model of the left headset, pairing information already stored in the left headset; the second pairing information includes at least one of a MAC address of the right headphone, a model of the right headphone, and pairing information already stored in the right headphone.
In one possible design, the charging box is also used to charge the left earphone and the right earphone when the left earphone and the right earphone are boxed and closed.
In one possible design, the left earpiece and the right earpiece are wireless bluetooth earpieces.
The beneficial effects of the terminal provided by the fourth aspect of the embodiment of the present application can be seen in the beneficial effects of the first aspect and the designs, which are not described herein again.
A fifth aspect of embodiments of the present application provides an apparatus for pairing earphones, the apparatus for pairing earphones comprising: a processor, a memory, a transceiver; the transceiver is coupled to the processor, and the processor controls transceiving action of the transceiver;
wherein the memory is configured to store computer-executable program code, the program code comprising instructions; the instructions, when executed by the processor, cause the apparatus of headset pairing to perform the method of headset pairing as provided by the first, second or third aspect.
A sixth aspect of embodiments of the present application provides an apparatus for headset pairing, comprising means, module or circuitry for performing the method provided in the first, second or third aspect above.
A seventh aspect of embodiments of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first, second or third aspect described above.
An eighth aspect of the embodiment of the present application provides a method for pairing earphones, where when a left earphone and a right earphone are both placed in a charging box and a box cover is not closed, the charging box acquires first pairing information of the left earphone and second pairing information of the right earphone; the charging box sends the first pairing information to the right earphone and the second pairing information to the left earphone; when the left earphone and the right earphone are in the charging box and the box cover is not closed or the box cover is opened, a main earphone broadcasts a pairing request, wherein the pairing request comprises pairing information of the main earphone, and the main earphone is one of the left earphone and the right earphone; and receiving the pairing request by the slave earphone, and sending pairing response information to the master earphone, wherein the pairing response information is used for indicating that the slave earphone agrees to pairing, and the slave earphone is the other earphone of the left earphone and the right earphone.
Wherein the first pairing information includes a MAC address of the left headset, and the second pairing information includes a MAC address of the right headset.
The pairing information of the master earphone comprises the MAC address of the master earphone.
The main earphone can be a preset earphone. For example, the earphone first taken out of the charging box may be set as the main earphone.
It can be seen from the above that, the charging box is put into both the left earphone and the right earphone, and when the box cover is not closed, the charging box can acquire the first pairing information of the left earphone and the second pairing information of the right earphone, and the charging box sends the first pairing information to the right earphone, and sends the second pairing information to the left earphone. When the box cover is closed, the charging box can charge the left earphone and the right earphone, when the box cover is opened, the main earphone can broadcast the pairing request, and after receiving the pairing request, the auxiliary earphone can send pairing response information to the main earphone.
It can be understood that the charging box sends the first pairing information to the right earphone, and the charging box sends the second pairing information to the left earphone, which may occur when the box cover is not closed. The left earphone and the right earphone can be charged by the charging box when the box cover is closed, the right earphone and the left earphone are charged by the charging box when the box cover is opened, the first pairing information is sent to the right earphone by the charging box, and the second pairing information is sent to the left earphone by the charging box. The charging box can also send the first pairing information to the right earphone and send the second pairing information to the left earphone in the process of charging the left earphone and the right earphone by the charging box.
The embodiment of the application provides a method and a terminal for pairing earphones, in the method for pairing earphones, a charging box can acquire first pairing information of a left earphone and second pairing information of a right earphone which enter the charging box, and then the first pairing information and the second pairing information are respectively sent to the opposite ears, so that the left earphone and the right earphone can be paired with the opposite ears according to the received pairing information, and the left earphone and the right earphone are paired. According to the method for pairing the earphones, the two earphones in the charging box can be paired without triggering the pairing key by a user, and the pairing efficiency is improved. In the embodiment of the application, whether the stored pairing information is paired with the ear is determined by comparing the stored pairing information with the received pairing information, so that the pairing accuracy is improved.
Drawings
Fig. 1 is a schematic view of a scene in which the method for pairing earphones provided by the embodiment of the present application is applicable;
fig. 2 is a first schematic view illustrating connection between a charging box and an earphone according to an embodiment of the present disclosure;
fig. 3 is a second schematic view illustrating connection between a charging box and an earphone according to an embodiment of the present disclosure;
fig. 4 is an interaction diagram of a method for pairing earphones according to a first embodiment of the present application;
fig. 5 is an interaction diagram of a method for pairing earphones according to a second embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an apparatus for pairing earphones according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method for pairing earphones, wherein when a left earphone and a right earphone are put into a box (namely placed in a charging box), the charging box can acquire pairing information of the left earphone and the right earphone. The charging box can respectively send the pairing information of the left earphone and the pairing information of the right earphone to the left earphone (the left earphone is the right earphone, and similarly, the right earphone is the left earphone) so that the left earphone and the right earphone can acquire the pairing information of the left earphone and the right earphone in the charging box. The left earphone and the right earphone can be paired with the pair of ears according to the pairing information of the pair of ears when pairing, the purpose of pairing the left earphone and the right earphone can be achieved without the need of triggering of a user, and the pairing efficiency is improved.
The method for pairing the earphones in the embodiment of the application can be suitable for scenes that the left earphones and the right earphones are not paired, and can also be suitable for scenes that at least one of the left earphones or the right earphones is paired. For example, the left earphone and the right earphone may be newly purchased earphones by the user, and the scene is a scene in which neither the left earphone nor the right earphone is paired. Or, the user has two earphones, wherein the left earphone and the right earphone are paired, the left earphone is lost by one earphone, the right earphone is lost by the other earphone, the left earphone and the right earphone belonging to different pairs are paired, and the scene can be understood as a scene in which the left earphone and the right earphone are paired. Or, if the left earphone in one earphone of the user is lost and a new left earphone is purchased, the scene is a scene in which the right earphone is paired and the left earphone is not paired.
In the embodiment of the application, when the left earphone and the right earphone are paired, the left earphone and the right earphone can be placed in the charging box. When the charging box or the earphones (including the left earphones and the right earphones) detect that the earphones enter the charging box, the charging box can acquire pairing information of the earphones, and the charging box can send the pairing information of the earphones to the left earphones and the right earphones so that the left earphones and the right earphones can be paired according to the pairing information of the earphones.
After the earphone is paired, the paired information of the paired ears can be stored. It should be understood that if the left earphone and the right earphone are not paired, the pairing information of the paired earphones is not stored in the left earphone and the right earphone. And if the left earphone and the right earphone are matched, the matching information of the matched earphones is stored in the left earphone and the right earphone. In the embodiment of the application, after the left earphone and the right earphone acquire the pairing information of the pair of ears sent by the charging box, whether the pairing information of the pair of ears is stored in the left earphone and the right earphone can be judged. If the pairing information of the paired ears is stored, the paired ears in the charging box are determined to be the earphones paired with the paired ears, and the pairing is not performed. And if the pairing information of the ears is not stored, pairing is carried out according to the pairing information of the ears. It should be understood that pairing the left earphone and the right earphone in the embodiments of the present application refers to: the left earphone and the right earphone respectively store the pairing information of the pair of ears in the charging box and initiate the pairing connection with the pair of ears.
In one possible scenario, if the left and right earphones are detected to be plugged into the box, the charging box detects that the charging box is not closed (i.e., the cover of the charging box is not closed). In this scenario, if the left earphone and the right earphone are determined to be paired with the pair of ears, the pairing information of the pair of ears is respectively stored, and the pairing connection with the pair of ears is initiated, so that the left earphone and the right earphone are connected. At this time, the user takes the left and right earphones out of the charging box to use them directly. The initiating of the pairing connection with the opposite ear may be initiating of the pairing connection with the opposite ear by both the left earphone and the right earphone, or initiating of the pairing connection with the opposite ear by the left earphone or the right earphone. The mode that the box detection that charges was closed lid or was uncapped in this application embodiment can be: a switch cover detection switch is arranged on the charging box, and the opening or closing of the charging box is detected by the switch cover detection switch. The switch cover detection switch can be a Hall switch or a mechanical switch and the like.
On the basis of the scene, after the left earphone and the right earphone are connected with the opposite ears, if the charging box detects that the cover is closed, the left earphone and the right earphone enter a dormant state, and the left earphone and the right earphone are disconnected. When the charging box detects that the charging box is opened, the left earphone and the right earphone are connected with the opposite ears in a pairing mode, so that the left earphone and the right earphone are connected.
In yet another possible scenario, if it is detected that the left earphone and the right earphone are plugged into the box, the charging box detects that the charging box is closed. At this time, the left earphone and the right earphone enter a sleep state, and connection between the left earphone and the right earphone is not established. And in the period from the closing of the charging box to the time when the left earphone and the right earphone enter the dormant state, the left earphone and the right earphone can be communicated with the charging box, and if the left earphone and the right earphone are determined to be paired with the pair of ears, the pairing information of the pair of ears is respectively stored. When the charging box detects that the charging box is opened, the left earphone and the right earphone are connected with the opposite ears in a pairing mode, so that the left earphone and the right earphone are connected.
The method for pairing the earphones can be suitable for pairing the left earphone and the right earphone of a TWS (true Wireless stereo) Bluetooth earphone, and can also be suitable for pairing the left ear handle and the right ear handle of a Bluetooth glasses with the left ear handle, the right ear handle and a charging box. For the method for pairing the earphones of the left and right ear stems in the bluetooth glasses with the left and right ear stems and the charging box, reference may be made to the following description of the method for pairing the earphones between the left and right earphones.
Fig. 1 is a scene schematic diagram of an application of the method for pairing earphones provided by the embodiment of the present application. Fig. 1 illustrates an example of an applicable scenario in which a left headset and a right headset of a TWS bluetooth headset are paired. The scene includes a left earphone 10, a right earphone 20 and a charging box 30. It should be understood that fig. 1 illustrates the left earphone 10 and the right earphone 20 disposed outside the charging box 30 for clarity of the interaction between the left earphone 10, the right earphone 20, and the charging box 30. Wherein, the left earphone 10 and the right earphone 20 are placed in the charging box 30 during the interaction of the left earphone 10, the right earphone 20 and the charging box 30 when the left earphone 10 and the right earphone 20 are located in the charging box 30. As shown in fig. 1, a receiving cavity (a dotted line portion in fig. 1) for placing the earphone is provided in the charging box 30, and the left earphone 10 and the right earphone 20 are placed in the receiving cavity of the charging box.
When the left earphone 10 and the right earphone 20 are placed in the charging box, the left earphone 10 and the right earphone 20 may respectively communicate with the charging box 30 to enable the charging box 30 to acquire pairing information of the left earphone 10 and the right earphone 20. The manner in which the left earphone 10 and the right earphone 20 communicate with the charging box 30 may be contact communication or wireless communication.
Fig. 2 is a first schematic view illustrating connection between a charging box and an earphone according to an embodiment of the present application. Fig. 2 illustrates an example of contact communication between the charging box and the headset. As shown in fig. 2, the left earphone 10 of the TWS bluetooth headset includes a processor 11, a transceiver 12 and a memory 13 therein, the right earphone 20 includes a processor 21, a transceiver 22 and a memory 23 therein, and the charging box 30 includes: a processor 31 and a transceiver 32.
Wherein, the memory 13 and the transceiver 12 in the left earphone are connected with the processor 11, the memory 23 and the transceiver 21 in the right earphone are connected with the processor 22, and the processor 31 and the transceiver 31 in the charging box are connected. It should be understood that when contact communication is used between the charging box and the earphones, the transceivers in the left earphone, the right earphone and the charging box may be communication interfaces respectively disposed on the left earphone, the right earphone and the charging box. Illustratively, the communication interface may be a pin as shown in FIG. 2.
In fig. 2, the transceiver 32 of the charging box 30 is shown to include 4 pins, taking the charging box as an example. The pin 1 and the pin 3 are respectively positive pins connected with the left earphone and the right earphone, and the pin 2 and the pin 4 are negative pins. Similarly, pin 1 'in the transceiver 12 of the left earphone 10 is a positive electrode pin connected to pin 1 in the charging box 30, and pin 2' is a negative electrode pin. Pin 3 'in the transceiver 12 of the right earphone 10 is a positive pin connected to pin 3 in the charging box 30, and pin 4' is a negative pin.
When the left earphone 10 and the right earphone 20 are placed in the charging box 30, the pin 1 'is connected to the pin 1, the pin 2' is connected to the pin 2, the pin 3 'is connected to the pin 3, and the pin 4' is connected to the pin 4. At this time, contact communication connection is achieved between the left earphone 10, the right earphone 20, and the charging box 30.
Taking the left earphone 10 as an example, the memory 13 in the left earphone 10 is used for storing pairing information of paired ears. The pairing information of the paired pair of ears may be: pairing information of paired ears, or pairing information of an ear to be paired. In one implementation, the memory of the left earphone 10 stores the location of the pairing information of the paired pair of ears, which may be predetermined in advance. For example, the pairing information of the paired ears can be stored in a file named userdata in the memory.
A processor 11 in the left earphone 10, configured to determine whether to pair with the right earphone 20 according to the received pairing information for the ear. If the pairing information is not stored in the memory 13 of the left earphone 10 or if the stored pairing information is different from the received pairing information of the right earphone 20, it is determined to be paired with the right earphone 20. The processor 11 in the left earphone 10 can also be used to detect whether the left earphone 10 is in the box (the specific detection method is described in detail below).
The transceiver 12 in the left earphone 10 may be configured to, when the processor 11 detects that the left earphone 10 is plugged into the charging box, send its pairing information to the charging box 30, so that the charging box 30 obtains the pairing information of the left earphone 10, and also be configured to receive the pairing information of the right earphone 20 sent by the charging box 30.
Similarly, the functions of the transceiver 22, the memory 23 and the processor 21 in the right earphone 20 may be the same as the functions of the transceiver 12, the memory 13 and the processor 11 in the left earphone 10 described above.
The transceiver 32 in the charging box 30 is configured to receive the pairing information of the left earphone 10 sent by the left earphone 10, the pairing information of the right earphone 20 sent by the right earphone 20, and send the pairing information of the pair of ears to the left earphone 10 and the right earphone 20, respectively (i.e., send the pairing information of the left earphone 10 to the right earphone 20, and send the pairing information of the right earphone 20 to the left earphone 10).
In one implementation, the processor 31 in the charging box 30 may further obtain pairing information of the left earphone 10 and the right earphone 20 in the left earphone 10 and the right earphone 20, respectively, through the communication interface. In one implementation, the processor 31 in the charging box 30 may also be used to detect whether the left earphone 10 and the right earphone 20 are in the box (the specific detection is described in detail below).
The charging box 30 may further include a memory 33.
A memory 33 in the charging box 30 for storing pairing information of the left earphone 10 and pairing information of the right earphone 20.
The memory 13, the memory 23, and the memory 33 in this embodiment may include a random-access memory (RAM), and may also include a non-volatile memory (NVM), for example, at least one disk memory, and various instructions may be stored in the memory 13, the memory 23, and the memory 33 to complete various processing functions and implement the method steps in this embodiment.
Fig. 3 is a second schematic diagram of connection between a charging box and an earphone provided in the embodiment of the present application. Fig. 2 illustrates a connection structure for contact communication between the charging box and the earphone, and fig. 3 is a flowchart illustrating a connection structure for wireless communication between the charging box and the earphone according to an embodiment of the present invention.
It is to be understood that the structures and functions of the left earphone 10, the right earphone 20, and the charging box 30 shown in fig. 3 may be the same as those in fig. 2. In contrast, wireless communication is shown between the left earphone 10, the right earphone 20, and the charging box 30 in fig. 3. Wherein, the transceivers in the left earphone 10, the right earphone 20 and the charging box 30 may be: the transceiver circuit or the communication module may also be a transceiver. In one implementation, the transceiver may be a transceiver chip. The transceiver may also include a transmitting module and/or a receiving module.
For the charging box, the left earphone and the right earphone shown in fig. 2 and fig. 3, the following describes in detail the manner that the charging box detects whether the left earphone and the right earphone enter the box or not, and the left earphone and the right earphone detect whether the left earphone and the right earphone enter the box or not, in combination with three possible implementations, so as to facilitate understanding of the following embodiments.
A first possible implementation may be applicable to whether the charging box detects that left and right earphones enter the box, and whether left and right earphones detect themselves into the box:
taking the charging box as an example, when the pin 1 and the pin 1' are not connected, the voltage value between the pin 1 and the pin 2 is 0V. When the left earphone is put into the box and pin 1 is connected with pin 1', the voltage value between pin 1 and pin 2 is xV, wherein x is larger than 0. Accordingly, the processor in the charging box can determine whether the left and right earphones are in the box by detecting the voltage value between pin 1 and pin 2, and the voltage value between pin 3 and pin 4. When the left earphone and the right earphone are not put into the box, the voltage value between the pin 1 and the pin 2 is 0V, and the voltage value between the pin 3 and the pin 4 is also 0V. When the left earphone and the right earphone are put into the box, the voltage value between the pin 1 and the pin 2 is xV, and the voltage value between the pin 3 and the pin 4 is also xV.
Similarly, the left earphone may also detect the voltage value between the pin 1 and the pin 2 in the same manner as the charging box, and the right earphone may determine whether to enter the box itself in a manner of detecting the voltage value between the pin 3 and the pin 4.
A second possible implementation may be applicable to the charging box detecting whether the left and right earphones enter the box:
an infrared sensor may be disposed in the receiving cavity of the charging box in which the left and right earphones are placed. Taking the left earphone as an example, when the left earphone is not placed in the accommodating cavity, infrared light radiated by the infrared sensor in the accommodating cavity is not reflected back by the left earphone, and at this time, the infrared sensor can feed back a low level value to the processor in the charging box. When the left earphone is placed in the accommodating cavity, infrared light radiated by the infrared sensor in the accommodating cavity is reflected back by the left earphone, and at the moment, the infrared sensor can feed back a high-level value to the processor in the charging box.
Accordingly, the processor in the charging box can determine whether the left earphone and the right earphone are plugged into the box through the level value returned by the infrared sensor. It should be understood that when the left and right earphones are not boxed, the level value returned by the infrared sensor is a low level value. When the left earphone and the right earphone are put into the box, the level value returned by the infrared sensor is a high level value.
A third possible implementation may be applicable to left and right earphones detecting whether they are boxed:
the left earphone and the right earphone are both provided with Hall sensors which are magnetic field sensors manufactured according to Hall effect. Correspondingly, a magnet (including a cover closing magnet, an earphone speaker magnet and an earphone adsorption magnet) is arranged in the accommodating cavity of the charging box. Taking the left earphone as an example, when the left earphone is placed in the accommodating cavity, a superposed magnetic field is formed by the hall sensor on the left earphone and the magnet in the accommodating cavity, and a hall effect is triggered to generate a hall current.
Accordingly, the processor in the headset can determine whether the headset is docked by detecting the hall current. Taking the left earphone as an example, when the left earphone is not put into the box, the hall sensor on the left earphone does not magnetically attract the magnet in the accommodating cavity to generate a hall current, and the processor in the left earphone does not detect the hall current to determine that the left earphone is not put into the box. When the left earphone is placed into the box, the Hall sensor on the left earphone and the magnet in the accommodating cavity are magnetically attracted to generate Hall current, and the processor in the left earphone does not detect the Hall current to determine that the left earphone is placed into the box.
Similarly, the processor in the right earpiece may determine whether the earpiece is docked by detecting hall current.
The following describes a method for pairing earphones provided in the embodiment of the present application in terms of interaction between the left earphone, the right earphone and the charging box, in conjunction with a specific embodiment. It should be understood that the method for pairing earphones in the embodiment of the present application is exemplified in a scene where "the left earphone and the right earphone enter the box, and the charging box detects that the cover is not closed".
Fig. 4 is an interaction diagram of a method for pairing earphones according to a first embodiment of the present application. As shown in fig. 4, a method for pairing earphones provided by an embodiment of the present application may include:
s401, when the left earphone and the right earphone are placed into the charging box and the box cover is not closed, the charging box acquires first pairing information of the left earphone and second pairing information of the right earphone, wherein the first pairing information comprises an MAC (media access control) address of the left earphone, and the second pairing information comprises an MAC address of the right earphone.
S402, the charging box sends the first pairing information to the right earphone.
And S403, the charging box sends the second pairing information to the left earphone.
And S404, if the left earphone is determined to be paired according to the second pairing information and the right earphone is determined to be paired according to the first pairing information, writing the MAC address of the right earphone into the left earphone by the left earphone and writing the MAC address of the left earphone into the right earphone by the right earphone.
And S405, carrying out pairing connection on the left earphone and the right earphone.
One possible implementation manner of the charging box in S401 acquiring the first pairing information of the left earphone and the second pairing information of the right earphone is as follows: when the charging box detects that the left earphone and the right earphone are both put into the box and the box cover is not closed, the charging box acquires first pairing information from the left earphone and second pairing information from the right earphone respectively.
Another possible implementation manner of the charging box in S401 acquiring the first pairing information of the left earphone and the second pairing information of the right earphone is as follows: if the left earphone detects that the left earphone enters the box and the right earphone detects that the right earphone enters the box, the left earphone sends first pairing information to the charging box and the right earphone sends second pairing information to the charging box, so that the charging box acquires the first pairing information of the left earphone and the second pairing information of the right earphone.
In S401, the charging box detects that the left earphone and the right earphone are both plugged into the charging box, and obtains first pairing information from the left earphone and second pairing information from the right earphone, respectively. Optionally, in this embodiment of the application, the charging box may query and acquire the first pairing information and the second pairing information in the left earphone and the right earphone, respectively. Or if the left earphone and the right earphone detect that the earphones enter the charging box, respectively sending the first pairing information and the second pairing information to the charging box so that the charging box can acquire the first pairing information and the second pairing information. The charging box detects the manner in which the earphones enter the box, and the left earphone and the right earphone detect the manner in which the earphones enter the box, as described above.
The pairing information of the embodiment of the application may include: a Media Access Control (MAC) address of the headset. Correspondingly, the first pairing information includes the MAC address of the left earphone, and the second pairing information includes the MAC address of the right earphone.
In S402 and S403, in this embodiment of the application, the charging box may send the pairing information of the pair of ears to the left earphone and the right earphone, respectively, that is, send the first pairing information to the right earphone, and send the second pairing information to the left earphone. Correspondingly, the right earphone receives the first pairing information, and the left earphone receives the second pairing information. It should be understood that S402 and S403 do not have a distinction in the order of precedence.
In S404, in order to better describe the method for pairing earphones in the embodiment of the present application, a method for pairing earphones of the left earphone and the right earphone after the pairing key is triggered by the user in the prior art is described first.
After a user triggers a pairing key in the prior art, the left earphone and the right earphone of the TWS bluetooth headset may detect the received RSSI value of at least one earphone. When the left earphone and the right earphone both determine that the opposite ear is the maximum RSSI value detected by the left earphone and the right earphone, the opposite ear can be determined as the earphone needing to be paired, and then the left earphone and the right earphone are paired. However, in the pairing, the left earphone and the right earphone adopt the RSSI value to determine the paired ears needed to be paired, and when a plurality of earphones exist in the same space, the earphone corresponding to the detected maximum RSSI value may not be the earphone which needs to be paired, so that the pairing accuracy is low.
In the embodiment of the present application, the left earphone receives the second pairing information, and the right earphone receives the first pairing information. The left earpiece may compare the received second pairing information with pairing information already stored in the left earpiece, and the right earpiece may compare the first pairing information with pairing information already stored in the right earpiece to determine whether to pair.
And when the pairing information stored in the left earphone is the same as the second pairing information and the pairing information stored in the right earphone is the same as the first pairing information, determining that the left earphone and the right earphone are not paired. Since the left earphone and the right earphone are paired ears, the stored pairing information is the pairing information of the ears in the charging box.
And when the pairing information is not stored in the left earphone or the stored pairing information is different from the second pairing information, determining to pair with the right earphone. Correspondingly, when the pairing information is not stored in the right earphone or the stored pairing information is different from the first pairing information, the right earphone is determined to be paired with the left earphone. In the embodiment, the earphone determines whether to pair the pair of ears according to whether the pairing information of the pair of ears is stored, so that the problem of low efficiency that the pair of ears can be performed only by triggering of a user is solved, and the pairing accuracy is improved.
Wherein the stored pairing information may be different from the first pairing information/second pairing information: the MAC addresses included in the pairing information are different. Correspondingly, the pairing information stored in the left earphone is different from the second pairing information: the MAC address of the right headphone of the second pairing information (hereinafter, the MAC address of the second pairing information) is different from the MAC address of the pairing information already stored in the left headphone. The pairing information stored in the right earphone is different from the first pairing information: the MAC address of the left headphone in the first pairing information (hereinafter, the MAC address of the first pairing information) is different from the MAC address of the pairing information already stored in the right headphone.
Taking the left earphone as an example, when the left earphone determines to pair with the pair of ears, the left earphone writes the MAC address of the second pairing information into the left earphone. The method for writing the MAC address into the left earphone may be as follows: and when the left earphone does not store the pairing information, writing the MAC address of the second pairing information. Or, when the stored pairing information is different from the second pairing information, the MAC address of the stored pairing information may be replaced with the MAC address of the second pairing information; that is, the MAC address of the stored pairing information may be deleted and written into the MAC address of the second pairing information.
Similarly, the right earphone stores the first pairing information, that is, the right earphone writes the MAC address of the first pairing information into the right earphone.
In S405, after the MAC addresses of the left earphone and the right earphone are written in the pair of earphones, pairing connection (hereinafter referred to as pairing) with the pair of earphones may be initiated, and the embodiment of the present application describes a manner of pairing the left earphone and the right earphone in two possible manners:
the first possible implementation manner is: both the left and right earpieces broadcast pairing requests. I.e. the left earpiece broadcasts the first pairing request and the right earpiece broadcasts the second pairing request. The first pairing request includes the MAC address of the left earphone, and correspondingly, the second pairing request includes the MAC address of the right earphone.
Wherein, the first pairing request and the second pairing request can be received by a plurality of earphones in the same space. The headset receiving the first pairing request and the second pairing request may compare the MAC address included in the first pairing request and the second pairing request with the MAC address stored in the headset, so as to determine whether the MAC address is a MAC address that the headset needs to pair.
It should be appreciated that the right earpiece may receive the first pairing request. The right earphone may compare the MAC address in the first pairing request with the MAC address stored in the right earphone, and if it is determined that the MAC address in the first pairing request is the same as the MAC address stored in the right earphone, determine that the earphone corresponding to the MAC address in the first pairing request is the earphone that needs to be paired. Correspondingly, the right earphone sends first pairing response information to the left earphone, and the first pairing response information is used for indicating that the left earphone agrees to pairing.
Correspondingly, when the left earphone receives the second pairing request and determines that the MAC address in the second pairing request is the same as the MAC address of the stored pair of ears, the left earphone sends second pairing response information to the right earphone, and the second pairing response information is used for indicating that the right earphone agrees to pairing. Accordingly, the left earphone and the right earphone respectively receive the pairing response information sent to the ears, and then the left earphone and the right earphone are successfully paired.
A second possible implementation is: in the embodiment of the application, the master earphone and the slave earphone can be determined in the left earphone and the right earphone. The pairing request is broadcast by the master earpiece and not broadcast by the slave earpiece to reduce signaling overhead.
The master earphone in the embodiment of the present application may be an earphone that is written into the MAC address of the opposite ear in the charging box first. And after the MAC address of the opposite ear is written into the main earphone, broadcasting a pairing request, wherein the pairing request comprises the MAC address of the main earphone. When the pairing request is received from the earphone, the MAC address in the pairing request is determined to be the same as the MAC address stored in the earphone, and then pairing response information is sent to the master earphone without broadcasting the pairing request. Wherein the pairing response information is used to indicate that the slave headset agrees to pairing. And when the master earphone receives the pairing response information sent by the slave earphone, the matching success of the left earphone and the right earphone is determined.
It should be understood that the primary earpiece in the embodiments of the present application may also be pre-set. For example, as shown in fig. 1, the main earphone may be an earphone placed in the receiving cavity on the left side of the charging box, or an earphone placed in the receiving cavity on the right side of the charging box. After the master earpiece writes the pairing information for the ear in the charging box, a pairing request may be broadcast. In the embodiment of the present application, a specific manner of determining the master earphone from the left earphone and the right earphone is not limited.
It can be understood that the pairing information in the embodiment of the present application may further include a model of the headset. Correspondingly, the first pairing information includes the model of the left earphone, and the second pairing information includes the model of the right earphone.
Optionally, before S402 and S403, the method may further include:
s406, if the charging box determines that the model of the left earphone is the same as the model of the right earphone, the charging box determines to send the first pairing information to the right earphone and send the second pairing information to the left earphone.
In the embodiment of the application, the charging box can judge whether to send the first pairing information to the right earphone or not according to the model of the left earphone in the first pairing information and the model of the right earphone in the second pairing information, and send the second pairing information to the left earphone. When the model of the left earphone is the same as that of the right earphone, the charging box determines to send the first pairing information to the right earphone and send the second pairing information to the left earphone, and otherwise, the charging box does not send the first pairing information.
In the embodiment of the application, the charging box can judge the models of the left earphone and the right earphone, the left earphone and the right earphone are successfully matched under the condition that the models are the same, and the problem that incompatibility is caused due to different models in the successful back actual use process when the left earphone and the right earphone are matched is avoided.
It should be understood that the above description is made in a scenario where the left and right earphones are boxed and the charging box detects that the lid is not closed ". If, on the basis of the above-mentioned scenario, after both the left earphone and the right earphone are paired with the opposite ear, if the charging box detects that the lid is closed, then when the charging box detects that the charging box is opened, the above-mentioned S405 is executed again to connect the left earphone and the right earphone.
In this scenario, if it is detected that the left earphone and the right earphone are inserted into the box and the charging box detects that the charging box is closed, the steps S401 to S404 and S406 may be executed first, and when the charging box detects that the charging box is opened, the step S405 may be executed to connect the left earphone and the right earphone.
In the earphone pairing method provided in the embodiment of the application, the charging box can acquire first pairing information of a left earphone and second pairing information of a right earphone which enter the charging box, and then the first pairing information and the second pairing information are respectively sent to the paired ears, so that when the left earphone and the right earphone are determined to be paired with the paired ears according to the received pairing information, the left earphone and the right earphone are paired. According to the method for pairing the earphones, the two earphones in the charging box can be paired without triggering the pairing key by a user, and the pairing efficiency is improved. In the embodiment of the application, whether the stored pairing information is paired with the ear is determined by comparing the stored pairing information with the received pairing information, so that the pairing accuracy is improved. Furthermore, in the embodiment of the application, the pairing information of the left earphone and the right earphone can be sent to the left earphone and the right earphone under the condition that the models of the left earphone and the right earphone are the same, so that the left earphone and the right earphone can be successfully paired, and the problem of incompatibility caused by different models in the actual use process after the left earphone and the right earphone are successfully paired is avoided.
In the above embodiment of the present application, after the left earphone and the right earphone receive the pairing information of the pair of ears, whether to pair the pair of the left earphone and the right earphone is determined, and the following description is given with reference to fig. 5 to describe the earphone pairing method provided in the embodiment of the present application with a main body for determining whether to pair the left earphone and the right earphone as a charging box. Similarly, the embodiment of the present application is also exemplified by being applied to a scene where the left earphone and the right earphone are put into the box and the charging box detects that the cover is not closed.
Fig. 5 is an interaction diagram of a method for pairing earphones according to a second embodiment of the present application. As shown in fig. 5, the method for pairing earphones in the embodiment of the present application may include:
s501, when the left earphone and the right earphone are placed in a charging box and the box cover is not closed, the charging box acquires first pairing information of the left earphone and second pairing information of the right earphone, wherein the first pairing information comprises the MAC address and the model of the left earphone and the pairing information stored in the left earphone, and the second pairing information comprises the MAC address and the model of the right earphone and the pairing information stored in the right earphone.
And S502, the charging box determines that the left earphone and the right earphone are paired according to the first pairing information and the second pairing information.
And S503, the charging box sends the first pairing information to the right earphone.
And S504, the charging box sends the second pairing information to the left earphone.
And S505, writing the MAC address of the right earphone into the left earphone, and writing the MAC address of the left earphone into the right earphone.
And S506, carrying out pairing connection on the left earphone and the right earphone.
The above S501 may refer to the related description in S401 in the above embodiment.
The pairing information in S501 may also carry pairing information stored in the headset, in addition to the MAC address and the model of the headset. Correspondingly, the first pairing information comprises the MAC address and the model of the left earphone and the pairing information stored in the left earphone; the second pairing information includes the MAC address and model of the right headphone and pairing information stored in the right headphone.
It should be understood that, when the pairing information is not stored in the left earphone and the right earphone, the first pairing information and the second pairing information do not carry the pairing information stored in the left earphone and the right earphone.
In S502, in this embodiment of the application, the charging box may determine whether the left earphone and the right earphone are paired according to the MAC address and the model of the left earphone in the first pairing information and the pairing information already stored in the left earphone, and the MAC address and the model of the right earphone in the second pairing information and the pairing information already stored in the right earphone.
According to the embodiment, when the charging box determines that the models of the left earphone and the right earphone are the same, in the embodiment of the present application, it is further necessary to determine whether the left earphone and the right earphone are paired according to the MAC address of the pairing information stored in the earphone and the received MAC address of the pairing information.
If the MAC address of the pairing information stored in the left earphone is the same as the MAC address of the right earphone in the second pairing information, and the MAC address of the pairing information stored in the right earphone is the same as the MAC address of the left earphone in the first pairing information, it is determined that the left earphone and the right earphone are two earphones that have been successfully paired, and the left earphone and the right earphone are not paired. Alternatively, the first and second electrodes may be,
and if the MAC address of the pairing information stored in the left earphone is different from the MAC address of the right earphone in the second pairing information, or the first pairing information does not carry the pairing information stored in the right earphone, determining that the left earphone and the right earphone are paired. Alternatively, the first and second electrodes may be,
and if the MAC address of the pairing information stored in the right earphone is different from the MAC address of the left earphone in the first pairing information, or the second pairing information does not carry the pairing information stored in the left earphone, determining that the left earphone and the right earphone are paired.
It should be understood that, in the embodiment of the present application, the charging box determines whether the models of the left earphone and the right earphone are the same, and there is no distinction in order between the steps of the charging box according to whether the stored MAC address of the pairing information is the same as the received MAC address of the pairing information.
In this embodiment, the implementation in S503-S505 may refer to the related descriptions in S402-S404 in the above embodiments, which are not repeated herein.
Similarly, in the embodiment of the present application, the left earphone and the right earphone are inserted into the box, and the charging box detects that the cover is not closed. If, on the basis of the above scenario, after both the left earphone and the right earphone are paired with the opposite ear, if the charging box detects that the cover is closed, the above S505 is executed again to connect the left earphone and the right earphone when the charging box detects that the charging box is opened.
In this scenario, if it is detected that the left earphone and the right earphone are plugged into the box and the charging box detects that the charging box is closed, the steps S501 to S505 may be performed first, and when the charging box detects that the charging box is opened, the step S506 may be performed to connect the left earphone and the right earphone.
In the method for pairing earphones provided in the embodiment of the application, the stored pairing information of the left earphone and the right earphone can be respectively added to the first pairing information and the second pairing information, so that the process that whether the left earphone and the right earphone are paired or not can be judged by the charging box. Compared with the embodiment, the embodiment of the application avoids the situation that when the left earphone and the right earphone do not need to be paired, the pairing information of the paired ears is sent to the left earphone and the right earphone, redundant signaling overhead is avoided, and the pairing efficiency is improved.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 6, the terminal may include: a charging box 30, a left earphone 10 and a right earphone 20.
The charging box 30 is configured to acquire first pairing information of the left earphone 10 and second pairing information of the right earphone 20 when the left earphone 10 and the right earphone 20 are not closed.
And a charging box 30 for transmitting the first pairing information to the right earphone 20 and the second pairing information to the left earphone 10.
When the left earphone 10 and the right earphone 20 are put into the box and the box cover is not closed or opened, the left earphone 10 is used for being connected with the right earphone 20 in a matched mode according to the second matching information, and the right earphone 20 is used for being connected with the left earphone 10 in a matched mode according to the first matching information.
In one possible implementation, the first pairing information includes a model of the left earphone 10, and the second pairing information includes a model of the right earphone 20; and the charging box 30 is further configured to determine that the model of the left earphone 10 is the same as the model of the right earphone 20 before transmitting the first pairing information to the right earphone 20 and transmitting the second pairing information to the left earphone 10.
In a possible implementation manner, before the left earphone 10 is configured to be connected to the right earphone 20 in a paired manner according to the second pairing information and the right earphone 20 is configured to be connected to the left earphone 10 in a paired manner according to the first pairing information, the left earphone 10 is further configured to determine that no pairing information is stored in the left earphone 10 or that pairing information stored in the left earphone 10 is different from the second pairing information, and the right earphone 20 is further configured to determine that no pairing information is stored in the right earphone 20 or that pairing information stored in the right earphone 20 is different from the first pairing information.
In a possible implementation manner, before the charging box 30 is configured to send the first pairing information to the right earphone 20 and send the second pairing information to the left earphone 10, the charging box 30 is further configured to determine that the first pairing information does not carry pairing information already stored in the left earphone 10, or that the first pairing information carries pairing information already stored in the left earphone 10 but pairing information already stored in the left earphone 10 is different from the second pairing information; and the number of the first and second groups,
the charging box 30 is further configured to determine that the second pairing information does not carry pairing information already stored in the right earphone 20, or that the second pairing information carries pairing information already stored in the right earphone 20 but pairing information already stored in the right earphone 20 is different from the first pairing information.
In one possible implementation, the first pairing information includes a MAC address of the left earphone 10, the second pairing information includes a MAC address of the right earphone 20, the pairing information stored in the left earphone 10 includes a MAC address of an earphone already paired with the left earphone 10, and the pairing information stored in the right earphone 20 includes a MAC address of an earphone already paired with the right earphone 20.
Correspondingly, the pairing information stored in the left earphone 10 is different from the second pairing information: the MAC address of the pairing information stored in the left earphone 10 is different from the MAC address of the second pairing information, and the pairing information stored in the right earphone 20 is different from the first pairing information: the MAC address of the pairing information already stored in the right headphone 20 is different from the MAC address of the first pairing information.
In a possible implementation, the left earphone 10 is specifically used to write the MAC address of the right earphone 20 in the second pairing information, and the right earphone 20 is specifically used to write the MAC address of the left earphone 10 in the first pairing information.
Correspondingly, when the left earphone 10 and the right earphone 20 are in the charging box 30 and the box cover is not closed or opened, the left earphone 10 is further configured to broadcast a first pairing request, and the right earphone 20 is further configured to broadcast a second pairing request, where the first pairing request includes the MAC address of the left earphone 10, and the second pairing request includes the MAC address of the right earphone 20.
Correspondingly, the left earphone 10 is further configured to receive the second pairing request and send first pairing response information to the right earphone 20, and the right earphone 20 is further configured to receive the first pairing request and send second pairing response information to the left earphone 10; wherein the first pairing response information is used to indicate that the left earphone 10 agrees to pairing, and the second pairing response information is used to indicate that the right earphone 20 agrees to pairing.
In one possible implementation, the left earpiece 10 is further configured to write the MAC address in the second pairing information, and the right earpiece 20 is further configured to write the MAC address in the first pairing information.
Correspondingly, when the left earphone 10 and the right earphone 20 are in the charging box 30 and the box cover is not closed or opened, the main earphone is used for broadcasting a pairing request, the pairing request comprises the MAC address of the main earphone, and the main earphone is the left earphone 10 or the right earphone 20; and the slave earphone is used for receiving the pairing request and sending pairing response information to the master earphone, and the pairing response information is used for indicating that the slave earphone agrees to pairing.
In a possible implementation manner, the master earphone is the left earphone 10 that is written with the MAC address in the second pairing information first, or the right earphone 20 that is written with the MAC address in the first pairing information first, or a preset earphone.
In a possible implementation manner, the charging box 30 is specifically configured to receive first pairing information sent by the left earphone 10 and second pairing information sent by the right earphone 20, where the first pairing information is sent when the left earphone 10 detects that the left earphone 10 is plugged into the box, and the second pairing information is sent when the right earphone 20 detects that the right earphone 20 is plugged into the box.
In one possible implementation manner, the first pairing information includes at least one of a MAC address of the left headset 10, a model of the left headset 10, and pairing information already stored in the left headset 10; the second pairing information includes at least one of the MAC address of the right headphone 20, the model of the right headphone 20, and pairing information already stored in the right headphone 20.
In one possible implementation, the charging box 30 is also used to charge the left earphone 10 and the right earphone 20 when the left earphone 10 and the right earphone 20 are boxed and closed.
In one possible implementation, the left earphone 10 and the right earphone 20 are wireless bluetooth earphones.
Fig. 7 is a schematic structural diagram of an apparatus for pairing headphones according to an embodiment of the present application. The earphone pairing device can be a charging box, a left earphone or a right earphone, and the earphone pairing device can be used for executing actions of the charging box, the left earphone or the right earphone in the method embodiment. As shown in fig. 7, the apparatus for headset pairing may include a transceiver module 71 and a processing module 72.
The following description will be made of the transceiver module 71 and the processing module 72 when the earphone pairing device is a charging box:
the processing module 72 is configured to obtain first pairing information of the left earphone and second pairing information of the right earphone.
And the transceiver module 71 is configured to send the first pairing information to the right earphone and send the second pairing information to the left earphone, so that when the left earphone and the right earphone are in the charging box and the box cover is not closed or opened, the left earphone is in paired connection with the right earphone according to the second pairing information, and the right earphone is in paired connection with the left earphone according to the first pairing information.
In one possible implementation manner, the first pairing information includes a model of the left headset, and the second pairing information includes a model of the right headset. The transceiver module 71 is configured to send the first pairing information to the right earphone, and before sending the second pairing information to the left earphone, the processing module 72 is further configured to determine that the model of the left earphone is the same as the model of the right earphone.
In a possible implementation manner, before the transceiver module 71 sends the first pairing information to the right earphone and sends the second pairing information to the left earphone, the processing module 72 is further configured to determine that the first pairing information does not carry pairing information stored in the left earphone, or that the first pairing information carries pairing information stored in the left earphone but the pairing information stored in the left earphone is different from the second pairing information; and the number of the first and second groups,
determining that the second pairing information does not carry pairing information stored in the right earphone, or that the second pairing information carries pairing information stored in the right earphone but the pairing information stored in the right earphone is different from the first pairing information.
In a possible implementation manner, if the processing module 72 determines that the first pairing information carries pairing information stored in the left earphone and the pairing information stored in the left earphone is the same as the second pairing information; and if the second pairing information carries the pairing information stored in the right earphone and the pairing information stored in the right earphone is the same as the second pairing information, the processing module 72 determines not to send the first pairing information to the right earphone and not to send the second pairing information to the left earphone.
In a possible implementation manner, the first pairing information includes an MAC address of the left headset, the second pairing information includes an MAC address of the right headset, the pairing information stored in the left headset includes an MAC address of a headset already paired with the left headset, and the pairing information stored in the right headset includes an MAC address of a headset already paired with the right headset;
the pairing information that has been stored in the left earphone is different from the second pairing information: the MAC address of the pairing information stored in the left earphone is different from the MAC address of the second pairing information, and the pairing information stored in the right earphone is different from the first pairing information: the MAC address of the pairing information stored in the right earphone is different from the MAC address of the first pairing information.
In one possible implementation manner, the processing module 72 may obtain the first pairing information of the left earphone and the second pairing information of the right earphone by replacing:
the transceiver module 71 is configured to receive first pairing information sent by the left headset and second pairing information sent by the right headset, where the first pairing information is sent when the left headset detects that the left headset is inserted into the box, and the second pairing information is sent when the right headset detects that the right headset is inserted into the box.
The following description will be made of the transceiver module 71 and the processing module 72 when the devices to be paired are left and right earphones. It should be understood that the following description refers to left earphone or right earphone as earphone, and to right earphone or left earphone as opposite ear, wherein the description refers to the transceiver module 71 and the processing module 72 in the earphone:
the transceiver module 71 is configured to receive pairing information of the ears sent by the charging box.
And the processing module 72 is configured to perform pairing connection with the ear according to the pairing information.
In a possible implementation manner, the pairing information includes a model of the opposite ear, and the pairing information of the opposite ear is sent after the charging box determines that the model of the earphone is the same as the model of the opposite ear.
In one possible implementation manner, before the processing module 72 performs the pairing connection with the pair of ears according to the pairing information, the processing module 72 determines that the pairing information is not stored in the headset or the pairing information stored in the headset is different from the pairing information of the pair of ears.
In one possible implementation, the pairing information for the ear is: the charging box determines that the pairing information sent by the transceiver module 71 does not carry the pairing information stored in the earphone, or the pairing information sent by the transceiver module 71 carries the pairing information stored in the earphone, but the pairing information stored in the earphone is different from the pairing information for the ears; and the charging box determines that the pairing information sent to the ear does not carry the pairing information stored in the ear, or the pairing information sent to the ear carries the pairing information stored in the ear but is sent after the pairing information stored in the ear is different from the pairing information of the earphone.
In a possible implementation manner, the pairing information sent by the transceiver module 71 includes a MAC address of the headset, the pairing information for the ear includes pairing information for the ear, the pairing information stored in the headset includes a MAC address of the headset paired with the headset, and the pairing information stored in the ear includes a MAC address of the headset paired with the ear.
Correspondingly, the pairing information stored in the headset is different from the pairing information for the ears: the MAC address of the pairing information stored in the earphone is different from the MAC address of the pairing information of the opposite ear; the pairing information stored in the ear is different from that of the earphone: the MAC address of the pairing information stored in the pair of ears is different from the MAC address of the pairing information of the headset.
In a possible implementation manner, the processing module 72 is specifically configured to write the MAC address of the peer in the peer pairing information; when the headset and the opponent ear are in the charging box and the box cover is not closed or the box cover is opened, the transceiver module 71 is used for broadcasting a pairing request, wherein the pairing request comprises the MAC address of the headset.
The transceiver module 71 is further configured to receive pairing response information sent by the pair of ears, where the pairing response information is used to indicate that the pair of ears agree to pairing.
In a possible implementation manner, the transceiver module 71 is further configured to send pairing information of the headset to the charging box when the headset detects that the headset is plugged into the charging box, and send pairing information of the headset to the charging box when the headset detects that the headset is plugged into the charging box.
It should be noted that the transceiver module above may be actually implemented as a transceiver, or include a transmitter and a receiver. The processing module can be realized in the form of software called by the processing element; or may be implemented in hardware. For example, the processing module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and a function of the processing module may be called and executed by a processing element of the apparatus. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
The term "plurality" herein means two or more. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and succeeding related objects are in a relationship of "division".
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.

Claims (14)

1. A method of headset pairing, the method comprising:
when a left earphone and a right earphone are placed in a charging box and a box cover is not closed, the charging box acquires first pairing information of the left earphone and second pairing information of the right earphone, wherein the first pairing information comprises an MAC (media access control) address of the left earphone, and the second pairing information comprises an MAC address of the right earphone;
the charging box determines that the first pairing information does not carry the MAC address of the earphone paired with the left earphone; the charging box determines that the second pairing information carries the MAC address of the earphone paired with the right earphone, but the MAC address of the earphone paired with the right earphone carried in the second pairing information is different from the MAC address of the left earphone;
alternatively, the first and second electrodes may be,
the charging box determines that the second pairing information does not carry the MAC address of the earphone paired with the right earphone; the charging box determines that the first pairing information carries the MAC address of the earphone paired with the left earphone, but the MAC address of the earphone paired with the left earphone carried in the first pairing information is different from the MAC address of the right earphone;
alternatively, the first and second electrodes may be,
the charging box determines that the first pairing information carries the MAC address of the earphone paired with the left earphone, but the MAC address of the earphone paired with the left earphone carried in the first pairing information is different from the MAC address of the right earphone; the charging box determines that the second pairing information carries the MAC address of the earphone paired with the right earphone, but the MAC address of the earphone paired with the right earphone carried in the second pairing information is different from the MAC address of the left earphone;
the charging box sends the first pairing information to the right earphone and the second pairing information to the left earphone;
when the left earphone and the right earphone are in the charging box and the box cover is not closed or the box cover is opened, the left earphone is connected with the right earphone in a matched mode according to the second matching information, and the right earphone is connected with the left earphone in a matched mode according to the first matching information.
2. The method of claim 1, wherein the first pairing information comprises a model of the left headset and the second pairing information comprises a model of the right headset;
before the charging box sends the first pairing information to the right earphone and sends the second pairing information to the left earphone, the method further includes:
and the charging box determines that the model of the left earphone is the same as the model of the right earphone.
3. The method according to claim 1 or 2, wherein the left earphone is connected in pair with the right earphone according to the second pairing information, and the right earphone is connected in pair with the left earphone according to the first pairing information, comprising:
the left earphone writes the MAC address of the right earphone in the second pairing information, and the right earphone writes the MAC address of the left earphone in the first pairing information;
when the left earphone and the right earphone are in a charging box and the box cover is not closed or the box cover is opened, the left earphone broadcasts a first pairing request and the right earphone broadcasts a second pairing request, the first pairing request comprises the MAC address of the left earphone, and the second pairing request comprises the MAC address of the right earphone;
the left earphone receives the second pairing request and sends first pairing response information to the right earphone, and the right earphone receives the first pairing request and sends second pairing response information to the left earphone; wherein the first pairing response information is used for indicating that the left earphone agrees to pairing, and the second pairing response information is used for indicating that the right earphone agrees to pairing.
4. The method of claim 1, wherein after the charging box sends the first pairing information to the right headset and the second pairing information to the left headset, further comprising:
the left earphone writes the MAC address of the right earphone in the second pairing information, and the right earphone writes the MAC address of the left earphone in the first pairing information;
when the left earphone and the right earphone are in a charging box and the box cover is not closed or the box cover is opened, a main earphone broadcasts a pairing request, wherein the pairing request comprises an MAC address of the main earphone, and the main earphone is one of the left earphone and the right earphone;
and receiving the pairing request by the slave earphone, and sending pairing response information to the master earphone, wherein the pairing response information is used for indicating that the slave earphone agrees to pairing, and the slave earphone is the other earphone of the left earphone and the right earphone.
5. The method according to claim 4, wherein the master earphone is a left earphone which is written with the MAC address in the second pairing information first, or a right earphone which is written with the MAC address in the first pairing information first, or a preset earphone.
6. The method of any of claims 1, 2, 4, and 5, wherein the obtaining, by the charging box, first pairing information for the left headset and second pairing information for the right headset comprises:
the charging box receives the first pairing information sent by the left earphone and the second pairing information sent by the right earphone, wherein the first pairing information is sent when the left earphone detects that the left earphone enters the charging box, and the second pairing information is sent when the right earphone detects that the right earphone enters the charging box.
7. A terminal, characterized in that the terminal comprises: a charging box, a left earphone and a right earphone;
the charging box is used for acquiring first pairing information of the left earphone and second pairing information of the right earphone when the left earphone and the right earphone are not closed, wherein the first pairing information comprises an MAC (media access control) address of the left earphone, and the second pairing information comprises an MAC address of the right earphone;
the charging box is configured to determine that the first pairing information does not carry pairing information that has been stored in the left earphone, or that the first pairing information carries pairing information that has been stored in the left earphone but the pairing information that has been stored in the left earphone is different from the second pairing information; and the number of the first and second groups,
the charging box is further configured to determine that the second pairing information does not carry pairing information already stored in the right earphone, or that the second pairing information carries pairing information already stored in the right earphone but the pairing information already stored in the right earphone is different from the first pairing information;
the charging box is further used for sending the first pairing information to the right earphone and sending the second pairing information to the left earphone;
when the left earphone and the right earphone are placed in the box and the box cover is not closed or the box cover is opened, the left earphone is used for being connected with the right earphone in a matched mode according to the second matching information, and the right earphone is used for being connected with the left earphone in a matched mode according to the first matching information;
the charging box is specifically configured to determine that the first pairing information does not carry an MAC address of an earphone paired with the left earphone; determining that the second pairing information carries the MAC address of the earphone paired with the right earphone, but the MAC address of the earphone paired with the right earphone carried in the second pairing information is different from the MAC address of the left earphone;
alternatively, the first and second electrodes may be,
the charging box determines that the second pairing information does not carry the MAC address of the earphone paired with the right earphone; the charging box determines that the first pairing information carries the MAC address of the earphone paired with the left earphone, but the MAC address of the earphone paired with the left earphone carried in the first pairing information is different from the MAC address of the right earphone;
alternatively, the first and second electrodes may be,
the charging box determines that the first pairing information carries the MAC address of the earphone paired with the left earphone, but the MAC address of the earphone paired with the left earphone carried in the first pairing information is different from the MAC address of the right earphone; and the charging box determines that the second pairing information carries the MAC address of the earphone paired with the right earphone, but the MAC address of the earphone paired with the right earphone carried in the second pairing information is different from the MAC address of the left earphone.
8. The terminal of claim 7, wherein the first pairing information comprises a model of the left headset and the second pairing information comprises a model of the right headset;
the charging box is further configured to determine that the model of the left earphone is the same as the model of the right earphone before sending the first pairing information to the right earphone and sending the second pairing information to the left earphone.
9. The terminal according to claim 7 or 8,
the left earphone is used for writing the MAC address of the right earphone in the second pairing information, and the right earphone is used for writing the MAC address of the left earphone in the first pairing information;
when the left earphone and the right earphone are in a charging box and the box cover is not closed or the box cover is opened, the left earphone is further used for broadcasting a first pairing request, and the right earphone is further used for broadcasting a second pairing request, wherein the first pairing request comprises the MAC address of the left earphone, and the second pairing request comprises the MAC address of the right earphone;
the left earphone is further configured to receive the second pairing request and send first pairing response information to the right earphone, and the right earphone is further configured to receive the first pairing request and send second pairing response information to the left earphone; wherein the first pairing response information is used for indicating that the left earphone agrees to pairing, and the second pairing response information is used for indicating that the right earphone agrees to pairing.
10. The terminal according to claim 7 or 8,
the left earphone is further used for writing the MAC address in the second pairing information, the right earphone is further used for writing the MAC address in the first pairing information;
when the left earphone and the right earphone are in a charging box and the box cover is not closed or the box cover is opened, the main earphone is used for broadcasting a pairing request, the pairing request comprises the MAC address of the main earphone, and the main earphone is one of the left earphone and the right earphone;
and the slave earphone is used for receiving the pairing request and sending pairing response information to the master earphone, the pairing response information is used for indicating that the slave earphone agrees to pairing, and the slave earphone is the other earphone of the master earphone and the right earphone.
11. The terminal according to claim 10, wherein the master earphone is a left earphone written with the MAC address in the second pairing information first, or a right earphone written with the MAC address in the first pairing information first, or a preset earphone.
12. The terminal of claim 7,
the charging box is configured to receive the first pairing information sent by the left earphone and the second pairing information sent by the right earphone, where the first pairing information is sent when the left earphone detects that the left earphone is inserted into the charging box, and the second pairing information is sent when the right earphone detects that the right earphone is inserted into the charging box.
13. A terminal according to any of claims 7, 8, 11, 12, wherein the charging box is further adapted to charge the left earphone and the right earphone when the left earphone and the right earphone are boxed and closed.
14. A terminal according to any of claims 7, 8, 11, 12, characterised in that the left and right ear pieces are wireless bluetooth ear pieces.
CN201910823875.4A 2019-09-02 2019-09-02 Earphone pairing method and terminal Active CN112449259B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910823875.4A CN112449259B (en) 2019-09-02 2019-09-02 Earphone pairing method and terminal
PCT/CN2020/112991 WO2021043160A1 (en) 2019-09-02 2020-09-02 Method for pairing earphones and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910823875.4A CN112449259B (en) 2019-09-02 2019-09-02 Earphone pairing method and terminal

Publications (2)

Publication Number Publication Date
CN112449259A CN112449259A (en) 2021-03-05
CN112449259B true CN112449259B (en) 2022-09-16

Family

ID=74734194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910823875.4A Active CN112449259B (en) 2019-09-02 2019-09-02 Earphone pairing method and terminal

Country Status (2)

Country Link
CN (1) CN112449259B (en)
WO (1) WO2021043160A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113676813B (en) * 2021-08-20 2024-01-09 维沃移动通信有限公司 Charging box, control method and device thereof, earphone assembly and readable storage medium
CN114302504A (en) * 2021-12-31 2022-04-08 深圳市敦实电子有限公司 Bluetooth headset pairing method and device
CN115022957B (en) * 2022-05-31 2024-04-09 歌尔科技有限公司 State synchronization method and device of earphone device, earphone device and storage medium
CN116133165A (en) * 2022-08-23 2023-05-16 荣耀终端有限公司 Headset connection system, method, headset, electronic device, and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810697A (en) * 2018-06-14 2018-11-13 歌尔科技有限公司 A kind of method, apparatus and wireless headset of wireless headset pairing
CN109348466A (en) * 2018-11-29 2019-02-15 与德科技有限公司 Bluetooth headset, bluetooth headset box and bluetooth headset MAC Address exchange method
CN109547897A (en) * 2018-11-30 2019-03-29 歌尔科技有限公司 A kind of method, apparatus, system and the wireless headset box of wireless headset connection

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9807221B2 (en) * 2014-11-28 2017-10-31 Thalmic Labs Inc. Systems, devices, and methods effected in response to establishing and/or terminating a physical communications link
US10219062B2 (en) * 2015-06-05 2019-02-26 Apple Inc. Wireless audio output devices
CN107809696B (en) * 2017-11-30 2019-12-20 成都必盛科技有限公司 Wireless earphone capable of establishing interaction with earphone box
CN108174459B (en) * 2018-02-08 2020-12-22 深圳市沃特沃德股份有限公司 Wireless audio device pairing method and wireless audio device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810697A (en) * 2018-06-14 2018-11-13 歌尔科技有限公司 A kind of method, apparatus and wireless headset of wireless headset pairing
CN109348466A (en) * 2018-11-29 2019-02-15 与德科技有限公司 Bluetooth headset, bluetooth headset box and bluetooth headset MAC Address exchange method
CN109547897A (en) * 2018-11-30 2019-03-29 歌尔科技有限公司 A kind of method, apparatus, system and the wireless headset box of wireless headset connection

Also Published As

Publication number Publication date
CN112449259A (en) 2021-03-05
WO2021043160A1 (en) 2021-03-11

Similar Documents

Publication Publication Date Title
CN112449259B (en) Earphone pairing method and terminal
CN107809696B (en) Wireless earphone capable of establishing interaction with earphone box
CN107809697B (en) Earphone box for establishing interaction with wireless earphone
WO2021042942A1 (en) Wireless earphones and wireless earphone system
CN110166871B (en) Earphone charging box, TWS earphone, working state switching method and storage medium
US11019421B2 (en) Method for detecting wearing of acoustic device and acoustic device supporting the same
CN108810697B (en) Wireless earphone pairing method and device and wireless earphone
KR20190025600A (en) Wireless audio output devices
CN109547897B (en) Wireless earphone connection method, device and system and wireless earphone box
US11736851B2 (en) Wireless playback device, and playback control method and apparatus thereof
US11368777B2 (en) Method and system for upgrading program of TWS headset, and TWS headset
WO2023197455A1 (en) Wireless bluetooth earphone connection method and apparatus, electronic device, and storage medium
KR102335903B1 (en) Method and apparatus for communication between electronic devices
CN109618318A (en) A kind of matching method and TWS earphone of TWS earphone
WO2020019843A1 (en) Microphone hole blockage detection method and related product
WO2021082263A1 (en) Method for communication between wireless earphone and charging case, charging case, tws earphone, and system
WO2020087750A1 (en) Earphone box interaction control method and device, earphone box, and storage medium
CN112491102B (en) Single-wire communication method and related product
CN108649660A (en) Electric quantity display method and wireless transmitting-receiving equipments, charging equipment
CN115175159B (en) Bluetooth headset playing method and equipment
WO2020042491A1 (en) Headphone far-field interaction method, headphone far-field interaction accessory, and wireless headphones
CN113645573B (en) Headset configuration data sharing method, headset and storage medium
CN115278425A (en) Wireless earphone system and wireless earphone
KR20210032104A (en) Electronic device for setting address information and method for operating thereof
CN114079837B (en) Wireless earphone, earphone storage box and wireless earphone system

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