Disclosure of Invention
The invention aims to provide a method, a device and a system for connecting wireless earphones, a wireless earphone box and a computer readable storage medium, which can reduce the power consumption of the wireless earphones without the problem of cross pairing.
In order to solve the above technical problem, the present invention provides a method for connecting a wireless headset, comprising:
when the wireless earphone box detects a preset event triggering connection operation, acquiring a wireless address of a first wireless earphone;
and sending the wireless address of the first wireless earphone to a second wireless earphone so that the second wireless earphone establishes connection with the first wireless earphone by using the wireless address of the first wireless earphone.
Optionally, the method of wireless headset connection further includes:
detecting the preset event by detecting that the wireless headset box is opened and the first wireless headset and the second wireless headset are placed.
Optionally, the method of wireless headset connection further includes:
the preset event is detected by detecting that a preset switch of the wireless earphone box is turned on and placing the first wireless earphone and the second wireless earphone.
Optionally, before acquiring the wireless address of the first wireless headset, the method further includes:
and sending a starting-up instruction to the first wireless earphone and the second wireless earphone.
Optionally, the acquiring a wireless address of the first wireless headset includes:
and reading the wireless address of the first wireless earphone through a serial interface.
The invention also provides a device for connecting the wireless earphone, which comprises:
the wireless earphone box comprises an acquisition module, a connection module and a control module, wherein the acquisition module is used for acquiring a wireless address of a first wireless earphone when the wireless earphone box detects a preset event triggering connection operation;
and the sending module is used for sending the wireless address of the first wireless earphone to a second wireless earphone so that the second wireless earphone establishes connection with the first wireless earphone by using the wireless address of the first wireless earphone.
The present invention also provides a wireless headset case, comprising:
the box body is used for placing a first wireless earphone and a second wireless earphone;
a memory for storing a computer program;
a processor for implementing the steps of the above-described method of wireless headset connection when executing the computer program.
The invention also provides a system for connecting wireless earphones, which comprises:
the wireless earphone box is used for acquiring a wireless address of a first wireless earphone when a preset event triggering connection operation is detected, and sending the wireless address of the first wireless earphone to a second wireless earphone;
the first wireless earphone is used for sending a wireless address of the first wireless earphone to the wireless earphone box;
the second wireless headset is configured to establish a connection with the first wireless headset using the wireless address of the first wireless headset.
Optionally, the first wireless headset is further configured to set a connection status to a connectable status after sending the wireless address of the first wireless headset to the wireless headset box.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method of wireless headset connection.
The method for connecting the wireless earphone provided by the invention comprises the following steps: when the wireless earphone box detects a preset event triggering connection operation, acquiring a wireless address of a first wireless earphone; and sending the wireless address of the first wireless earphone to the second wireless earphone so that the second wireless earphone establishes connection with the first wireless earphone by using the wireless address of the first wireless earphone.
Therefore, the method directly determines two wireless earphones needing to be paired through the wireless earphone box and can directly send the wireless address of the first wireless earphone to the second wireless earphone, so that the second wireless earphone can directly establish connection with the first wireless earphone by using the wireless address of the first wireless earphone, the process that the two wireless earphones continuously execute inquiry operation for pairing in the related technology is avoided, the power consumption of the wireless earphones is further reduced, and the problem of cross pairing cannot occur because the two paired wireless earphones are the two wireless earphones in the wireless earphone box, namely, the method can ensure that the first wireless earphone and the second wireless earphone can be connected quickly and correctly. The invention also provides a device and a system for connecting the wireless earphone, a wireless earphone box and a computer readable storage medium, which have the beneficial effects and are not described again.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Generally, the related art performs a wireless headset pairing connection as follows:
1. each wireless earphone is in a power-on state.
2. The first wireless earphone Earbud1 as the master device can also be understood as a master wireless earphone to inquire (Inquiry) the second wireless earphone Earbud2 and the third wireless earphone Earbud 3; at this time, Earbud2 and Earbud3 are both in Inquiry Scan state (queryable state).
3. The earboud 1 compares the RSSI values of the two inquired earphones (respectively recorded as: RSSI2 (RSSI value of second wireless earphone), RSSI3 (RSSI value of third wireless earphone)) to determine the wireless earphone which needs to initiate the connection operation (Page operation).
4. If RSSI2> -RSSI 3, Earbud1 will initiate a Page operation on Earbud 2; if RSSI2< RSSI3, Earbud1 will initiate a Page operation on Earbud 3. And when the Page operation is finished, the pairing connection operation between the two wireless earphones is finally finished.
According to the above process, the following disadvantages of the related art can be found:
firstly, the method comprises the following steps: cross-pairing (i.e., the left ear of one TWS headset is paired with the right ear of another TWS headset) results when there are multiple wireless headsets in the paired connection scenario.
Secondly, the method comprises the following steps: through the above process, it can be seen that when two wireless ears are paired, Inquiry operation needs to be performed until a wireless earphone which needs to initiate Page operation is determined. This process increases the power consumption of each wireless headset.
Thirdly, the method comprises the following steps: the problem of instability of the RSSI signal causes unstable connection of the wireless earphone.
The embodiment overcomes the above problems by adding the wireless earphone box in the process of performing pairing connection on the wireless earphone, namely, the execution main body of the embodiment is the wireless earphone box. Referring to fig. 1 in detail, fig. 1 is a flowchart illustrating a method for connecting a wireless headset according to an embodiment of the present invention; the method can comprise the following steps:
s101, when the wireless earphone box detects a preset event triggering connection operation, a wireless address of a first wireless earphone is obtained.
The present embodiment does not limit the preset event, and the user can set the preset event according to the actual situation. For example, it may be that the wireless headset box is detected to be open; or detecting that a preset switch of the wireless earphone box is opened; or receiving an instruction for opening the connection operation; or detecting that the first wireless headset and the second wireless headset are placed in the wireless headset box.
Further, the embodiment does not limit the detection method of the preset event, and the user may perform corresponding setting according to the set preset event. For example, when the preset event is that the wireless headset box is detected to be opened, the corresponding detection method of the preset event may be to determine whether a sensor of the wireless headset box detects that the cover of the wireless headset box is opened. For example, when the preset event is that the preset switch of the wireless headset box is detected to be turned on, the corresponding detection method of the preset event may be to detect whether the preset switch of the wireless headset box is in an on state, such as a button switch being pressed. For example, when the preset event is a command for receiving a connection opening operation, the detection method of the corresponding preset event may be to determine whether the command for opening the connection operation is received, such as determining that the first wireless headset and the second wireless headset are in a power-on state. For example, when the preset event is that the first wireless earphone and the second wireless earphone are detected to be placed in the wireless earphone box, the corresponding detection method of the preset event may be to determine whether the first wireless earphone and the second wireless earphone exist in the wireless earphone box, for example, when switches of placement positions of the first wireless earphone and the second wireless earphone in the wireless earphone box are both pressed, it is determined that the first wireless earphone and the second wireless earphone are placed in the wireless earphone box.
In order to improve reliability and convenience of detecting the preset event, it is preferable in this embodiment to detect the preset event by detecting that the wireless headset box is opened and placing the first wireless headset and the second wireless headset. Or a preset event is detected by detecting that a preset switch of the wireless earphone box is turned on and placing the first wireless earphone and the second wireless earphone. In this embodiment, a specific manner for detecting the opening of the wireless headset box is not limited, and may be implemented by a sensor, for example. In this embodiment, a specific manner of detecting the turning-on of the preset switch is not limited, and for example, the position of the preset switch may be detected. The preset switch here may be a switch provided on the housing of the wireless headset case. The preset switch may be in the form of a push switch. Of course, the present embodiment does not limit the way of detecting whether to place the first wireless headset and the second wireless headset. For example, a pressing button is arranged in an area where the first wireless earphone and the second wireless earphone are placed in the wireless earphone box, and after the wireless earphones are placed, the pressing button is pressed down, so that the wireless earphones placed at the position can be detected.
The process of performing the wireless headset pairing connection according to the related art is decomposed into an Inquiry (Inquiry) process and a paging (Page) process (i.e., a connection process) in the present embodiment. Further, the present embodiment avoids the problem of power consumption increase of the wireless headset caused by continuously performing Inquiry operation in the related art. The embodiment does not need to execute any Inquiry operation in the process of pairing the two wireless earphones. That is, in the process of pairing and connecting the wireless headset in this embodiment, the query process does not need to be executed. The wireless address of the first wireless headset is only required to be acquired by the wireless headset box when a preset event triggering connection operation is detected.
The present embodiment does not limit the manner of acquiring the wireless address of the first wireless headset. For example, the wireless address of the first wireless headset may be obtained through a wireless connection path with the first wireless headset, or may be directly obtained through a hardware interface. Further, the present embodiment also does not limit the process of acquiring the wireless address of the first wireless headset. For example, the first wireless headset may send the wireless address of the first wireless headset to the wireless headset box when receiving the address acquisition request sent by the wireless headset box.
Since the two wireless headsets required to perform the wireless headset connection operation in this embodiment are already placed in the wireless headset box, in order to improve the efficiency of wireless headset connection and acquire the wireless address of the first wireless headset more quickly, the wireless headset box in this embodiment may acquire the wireless address of the first wireless headset through a hardware interface. The present embodiment does not limit the hardware interface, and an interface with a wide application range and good stability may be selected. Preferably, the wireless headset box reads the wireless address of the first wireless headset through the serial interface. The specific process can be as follows: the wireless earphone box sends an address acquisition request to the first wireless earphone through the serial interface, and the first wireless earphone sends the wireless address of the first wireless earphone to the wireless earphone box through the serial interface when receiving the address request. In this embodiment, the content of the radio address is not limited. The wireless address may be, for example, a bluetooth address, or BT address.
In general, the connection operation is performed only when the wireless headset enters the power-on state again from the power-off state. And the wireless earphone box also needs the first wireless earphone and the second wireless earphone to be in a power-on state when the wireless earphone box carries out data interaction with the first wireless earphone and the second wireless earphone. Therefore, the present embodiment may further include, before acquiring the wireless address of the first wireless headset: and sending a Power-on command (namely a Power on command) to the first wireless earphone and the second wireless earphone. Namely, the first wireless earphone and the second wireless earphone are controlled to be in the on state. It can be understood that: the embodiment does not limit the timing of sending the power-on command to the first wireless headset and the second wireless headset. For example, when the wireless headset box detects a preset event triggering a connection operation, a power-on command may be immediately sent to the first wireless headset and the second wireless headset. Or when the wireless earphone box detects a preset event triggering connection operation, it first determines whether the first wireless earphone and the second wireless earphone are in a power-on state, if so, the wireless earphone box does not need to send the power-on instruction, if not, the wireless earphone box sends a power-on instruction to the wireless earphone which is not powered on, and certainly, the wireless earphone box sends power-on instructions to both the first wireless earphone and the second wireless earphone when not powered on.
S102, sending the wireless address of the first wireless earphone to the second wireless earphone so that the second wireless earphone can be connected with the first wireless earphone by using the wireless address of the first wireless earphone.
It is understood that the present embodiment also does not limit the way in which the wireless headset box sends the wireless address of the first wireless headset to the second wireless headset. The wireless address of the first wireless headset may be sent to the second wireless headset over the wireless connection, for example. Or the wireless address of the first wireless headset may be sent directly to the second wireless headset through the hardware interface. The present embodiment does not limit the hardware interface, and an interface with a wide application range and good stability may be selected. That is, preferably, the wireless headset box sends the wireless address of the first wireless headset to the second wireless headset via the serial interface.
In this embodiment, the timing when the wireless headset box sends the wireless address of the first wireless headset to the second wireless headset is not limited. For example, it may be that the wireless headset box immediately sends the wireless address of the first wireless headset to the second wireless headset upon receiving the wireless address of the first wireless headset.
After receiving the wireless address of the first wireless earphone, the second wireless earphone can directly establish connection with the first wireless earphone by using the wireless address of the first wireless earphone. The process of establishing connection by using a wireless address for the wireless headset is not limited in this embodiment. Reference may be made to a procedure of establishing a connection between two wireless headsets using a bluetooth address in the related art. For example: after receiving the wireless address of the first wireless headset, the second wireless headset may directly send a pairing connection request (i.e., a Page request) to the first wireless headset, and perform a corresponding connection operation (i.e., a Page operation) using the wireless address of the first wireless headset, so that the first wireless headset and the second wireless headset complete a pairing connection process, i.e., are in a connection state.
Further, since the second wireless headset needs to send a pairing connection request to the first wireless headset, the first wireless headset needs to be in a connectable state at this time. That is, the first wireless headset needs to set its connection state to a connectable state (i.e., page scan state) to indicate that the first wireless headset is in a state in which it can be connected. The present embodiment does not limit the timing at which the first wireless headset sets the connection state to the connectable state. For example, the connection state may be set to the connectable state after the power-on command sent by the wireless headset box is received to complete the power-on action. Or the connection state may be set to the connectable state when receiving an address acquisition request sent by the wireless headset box. The connection state may be set to a connectable state when the wireless address of the first wireless headset is transmitted to the wireless headset box. Of course, the connection state may be set to the connectable state when the wireless address of the first wireless headset is detected to be successfully transmitted to the wireless headset box.
In this embodiment, the first wireless headset and the second wireless headset are not limited, and any one of the two wireless headsets to be paired and connected may be the first wireless headset or the second wireless headset. For example, when two wireless headsets to be connected in a pairing manner are divided into a master wireless headset and a slave wireless headset, the master wireless headset may be the first wireless headset or may be the second wireless headset. Of course, in order to reduce the change of the existing master wireless earphone and slave wireless earphone, the slave wireless earphone may be used as the first wireless earphone and the master wireless earphone may be used as the second wireless earphone in the present embodiment.
In this embodiment, the RSSI technology is not required to be used for realizing the pairing connection between the two wireless headsets. Therefore, the problem that interference of a plurality of Bluetooth devices needs to be solved when the RSSI of each wireless headset to be connected needs to be received, and the problem that pairing connection is wrong due to inaccurate RSSI signal value acquisition do not exist. Briefly, this embodiment avoids all the problems associated with the use of RSSI techniques in the related art. Therefore, the cross-pairing problem does not exist, the Inquiry operation problem is continuously executed, and the problem that the connection of the wireless earphone is unstable due to the fact that the RSSI signal is unstable is solved. In addition, in this embodiment, the second wireless headset can directly receive the wireless address of the first wireless headset sent by the wireless headset box, so that the second wireless headset can acquire the wireless address of the first wireless headset needing to be connected in a pairing manner only by one step without additional other operations, that is, the connection efficiency of the first wireless headset and the second wireless headset is improved, and the power consumption of the second wireless headset is also reduced. Similarly, the first wireless earphone only needs to send the first wireless earphone address to the wireless earphone box, and the inquired state does not need to be continuously maintained, so that the connection efficiency of the first wireless earphone and the second wireless earphone is improved, and the power consumption of the first wireless earphone is also reduced. Briefly, in this embodiment, the wireless headset box only needs to send the wireless address of the first wireless headset to the second wireless headset, so that the process of query in the related art can be omitted, the first wireless headset and the second wireless headset are connected in a direct paging manner, and the connection efficiency and the connection reliability of the wireless headset are improved.
Based on the above technical solution, in the method for connecting wireless earphones provided in the embodiments of the present invention, the wireless earphone box directly determines two wireless earphones to be paired and can directly send the wireless address of the first wireless earphone to the second wireless earphone, so that the second wireless earphone can directly establish connection with the first wireless earphone by using the wireless address of the first wireless earphone, thereby avoiding a process of continuously performing an inquiry operation for pairing the two wireless earphones in the related art, and further reducing power consumption of the wireless earphones.
The wireless headset connection device, the wireless headset connection system, the wireless headset box and the computer readable storage medium according to the embodiments of the present invention are described below, and the wireless headset connection device, the wireless headset connection system, the wireless headset box and the computer readable storage medium described below and the wireless headset connection method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a block diagram of a wireless headset connection apparatus according to an embodiment of the present invention; the apparatus may include:
an obtainingmodule 100, configured to obtain a wireless address of a first wireless headset when a wireless headset box detects a preset event that triggers a connection operation;
a sendingmodule 200, configured to send the wireless address of the first wireless headset to the second wireless headset, so that the second wireless headset establishes a connection with the first wireless headset by using the wireless address of the first wireless headset.
Based on the above embodiment, the apparatus may further include:
the wireless earphone box comprises a first preset event detection module, a second wireless earphone and a third wireless earphone, wherein the first wireless earphone and the second wireless earphone are placed in the wireless earphone box, and the first wireless earphone and the second wireless earphone are placed in the wireless earphone box. Or the like, or, alternatively,
the second preset event detection module is used for detecting a preset event by detecting that a preset switch of the wireless earphone box is turned on and placing the first wireless earphone and the second wireless earphone.
Based on any of the above embodiments, the apparatus may further include:
and the starting instruction sending module is used for sending a starting instruction to the first wireless earphone and the second wireless earphone before the wireless address of the first wireless earphone is acquired.
Based on any of the above embodiments, the obtainingmodule 100 is specifically a module that reads the wireless address of the first wireless headset through the serial interface when the wireless headset box detects a preset event that triggers the connection operation.
It should be noted that, based on any of the above embodiments, the apparatus may be implemented based on a programmable logic device, where the programmable logic device includes an FPGA, a CPLD, a single chip, a processor, and the like. These programmable logic devices may be provided in a wireless headset box.
An embodiment of the present invention further provides a wireless headset box, including: the box body is used for placing a first wireless earphone and a second wireless earphone; a memory for storing a computer program; a processor for implementing the steps of the method of wireless headset connection described in any of the above embodiments when executing a computer program. When the processor is used for executing a computer program, the wireless address of the first wireless earphone is acquired when the wireless earphone box detects a preset event triggering connection operation; and sending the wireless address of the first wireless earphone to the second wireless earphone so that the second wireless earphone establishes connection with the first wireless earphone by using the wireless address of the first wireless earphone.
The shape and specific components of the wireless headset case are not limited in this embodiment. As long as it can place the first wireless headset and the second wireless headset and realize the functions in the above-described embodiments. When the wireless earphone box in this embodiment detects a preset event by detecting that the wireless earphone box is opened and placing the first wireless earphone and the second wireless earphone, the wireless earphone box has a cover and a sensor for detecting the open state of the cover. At this time, of course, the embodiment does not limit the specific type and the setting position of the sensor, as long as it can monitor the opening condition of the cover in the wireless earphone box.
When the wireless earphone box in this embodiment detects a preset event by detecting that the preset switch of the wireless earphone box is turned on and placing the first wireless earphone and the second wireless earphone, the wireless earphone box has the preset switch. Of course, the present embodiment does not limit the specific type and location of the preset switch, for example, the preset switch is disposed on the cover, or outside the box body.
Of course, if the wireless earphone box needs to perform data interaction with the outside, it may also have a communication component or an input component, etc. For example, the communication component is a wireless communication module, and the input component is a voice input component. Or when the wireless earphone box needs to realize the function of charging the wireless earphone, the wireless earphone box can also be provided with a charging circuit and the like.
The embodiment of the invention also provides a system for connecting the wireless earphone, which comprises:
the wireless earphone box is used for acquiring a wireless address of the first wireless earphone when a preset event triggering connection operation is detected, and sending the wireless address of the first wireless earphone to the second wireless earphone;
the first wireless earphone is used for sending the wireless address of the first wireless earphone to the wireless earphone box;
and the second wireless earphone is used for establishing connection with the first wireless earphone by using the wireless address of the first wireless earphone.
Based on the above embodiment, the first wireless headset is further configured to set the connection state to the connectable state after sending the wireless address of the first wireless headset to the wireless headset box.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of wireless headset connection described in any of the embodiments above. When the computer program is executed by the processor, the wireless address of the first wireless earphone is acquired when the wireless earphone box detects a preset event triggering connection operation; and sending the wireless address of the first wireless earphone to the second wireless earphone so that the second wireless earphone establishes connection with the first wireless earphone by using the wireless address of the first wireless earphone.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above detailed description of the method, apparatus, system, wireless headset box and computer readable storage medium for wireless headset connection provided by the present invention is provided. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.