The content of the invention
The main object of the present invention is a kind of wireless ear for making principal and subordinate's earphone be automatically switched according to service condition of offerThe method, apparatus and wireless headset that owner is automatically switched from earphone.
In order to realize foregoing invention purpose, the present invention proposes a kind of method that wireless headset master slave relation automatically switches, bagInclude:
The first wireless headset not being connected in wake-up states and with terminal device, it is wireless to scan paired secondEarphone;Wherein, the terminal MAC address of the paired terminal device of the first wireless headset memory storage and terminal key and instituteState the second MAC Address and the 2nd key of the second wireless headset;The second wireless headset memory storage has the terminal MAC addressWith terminal key, and the first wireless headset the first MAC Address and the first key;
When second wireless headset in a dormant state when, first wireless headset uses holotype, described in callingTerminal MAC address and terminal key are connected with the terminal device;
When second wireless headset is in the state being connected with the terminal device, first wireless headset usesSlave pattern, the second MAC Address and the 2nd key for calling second wireless headset are connected with second wireless headset, completedFirst wireless headset, the second wireless headset connect with the played in stereo of terminal device;
When second wireless headset is in wake-up states, and is not connected with the terminal device, if describedOne wireless headset is main earphone, then calls the terminal MAC address and terminal key to be connected with the terminal device, and is calledFirst MAC Address and the first key are connected with second wireless headset, complete the first wireless headset, the second wireless headsetConnected with the played in stereo of terminal device;If first wireless headset is from earphone, second MAC Address is calledIt is connected with the 2nd key with second wireless headset, the terminal device is connected by second wireless headset, completes firstWireless headset, the second wireless headset connect with the played in stereo of terminal device.
Further, first wireless headset for being in wake-up states and not being connected with terminal device, surface sweeping is therewithBefore the step of second wireless headset of pairing, including:
First wireless headset and the second wireless headset pairing, and the first MAC Address and the first key are sent to described theTwo wireless headsets, and receive the second MAC Address and the 2nd key that second wireless headset is sent;
If first wireless headset is main earphone, is bound with the terminal device, obtain the terminal deviceTerminal MAC address and terminal key, and it is wireless that the terminal MAC address of the terminal device and terminal key are sent into described secondEarphone;
If first wireless headset is from earphone, receives second wireless headset and bound with the terminal deviceWhen the terminal MAC address and terminal key of the terminal device that obtain.
Further, the first wireless headset and the second wireless headset pairing, and send the first MAC Address and firstKey gives second wireless headset, and receives the second MAC Address of the second wireless headset transmission and the 2nd key stepSuddenly, including:
First wireless headset and the second wireless headset are put into charging box, wherein, be provided with charging box respectively withFirst wireless headset and the first contact and the second contact of the connection of the second wireless headset data, the first contact and the second contact portionThe controller being arranged in the charging box;
First wireless headset receives the interactive instruction of the MAC Address and key of the controller, is sent by the controllerFirst MAC Address and the first key give second wireless headset, and receive second sended over by the controllerMAC Address and the 2nd key.
Further, the first wireless headset and the second wireless headset pairing, and send the first MAC Address and firstKey gives second wireless headset, and receives the second MAC Address of the second wireless headset transmission and the 2nd key stepSuddenly, including:
First wireless headset sends pairing request;
The confirmation pairing feedback information of the second wireless headset is received, activation mutually deposits instruction;
Instruction is mutually deposited according to described, sends the first MAC Address and the first key to second wireless headset, and receiveThe second MAC Address and the 2nd key that second wireless headset is sent.
Further, the first wireless headset of the completion, the second wireless headset connect with the played in stereo of terminal deviceThe step of after, including:
First wireless headset obtain itself the first battery dump energy and second wireless headset secondBattery dump energy;
When first wireless headset is holotype, and the first battery dump energy is less than the second battery dump energy firstDuring power threshold, the first wireless headset generation mode switching command, the first wireless headset of control switches to slave pattern, and second is wirelessEarphone switches to holotype, re-establishes the first wireless headset, the second wireless headset connects with the played in stereo of terminal device;
When first wireless headset is slave pattern, and the first battery dump energy is more than the second battery dump energy firstDuring power threshold, the first wireless headset generation mode switching command, the first wireless headset of control switches to holotype, and second is wirelessEarphone switches to slave pattern, re-establishes the first wireless headset, the second wireless headset connects with the played in stereo of terminal device.
The present invention also provides the device that a kind of wireless headset master slave relation automatically switches, including:
Scanning element, for the first wireless headset not being connected in wake-up states and with terminal device, scanning is therewithSecond wireless headset of pairing;Wherein, the terminal MAC address of the paired terminal device of the first wireless headset memory storageWith terminal key and the second MAC Address and the 2nd key of second wireless headset;The second wireless headset memory storage isState terminal MAC address and terminal key, and the first MAC Address and the first key of the first wireless headset;
First calls connection unit, for when second wireless headset in a dormant state when, control first nothingLine earphone uses holotype, calls the terminal MAC address and terminal key to be connected with the terminal device;
Second calls connection unit, for being in the state being connected with the terminal device when second wireless headsetWhen, control first wireless headset to use slave pattern, call the second MAC Address and the 2nd key of second wireless headsetIt is connected with second wireless headset, the played in stereo for completing the first wireless headset, the second wireless headset and terminal device connectsConnect;
3rd calls connection unit, for being in wake-up states when second wireless headset, and not with the terminalEquipment connect when, if first wireless headset is main earphone, call the terminal MAC address and terminal key with it is describedTerminal device connects, and calls first MAC Address and the first key to be connected with second wireless headset, completes firstWireless headset, the second wireless headset connect with the played in stereo of terminal device;If first wireless headset is from earphone,Then call second MAC Address and the 2nd key to be connected with second wireless headset, connected by second wireless headsetThe terminal device, complete the first wireless headset, the second wireless headset connects with the played in stereo of terminal device.
Further, the device that the wireless headset master slave relation automatically switches also includes:
Pairing unit, matched for first wireless headset and the second wireless headset, and send the first MAC Address and theOne key gives second wireless headset, and receives the second MAC Address and the 2nd key that second wireless headset is sent;
Acquiring unit is bound, if being main earphone for first wireless headset, binds, obtains with the terminal deviceThe terminal MAC address and terminal key of the terminal device are taken, and the terminal MAC address of the terminal device and terminal key are sent outGive second wireless headset;
Receiving unit, if being from earphone for first wireless headset, receive second wireless headset and instituteState terminal MAC address and terminal key that terminal device ties up the terminal device of timing acquisition.
Further, the first wireless headset and the second wireless headset are put into charging box, wherein, set in charging boxThere are the first contact and the second contact being connected respectively with the first wireless headset and the second wireless headset data, the first contact and secondContact portion is arranged at the controller in the charging box;The pairing unit, including:
Memory module, the interactive instruction of the MAC Address and key of the controller is received for the first wireless headset, is passed throughThe controller sends the first MAC Address and the first key to second wireless headset, and receives and sent out by the controllerThe second MAC Address and the 2nd key brought.
Further, the pairing unit, including:
Sending module, pairing request is sent for first wireless headset;
Feedback information is matched in active module, the confirmation for receiving the second wireless headset, and activation mutually deposits instruction;
Memory module, for mutually depositing instruction according to described, send the first MAC Address and the first key is wireless to described secondEarphone, and receive the second MAC Address and the 2nd key that second wireless headset is sent.
Further, the device that the wireless headset master slave relation automatically switches, in addition to:
Acquiring unit, the first battery dump energy of itself and second nothing are obtained for first wireless headsetSecond battery dump energy of line earphone;
First re-establishes unit, and for being holotype when first wireless headset, and the first battery dump energy is smallWhen second the first power threshold of battery dump energy, the first wireless headset generation mode switching command, the first wireless ear is controlledMachine-cut changes slave pattern into, and the second wireless headset switches to holotype, re-establishes the first wireless headset, the second wireless headset and endThe played in stereo connection of end equipment;
Second re-establishes unit, and for being slave pattern when first wireless headset, and the first battery dump energy is bigWhen second the first power threshold of battery dump energy, the first wireless headset generation mode switching command, the first wireless ear is controlledMachine-cut changes holotype into, and the second wireless headset switches to slave pattern, re-establishes the first wireless headset, the second wireless headset and endThe played in stereo connection of end equipment.
The present invention also provides a kind of wireless headset, including memory, processor and at least one is stored in the storageIn device and it is configured as by the application program of the computing device, the application program is configurable for performing above-mentioned nothingThe method that line earphone master slave relation automatically switches.
The method, apparatus and wireless headset that the wireless headset master slave relation of the present invention automatically switches, because the first wireless earMutually there are the MAC Address and key of other side in machine and the second wireless headset respectively, so both can be scanned connection;And becauseTo be stored in the MAC Address and key of same terminal device in the first wireless headset and the second wireless headset, so bothIndividually can be connected with terminal device, therefore, the first wireless headset and the second wireless headset can be used as main earphone or fromEarphone uses, and when main earphone does not have electric, can switch from earphone and is continuing with for main earphone, when one of first and wholeEnd equipment connect, holotype can be set it to, that then accesses is switched to slave pattern, without user can differentiate main earphone andFrom earphone.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Reference picture 1, the present invention provide a kind of method that wireless headset master slave relation automatically switches, including step:
S1, in wake-up states and the first wireless headset for not being connected with terminal device, scan paired secondWireless headset;Wherein, terminal MAC (the Media Access of the paired terminal device of the first wireless headset memory storageControl or Medium Access Control, free translation is media access control, or for physical address, hardware address,For defining the position of the network equipment) address and terminal key (key, herein to the key needed between equipment during wireless connection)With the second MAC Address and the 2nd key of second wireless headset;The second wireless headset memory storage has the terminal MACAddress and terminal key, and the first MAC Address and the first key of the first wireless headset;
S2, when second wireless headset in a dormant state when, first wireless headset uses holotype, calls instituteState terminal MAC address and terminal key is connected with the terminal device;
S3, when second wireless headset be in be connected with the terminal device state when, first wireless headsetUsing slave pattern, the second MAC Address and the 2nd key for calling second wireless headset are connected with second wireless headset,Complete the first wireless headset, the second wireless headset connects with the played in stereo of terminal device;
When S4, being in wake-up states when second wireless headset, and not being connected with the terminal device, if describedFirst wireless headset is main earphone, then calls the terminal MAC address and terminal key to be connected with the terminal device, and is adjustedIt is connected with first MAC Address and the first key with second wireless headset, completes the first wireless headset, the second wireless earMachine connects with the played in stereo of terminal device;If first wireless headset is from earphone, with calling the 2nd MACLocation and the 2nd key are connected with second wireless headset, and the terminal device is connected by second wireless headset, complete theOne wireless headset, the second wireless headset connect with the played in stereo of terminal device.
Above-mentioned steps S2, S3 and S4 are three steps arranged side by side, in actual mechanical process, will not be occurred simultaneously, only meetingA kind of mode is switched over or used corresponding to selection.
As described in above-mentioned step S1, above-mentioned first wireless headset and the second wireless headset are generally bluetooth earphone, built in itThere is low-power consumption bluetooth module.Above-mentioned terminal device refers to that mobile phone etc. is connected the equipment for carrying out speech enabled with bluetooth earphone.It is above-mentionedIt is not connected in wake-up states and with terminal device, refers to that the first wireless headset starts, but do not connect with terminal device alsoThe state connect, on this basis, the first wireless headset directly will not be connected with terminal device, but first scan pairedTwo wireless headsets, the current state of the second wireless headset is checked, in order to make correctly connection selection.Above-mentioned first wireless earThe MAC Address and key of other side are stored with machine and the second wireless headset respectively, mutually can scan and connect, both also depositThe terminal MAC address and terminal key of terminal device are contained, allows the function that main earphone is realized from earphone, i.e., is set out of earphoneIt is equipped with the terminal MAC address and terminal key of terminal, it is possible to cheat terminal device, connect and use as main earphone.
As described in above-mentioned step S2, when the first wireless headset can not be scanned to the second wireless headset, illustrate the second wireless earIn a dormant state, the resting state includes not actuated use state to machine, and in charged state etc..Because the second wireless earNo matter first wireless machine is in a dormant state, now, so the first wireless headset needs to be connected with terminal device as main earphoneEarphone is main earphone or from earphone, and it uses holotype, then calls terminal MAC address and terminal key, you can as masterEarphone is connected with the terminal device.
As described in above-mentioned step S3, when the first wireless headset is scanned to the second wireless headset, and the second wireless headset isIt is connected with terminal device, illustrates that the second wireless headset is connected in the form of main earphone with terminal device, now first is wirelessThe either main earphone of earphone or slave pattern, it can all use the second MAC Address for from earphone, then calling the second wireless headsetIt is connected with the 2nd key with second wireless headset, completes the solid of the first wireless headset, the second wireless headset and terminal deviceSound plays connection.
As described in above-mentioned step S4, i.e. the first wireless headset and the second wireless headset all do not have all in starting stateHave and be connected with terminal device, at this point it is possible to think that the first wireless headset and the second wireless headset are competitive relations, although bothIt can be connected with terminal device, but only have one and be connected with terminal device, in the present embodiment, can be set as with original stateThe main earphone as this of main earphone is connected with terminal device, is then connected again with main earphone from earphone.
Reference picture 2, it is above-mentioned not to be connected in wake-up states and with terminal device first wireless in the embodiment of the present inventionEarphone, before the step S1 for scanning the second paired wireless headset, including:
S101, first wireless headset and the second wireless headset match, and send the first MAC Address and the first key toSecond wireless headset, and receive the second MAC Address and the 2nd key that second wireless headset is sent;
If S102, first wireless headset are main earphone, are bound with the terminal device, obtain the terminal and setStandby terminal MAC address and terminal key, and the terminal MAC address of the terminal device and terminal key are sent to described secondWireless headset;
If S103, first wireless headset are from earphone, receive second wireless headset and set with the terminalThe terminal MAC address and terminal key of the standby terminal device for tying up timing acquisition.
As described in above-mentioned step S101, as the first wireless headset first matches with the second wireless headset, after the completion of pairing,Mutually send its own MAC Address and key to other side, to realize that other side can simulate the purpose of oneself.
As described in above-mentioned step S102 and S103, which is going out two earphones of the first wireless headset and the second wireless headsetSetting is main earphone during factory, then is first connected using which with terminal device, the end of terminal device is then obtained by main earphoneEnd MAC Address and terminal key, the terminal MAC address then got and terminal key are sent to another wireless headset,The wireless headset from earphone set when dispatching from the factory.
Reference picture 3, in the present embodiment, above-mentioned first wireless headset and the second wireless headset pairing, and with sending the first MACLocation and the first key give second wireless headset, and receive the second MAC Address and second that second wireless headset is sentKey step S101, including:
S1011, the first wireless headset and the second wireless headset be put into charging box, wherein, it is provided with charging boxThe first contact and the second contact being connected respectively with the first wireless headset and the second wireless headset data, the first contact and second are touchedPoint is connected in the controller in the charging box;
S1012, the first wireless headset receive the interactive instruction of the MAC Address and key of the controller, pass through the controlDevice sends the first MAC Address and the first key to second wireless headset, and receives what is sended over by the controllerSecond MAC Address and the 2nd key.
As described in above-mentioned step S1011 and S1012, be provided with above-mentioned charging box respectively with the first wireless headset and secondThe first contact and the second contact of wireless headset data connection, after two wireless headsets are put into charging box, i.e., can distinguishFoundation be connected with the data of controller, controller can control the first wireless headset and the second wireless headset progress MAC Address withKey mutual storage.In a specific implementation, after the first wireless headset and the second wireless headset are put into storage storehouse, pass throughThe outside control button control controller noted above of charging box sends the first wireless headset of control and the second wireless headset with mutually depositing MACLocation and key order, to control the first wireless headset and the second wireless headset to carry out MAC Address and key mutual storage.At itIn its embodiment, one in the first wireless headset and the second wireless headset be after the wireless headset matched somebody with somebody, now, controller noted aboveInstruction can be sent, the MAC Address matched and key of preservation are first purged by two wireless headsets of control, then againCarry out with equity.
Reference picture 4, in another embodiment, above-mentioned first wireless headset and the second wireless headset pairing, and send firstMAC Address and the first key give second wireless headset, and receive the second MAC Address that second wireless headset is sentWith the 2nd key step S101, including:
S1013, first wireless headset send pairing request;
S1014, the confirmation pairing feedback information for receiving the second wireless headset, activation mutually deposit instruction;
S1015, according to described mutually deposit instruction, the first MAC Address of transmission and the first key to second wireless headset, withAnd receive the second MAC Address and the 2nd key that second wireless headset is sent.
As described in above-mentioned step S1013, S1014 and S1015, the first wireless headset sends pairing request, obtains the second nothingAfter the reception request feedback of line earphone, both establish wireless connection and buy and then the MAC Address of oneself and key are sent into other side,Storing process is simple, convenient.
Reference picture 5, in the present embodiment, the solid of the above-mentioned wireless headset of completion first, the second wireless headset and terminal deviceAfter sound plays the step of connection, including:
S5, first wireless headset obtain itself the first battery dump energy and second wireless headsetTwo battery dump energies;
S6, when first wireless headset is holotype, and the first battery dump energy is less than the second battery dump energyDuring the first power threshold, the first wireless headset generation mode switching command, the first wireless headset of control switches to slave pattern, and secondWireless headset switches to holotype, re-establishes the played in stereo of the first wireless headset, the second wireless headset and terminal deviceConnection;
S7, when first wireless headset is slave pattern, and the first battery dump energy is more than the second battery dump energyDuring the first power threshold, the first wireless headset generation mode switching command, the first wireless headset of control switches to holotype, and secondWireless headset switches to slave pattern, re-establishes the played in stereo of the first wireless headset, the second wireless headset and terminal deviceConnection.
As described in above-mentioned step S5, S6 and S7, when a main ear of conduct in the first wireless headset and the second wireless headsetDuring machine, because main earphone needs the audio-frequency information that processing terminal equipment uploads to another from earphone, the power consumption of main earphoneIt is faster than the power consumption from earphone, the situation that it occurs is necessarily, main as main earphone if using same wireless headset alwaysEarphone, which shifts to an earlier date power consumption, to be completed and shuts down, and be now changed to holotype from earphone is connected with terminal device, can not realize played in stereo.In the present embodiment, the electricity of the first wireless headset and the second wireless headset is obtained, row mode is then entered according to its master slave relation and cutChange, such as, the first wireless headset is holotype, and its electricity power consumption is fast, will when its electricity is less than the second wireless headset specified amountSecond wireless headset switches to holotype, and the first wireless headset switches to slave pattern, and then improves wireless headset and realize solidThe time that sound plays.
The method that the wireless headset master slave relation of the embodiment of the present invention automatically switches, thinks the first wireless headset and the second nothingMutually there are the MAC Address and key of other side in line earphone respectively, so both can be scanned connection;Again because first is wirelessThe MAC Address and key of same terminal device are stored in earphone and the second wireless headset, so both also can be independentIt is connected with terminal device, therefore, the first wireless headset and the second wireless headset can be used as main earphone or be used from earphone, whenWhen main earphone does not have electric, it can switch from earphone and be continuing with for main earphone, be first connected when one of with terminal device,Holotype can be set it to, that then accesses is switched to slave pattern, main earphone is deliberately differentiated without user and from earphone.
Reference picture 6, the device that a kind of wireless headset master slave relation automatically switches also is provided in the embodiment of the present invention, including:
Scanning element 10, for the first wireless headset not being connected in wake-up states and with terminal device, scanning withPairing the second wireless headset;Wherein, the terminal MAC of the paired terminal device of the first wireless headset memory storageLocation and terminal key and second wireless headset the second MAC Address and the 2nd key;The second wireless headset internal memory containsThe terminal MAC address and terminal key, and the first MAC Address and the first key of the first wireless headset.
Above-mentioned first wireless headset and the second wireless headset are generally bluetooth earphone, and it is built-in with low-power consumption bluetooth module.Above-mentioned terminal device refers to that mobile phone etc. is connected the equipment for carrying out speech enabled with bluetooth earphone.It is above-mentioned to be in wake-up states and do not haveIt is connected with terminal device, refers to that the first wireless headset starts, but the state not being connected with terminal device also, it is basic hereinOn, the first wireless headset directly will not be connected with terminal device, but first scan the second paired wireless headset, checkThe current state of two wireless headsets, in order to make correctly connection selection.Above-mentioned first wireless headset and the second wireless headsetThe MAC Address and key of other side are inside stored with respectively, it is possible to which mutually scanning and connection, both are also stored with terminal deviceTerminal MAC address and terminal key, allow the function that main earphone is realized from earphone, i.e., the end of terminal be provided with out of earphoneMAC Address and terminal key are held, terminal device can be cheated, connects and uses as main earphone.
First call connection unit 20, for when second wireless headset in a dormant state when, control described firstWireless headset uses holotype, calls the terminal MAC address and terminal key to be connected with the terminal device.
When the first wireless headset can not be scanned to the second wireless headset, illustrate the second wireless headset in a dormant state, shouldResting state includes not actuated use state, and in charged state etc..Because the second wireless headset is in a dormant state, instituteNeed to be connected with terminal device as main earphone using the first wireless headset, now, no matter the first wireless headset be main earphone orFrom earphone, it uses holotype, then calls terminal MAC address and terminal key, you can set as main earphone and the terminalStandby connection.
Second calls connection unit 30, for being in the state being connected with the terminal device when second wireless headsetWhen, control first wireless headset to use slave pattern, call the second MAC Address and the 2nd key of second wireless headsetIt is connected with second wireless headset, the played in stereo for completing the first wireless headset, the second wireless headset and terminal device connectsConnect.
When the first wireless headset is scanned to the second wireless headset, and the second wireless headset is connected with terminal device, is saidBright second wireless headset is connected in the form of main earphone with terminal device, and now the either main earphone of the first wireless headset is alsoIt is from earphone, it can all use slave pattern, then call the second MAC Address and the 2nd key and described the of the second wireless headsetTwo wireless headsets connect, and complete the first wireless headset, the second wireless headset connects with the played in stereo of terminal device.
3rd calls connection unit 40, for being in wake-up states when second wireless headset, and not with the endWhen end equipment connects, if first wireless headset is main earphone, the terminal MAC address and terminal key and institute are calledTerminal device connection is stated, and calls first MAC Address and the first key to be connected with second wireless headset, completion theOne wireless headset, the second wireless headset connect with the played in stereo of terminal device;If first wireless headset is from earMachine, then call second MAC Address and the 2nd key to be connected with second wireless headset, pass through second wireless headsetThe terminal device is connected, completes the first wireless headset, the second wireless headset connects with the played in stereo of terminal device.
First wireless headset and the second wireless headset are not all connected all in starting state with terminal device, thisWhen, it is believed that the first wireless headset and the second wireless headset are competitive relations, although can be both connected with terminal device,But only have one and be connected with terminal device, in the present embodiment, can using original state setting as main earphone as thisMain earphone is connected with terminal device, is then connected again with main earphone from earphone.
Reference picture 7, in the present embodiment, the device that the wireless headset master slave relation automatically switches also includes:
Pairing unit 101, matched for first wireless headset and the second wireless headset, and send the first MAC AddressSecond wireless headset is given with the first key, and receives the second MAC Address and second that second wireless headset is sentkey;
Acquiring unit 102 is bound, if being main earphone for first wireless headset, is tied up with the terminal deviceIt is fixed, obtain the terminal MAC address and terminal key of the terminal device, and by the terminal MAC address and terminal of the terminal deviceKey is sent to second wireless headset;
Receiving unit 103, if for first wireless headset be from earphone, receive second wireless headset withThe terminal device ties up the terminal MAC address and terminal key of the terminal device of timing acquisition.
The first wireless headset first matches with the second wireless headset in the present embodiment, after the completion of pairing, mutually sends it certainlyThe MAC Address and key of body are to other side, to realize that other side can simulate the purpose of oneself.First wireless headset and the second wireless earTwo earphones of machine which to be set when dispatching from the factory be main earphone, then be first connected using which with terminal device, then pass through masterEarphone obtains the terminal MAC address and terminal key of terminal device, the terminal MAC address then got and terminal key hairsAnother wireless headset is given, that is, the wireless headset from earphone set when dispatching from the factory.
Reference picture 8, in the present embodiment, the first wireless headset and the second wireless headset are put into charging box, wherein, fillIt is provided with the first contact and the second contact being connected respectively with the first wireless headset and the second wireless headset data in electric box, firstContact and the second contact portion are arranged at the controller in the charging box;The pairing unit 101, including:
Memory module 1011, the interactive instruction of the MAC Address and key of the controller is received for the first wireless headset,First MAC Address and the first key are sent to second wireless headset by the controller, and receives and passes through the controlThe second MAC Address and the 2nd key that device sends over.
The first contact being connected respectively with the first wireless headset and the second wireless headset data is provided with above-mentioned charging boxWith the second contact, after two wireless headsets are put into charging box, i.e., it can respectively establish and be connected with the data of controller, controlDevice can control the first wireless headset and the second wireless headset to carry out MAC Address and key mutual storage.In a specific implementationIn, after the first wireless headset and the second wireless headset are put into storage storehouse, by the outside control button control of charging boxState controller send control the first wireless headset and the second wireless headset mutually deposit MAC Address and key order, to control the first nothingLine earphone and the second wireless headset carry out MAC Address and key mutual storage.In other embodiments, the first wireless headset andOne in second wireless headset be after the wireless headset matched somebody with somebody, now, controller noted above can send instruction, control two it is wirelessThe MAC Address matched and key of preservation are first purged by earphone, are then re-started with equity.
Reference picture 9, in another embodiment, above-mentioned pairing unit 101, including:
Sending module 1012, pairing request is sent for first wireless headset;
Feedback information is matched in active module 1013, the confirmation for receiving the second wireless headset, and activation mutually deposits instruction;
Memory module 1014, for mutually depositing instruction according to described, the first MAC Address and the first key are sent to described secondWireless headset, and receive the second MAC Address and the 2nd key that second wireless headset is sent.
Sending module 1012 controls the first wireless headset to send pairing request, and obtaining the reception of the second wireless headset please negateAfter feedback, active module 1013, which activates, mutually deposits instruction, and both establish wireless connection and buy and then send the MAC Address of oneself and keyTo other side, storing process is simple, convenient.
Reference picture 10, the device that above-mentioned wireless headset master slave relation automatically switches, in addition to:
Acquiring unit 50, the first battery dump energy and described second of itself is obtained for first wireless headsetSecond battery dump energy of wireless headset;
First establishes unit 60 from newly, for being holotype when first wireless headset, and the first battery dump energyDuring less than second the first power threshold of battery dump energy, the first wireless headset generation mode switching command, control first is wirelessEarphone switches to slave pattern, and the second wireless headset switches to holotype, re-establish the first wireless headset, the second wireless headset andThe played in stereo connection of terminal device;
Second establishes unit 70 from newly, for being slave pattern when first wireless headset, and the first battery dump energyDuring more than second the first power threshold of battery dump energy, the first wireless headset generation mode switching command, control first is wirelessEarphone switches to holotype, and the second wireless headset switches to slave pattern, re-establish the first wireless headset, the second wireless headset andThe played in stereo connection of terminal device.
When one in the first wireless headset and the second wireless headset is as holotype, because holotype needs to handle eventuallyThe audio-frequency information that end equipment uploads gives the wireless headset of another slave pattern, so the power consumption of the wireless headset of holotype will be faster thanThe power consumption of the wireless headset of slave pattern, if using wireless headset of the same wireless headset as holotype always, it occursSituation necessarily, the wireless headset of holotype, which shifts to an earlier date power consumption, to be completed and shuts down, and now the wireless headset of slave pattern is changed to main mouldFormula is connected with terminal device, can not realize played in stereo.In the present embodiment, the first wireless headset and the second wireless headset are obtainedElectricity, then according to its master slave relation carry out pattern switching, such as, the first wireless headset is holotype, and its electricity power consumption is fast,When its electricity is less than the second wireless headset specified amount, the second wireless headset is switched into holotype, the switching of the first wireless headsetInto slave pattern, and then improve the time that wireless headset realizes played in stereo.
The device that the wireless headset master slave relation of the embodiment of the present invention automatically switches, because the first wireless headset and the second nothingMutually there are the MAC Address and key of other side in line earphone respectively, so both can be scanned connection;Again because first is wirelessThe MAC Address and key of same terminal device are stored in earphone and the second wireless headset, so both also can be independentIt is connected with terminal device, therefore, the first wireless headset and the second wireless headset can be used as main earphone or be used from earphone, whenWhen main earphone does not have electric, it can switch from earphone and be continuing with for main earphone, be first connected when one of with terminal device,Holotype can be set it to, that then accesses is switched to slave pattern, main earphone is deliberately differentiated without user and from earphone.
The present invention also provides a kind of wireless headset, including memory, processor and at least one is stored in the storageIn device and it is configured as by the application program of the computing device, the application program is configurable for performing above-mentioned nothingThe method that line earphone master slave relation automatically switches.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, every utilizationThe equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlationsTechnical field, be included within the scope of the present invention.