Bluetooth headset, bluetooth headset box and bluetooth headset MAC Address exchange method
Technical field
The present embodiments relate to intelligent terminal more particularly to a kind of bluetooth headsets, bluetooth headset box and bluetooth ear
Machine MAC Address exchanges method.
Background technique
True Wireless stereo bluetooth headset (True Wireless Stereo, TWS) is made of a pair of of earphone, including main earphone
And set of headphones, it is connected between main earphone and set of headphones by wireless blue tooth, has requested the constraint of earphone connecting line.A pair of of TWS ear
Machine is commonly configured with the box of a special dress earphone, when earphone is put into box, the charging contact and Earphone box of earphone
Charging contact be in contact can for earphone charge.
The accuracy and uniqueness connected to guarantee main earphone with set of headphones is needed before the factory of TWS earphone in factory
In matched into first row, main earphone and set of headphones both sides need to know medium access control (the Media Access of other side
Control, MAC) address, so that booting could be succeeded and be used by Bluetooth pairing next time.
But since factory has a large amount of earphone to exist simultaneously, in order to eliminate interfering with each other between each earphone, mutually match
Major-minor earphone to be placed in special shielding instrument and matched, matching operation low efficiency, and it is costly to shield instrument,
Availability is lower.
Summary of the invention
The embodiment of the present invention provides a kind of bluetooth headset, bluetooth headset box and bluetooth headset MAC Address exchange method, with reality
Now the main earphone of true Wireless stereo bluetooth headset and set of headphones complete MAC Address exchange, are not interfered, and reduce bluetooth headset and match
To cost.
In a first aspect, the bluetooth headset includes: main ear speaker device and pair the embodiment of the invention provides a kind of bluetooth headset
Ear speaker device;
Main ear speaker device and auricular appendage machine equipment are respectively arranged with micro-control unit and Bluetooth chip;
Three pins touching of micro-control unit is respectively arranged on the fuselage of the main ear speaker device and auricular appendage machine equipment
Point;
Wherein, the first pin contact is used to connect progress with the respective pin contact of bluetooth headset box with the second pin contact
Charging, third pin contact is set as the data transmission modes of serial communication, for the respective pin with the bluetooth headset box
Contact connection carries out data transmission;
The Bluetooth chip is used to establish connection with the equipment with Bluetooth chip.
Second aspect, the embodiment of the invention also provides a kind of bluetooth headset boxes, are mentioned for placing the embodiment of the present invention
The bluetooth headset of confession, which includes: micro-control unit and Bluetooth chip;
It is touched in three pins that the groove for placing main ear speaker device and auricular appendage machine equipment is respectively arranged with micro-control unit
When point, the positions of three pin contacts and the bluetooth headset are put into the bluetooth headset box bluetooth headset wherein, first
Pin contact is used to be connected as bluetooth headset with the respective pin contact of bluetooth headset to charge with the second pin contact, third
Pin contact is set as the data receiver mode of serial communication, for the respective pin contact with the bluetooth headset connect into
The transmission of row data;
The Bluetooth chip is used to establish connection with the equipment with Bluetooth chip.
The third aspect, the embodiment of the invention also provides a kind of bluetooth headset MAC Address to exchange method, is applied to the present invention
Bluetooth headset provided by embodiment, this method comprises:
Main ear speaker device and/or auricular appendage machine equipment detect the third pin contact of third pin contact Yu bluetooth headset box
When establishing connection, MAC Address is sent to the bluetooth headset box by the third pin;
Main ear speaker device receives the MAC Address for the auricular appendage machine equipment that the bluetooth headset box is sent, and auricular appendage machine equipment receives
The MAC Address for the main ear speaker device that the bluetooth headset box is sent completes MAC Address exchange.
Further, main ear speaker device receives the MAC Address for the auricular appendage machine equipment that the bluetooth headset box is sent, set of headphones
Equipment receives the MAC Address for the main ear speaker device that the bluetooth headset box is sent, comprising:
Main ear speaker device receives the MAC Address for the auricular appendage machine equipment that the bluetooth headset box is sent by Bluetooth protocol, secondary
Ear speaker device receives the MAC Address for the main ear speaker device that the bluetooth headset box is sent by Bluetooth protocol.
Fourth aspect, the embodiment of the invention also provides a kind of bluetooth headset MAC Address to exchange method, is applied to the present invention
Bluetooth headset box provided by embodiment, this method comprises:
The MAC Address that main ear speaker device and auricular appendage machine equipment are sent is received by the third pin of bluetooth headset box;
The MAC Address that the auricular appendage machine equipment is sent to the main ear speaker device, to described in auricular appendage machine equipment transmission
The MAC Address of main ear speaker device completes MAC Address exchange.
Further, the MAC Address that the auricular appendage machine equipment is sent to the main ear speaker device, to the auricular appendage machine equipment
Send the MAC Address of the main ear speaker device, comprising:
The MAC Address for sending the auricular appendage machine equipment to the main ear speaker device by Bluetooth protocol, passes through Bluetooth protocol
The MAC Address of the main ear speaker device is sent to the auricular appendage machine equipment.
5th aspect, the embodiment of the invention also provides a kind of bluetooth headset MAC Address switches, are configured at the present invention
In bluetooth headset provided by embodiment, which includes:
MAC Address sending module detects third pin contact and bluetooth for main ear speaker device and/or auricular appendage machine equipment
When the third pin contact of Earphone box establishes connection, MAC Address is sent to the bluetooth headset box by the third pin;
MAC Address receiving module receives the MAC for the auricular appendage machine equipment that the bluetooth headset box is sent for main ear speaker device
Address, auricular appendage machine equipment receive the MAC Address for the main ear speaker device that the bluetooth headset box is sent, and complete MAC Address exchange.
Further, MAC Address receiving module is specifically used for:
Main ear speaker device receives the MAC Address for the auricular appendage machine equipment that the bluetooth headset box is sent by Bluetooth protocol, secondary
Ear speaker device receives the MAC Address for the main ear speaker device that the bluetooth headset box is sent by Bluetooth protocol.
6th aspect, the embodiment of the invention also provides a kind of bluetooth headset MAC Address switches, are configured at the present invention
In bluetooth headset box provided by embodiment, which includes:
MAC Address receiving module receives main ear speaker device for the third pin by bluetooth headset box and set of headphones is set
The MAC Address that preparation is sent;
MAC Address sending module, for sending the MAC Address of the auricular appendage machine equipment to the main ear speaker device, to institute
The MAC Address that auricular appendage machine equipment sends the main ear speaker device is stated, MAC Address exchange is completed.
Further, MAC Address sending module is specifically used for:
The MAC Address for sending the auricular appendage machine equipment to the main ear speaker device by Bluetooth protocol, passes through Bluetooth protocol
The MAC Address of the main ear speaker device is sent to the auricular appendage machine equipment.
The embodiment of the present invention on true Wireless stereo bluetooth headset by being arranged other than for the two of charging contact
Third contact, be used for serial communication, carry out the transmission of data, bluetooth headset and bluetooth headset box is enable to carry out data friendship
Mutually, and then by bluetooth headset box as intermediary the MAC Address for obtaining the bluetooth headset of pairing, solves bluetooth headset progress
The problem of MAC Address exchanges and successfully pairing is limited to special interference shielding instrument realizes bluetooth headset not by dry
It disturbs and without completing pairing, the cost of reduction bluetooth headset MAC Address exchange pairing in the case where special cask flask.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the bluetooth headset in the embodiment of the present invention one;
Fig. 2 is the structural schematic diagram of the bluetooth headset box in the embodiment of the present invention two;
Fig. 3 is the flow chart of the bluetooth headset MAC Address exchange method in the embodiment of the present invention three;
Fig. 4 is the flow chart of the bluetooth headset MAC Address exchange method in the embodiment of the present invention four;
Fig. 5 is the structural schematic diagram of the bluetooth headset MAC Address switch in the embodiment of the present invention five;
Fig. 6 is the structural schematic diagram of the bluetooth headset MAC Address switch in the embodiment of the present invention six.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the structural schematic diagram for the bluetooth headset that the embodiment of the present invention one provides, and the present embodiment is applicable to very wireless
Three-dimensional bluetooth headset.As shown in Figure 1, the bluetooth headset specifically includes:
Main ear speaker device 100 and auricular appendage machine equipment 110.Main ear speaker device 100 and auricular appendage machine equipment 110 are respectively arranged with micro-
Control unit and Bluetooth chip;Micro-control unit and Bluetooth chip collect respectively in major and minor ear speaker device, do not show in figure
Out.What needs to be explained here is that main ear speaker device 100 can be left ear ear speaker device, it is also possible to auris dextra ear speaker device, at this
Attached drawing in embodiment only explains effect, without limiting, in addition, the concrete shape of ear speaker device also only does exemplary illustration,
Without being defined.Auris dextra ear speaker device is set under normal conditions as main ear speaker device, and left ear ear speaker device is auricular appendage machine equipment.
Specifically, being respectively arranged with the three of micro-control unit on the fuselage of main ear speaker device 100 and auricular appendage machine equipment 110
A pin contact.Wherein, the first pin contact 101 and 111 is used for and bluetooth headset box with the second pin contact 102 and 112
The connection of respective pin contact is charged, and third pin contact 103 and 113 is set as the data transmission modes of serial communication, is used
It connect and carries out data transmission in the respective pin contact with bluetooth headset box, such as major and minor ear speaker device sends respective MAC Address
Into Earphone box, the MAC Address of the other side sent by bluetooth headset box is then received by bluetooth again, complete address exchange and is matched
It is right.
Bluetooth chip is used to establish connection with the equipment with Bluetooth chip.Wherein, the equipment with Bluetooth chip includes
Master/slave ear speaker device, bluetooth headset box and mobile terminal device etc..
The technical solution of the present embodiment, by being arranged on true Wireless stereo bluetooth headset in addition to two touchings for charging
Third contact except point is used for serial communication, carries out the transmission of data, bluetooth headset is enable to be counted with bluetooth headset box
According to interaction, so by bluetooth headset box as intermediary obtain match bluetooth headset MAC Address, solve bluetooth headset into
Row MAC Address exchanges simultaneously successfully pairing the problem of being limited to special interference shielding instrument, realize bluetooth headset not by
It interferes and without completing pairing, the cost of reduction bluetooth headset MAC Address exchange pairing in the case where special cask flask.
Embodiment two
Fig. 2 is the structural schematic diagram of bluetooth headset box provided by Embodiment 2 of the present invention, and the present embodiment is applicable to place
True Wireless stereo bluetooth headset.As shown in Fig. 2, the bluetooth headset box specifically includes:
Micro-control unit and Bluetooth chip, said chip module are integrated in inside bluetooth headset box, do not show in figure.Its
In, micro-control unit for realizing bluetooth headset box various functions, Bluetooth chip be used for and be again provided with Bluetooth chip
Equipment establishes connection.
In addition, being respectively arranged with three pipes of micro-control unit in the groove for placing main ear speaker device and auricular appendage machine equipment
When foot contact, the positions of three pin contacts and the bluetooth headset are put into the bluetooth headset box bluetooth headset wherein,
First pin contact 201 and 211 is connect with the second pin contact 202 and 212 for the respective pin contact with bluetooth headset
It charges for bluetooth headset, third pin contact 203 and 213 is set as the data receiver mode of serial communication, is used for and institute
The respective pin contact connection for stating bluetooth headset carries out data transmission, such as receives the MAC Address that Bluetooth earphone equipment is sent.
Bluetooth chip is used to establish connection with the equipment with Bluetooth chip.For example, when bluetooth headset box and major and minor bluetooth
When earphone establishes connection, the MAC Address of the main ear speaker device received can be sent to secondary Bluetooth earphone equipment, by set of headphones
The MAC Address of equipment is sent to main ear speaker device, realizes the pairing of bluetooth headset.
What needs to be explained here is that the structure of bluetooth headset box is only as an example, its groove shapes for placing earphone can
Match the earphone of its placement.
The technical solution of the present embodiment, by being arranged on the bluetooth headset box of true Wireless stereo bluetooth headset in addition to being used for
Third contact except two contacts of electricity is provided for bluetooth headset, is used for serial communication, carries out the reception of data, make bluetooth
Earphone box can carry out data interaction, and then the intermediary matched as bluetooth headset with bluetooth headset, obtain bluetooth headset
MAC Address and be sent to corresponding pairing bluetooth headset, solve bluetooth headset carry out MAC Address exchange and successfully match by
The problem of being limited to special interference shielding instrument, realizes bluetooth headset in the feelings for not being interfered and being not necessarily to special cask flask
Pairing is completed under condition, reduces the cost of bluetooth headset MAC Address exchange pairing.
Embodiment three
Fig. 3 is the flow chart that the bluetooth headset MAC Address that the embodiment of the present invention three provides exchanges method, and this method is applied to
Bluetooth earphone end provided by the embodiment of the present invention is applicable to the case where bluetooth headset exchange MAC Address is matched, the party
Method can be by each Implement of Function Module of bluetooth headset, as shown in figure 3, this method specifically includes:
S310, main ear speaker device and/or auricular appendage machine equipment detect the third pipe of third pin contact Yu bluetooth headset box
When connection is established in foot contact, MAC Address is sent to the bluetooth headset box by the third pin.
When main ear speaker device and auricular appendage machine equipment are separately or concurrently put into bluetooth headset box, the three of major and minor ear speaker device
A pin contact is contacted and is established connection with three pin contacts of the corresponding position of bluetooth headset box respectively, and realization is filled
Electricity and/or the function of data transmission.Major and minor bluetooth headset will pass through serial data transmission pin and send indigo plant for its MAC Address
Tooth Earphone box.
S320, main ear speaker device receive the MAC Address for the auricular appendage machine equipment that the bluetooth headset box is sent, auricular appendage machine equipment
The MAC Address for the main ear speaker device that the bluetooth headset box is sent is received, MAC Address exchange is completed.
It, will after major and minor bluetooth headset sends bluetooth headset box for its MAC Address by serial data transmission pin
Receive the MAC Address of bluetooth headset box transmission.Wherein, main ear speaker device receives the auricular appendage machine equipment that bluetooth headset box is sent
MAC Address, auricular appendage machine equipment receive the MAC Address for the main ear speaker device that bluetooth headset box is sent, to complete MAC Address friendship
It changes.
Specifically, main ear speaker device receives the MAC for the auricular appendage machine equipment that the bluetooth headset box is sent by Bluetooth protocol
Address, auricular appendage machine equipment receive the MAC Address for the main ear speaker device that the bluetooth headset box is sent by Bluetooth protocol.
The technical solution of the present embodiment, by the way that using bluetooth headset box as intermediary, main ear speaker device and auricular appendage machine equipment divide
Not Tong Guo the connection of chip serial ports establish serial communication, send respective MAC Address to bluetooth headset box, then pass through bluetooth headset box
The MAC Address for receiving the bluetooth headset to match with it solves bluetooth headset and carries out MAC Address exchange and successfully match limited
In the special interference shielding instrument the problem of, bluetooth headset is realized the case where not being interfered and without special cask flask
Lower completion pairing, reduces the cost of bluetooth headset MAC Address exchange pairing.
Example IV
Fig. 4 is the flow chart that the bluetooth headset MAC Address that the embodiment of the present invention four provides exchanges method, and this method is applied to
Bluetooth headset box end provided by the embodiment of the present invention is applicable to the case where bluetooth headset exchange MAC Address is matched, should
Method can be by each Implement of Function Module of bluetooth headset box, as shown in figure 4, this method specifically includes:
S410, the MAC Address that main ear speaker device and auricular appendage machine equipment are sent is received by the third pin of bluetooth headset box.
When main ear speaker device and auricular appendage machine equipment are separately or concurrently put into bluetooth headset box, the three of major and minor ear speaker device
A pin contact is contacted and is established connection with three pin contacts of the corresponding position of bluetooth headset box respectively, and realization is filled
Electricity and/or the function of data transmission.Bluetooth headset box will receive pin by serial data and receive by major and minor bluetooth headset
The MAC Address of transmission.
S420, the MAC Address that the auricular appendage machine equipment is sent to the main ear speaker device are sent to the auricular appendage machine equipment
The MAC Address of the main ear speaker device completes MAC Address exchange.
After bluetooth headset box has received the MAC Address that major and minor bluetooth headset is sent, by Bluetooth protocol to main earphone
Equipment sends the MAC Address of auricular appendage machine equipment, sends the MAC Address of main ear speaker device to auricular appendage machine equipment by Bluetooth protocol.
The technical solution of the present embodiment passes through chip serial ports and main earphone by making bluetooth headset box as intermediary respectively
Equipment and auricular appendage machine equipment establish serial communication, receive the MAC Address of main ear speaker device and auricular appendage machine equipment, then will by bluetooth
The interaction of the MAC Address of main ear speaker device and auricular appendage machine equipment is sent to other side, solves bluetooth headset and carries out MAC Address exchange
And the problem of successfully pairing is limited to special interference shielding instrument, it realizes bluetooth headset and be not interfered and is being not necessarily to specially
Pairing is completed in the case where cask flask, reduces the cost of bluetooth headset MAC Address exchange pairing.
Embodiment five
Fig. 5 is the structural schematic diagram of bluetooth headset MAC Address switch provided by the embodiment of the present invention five, the device
It is configured in bluetooth headset provided by the embodiment of the present invention, the feelings matched suitable for bluetooth headset exchange MAC Address
Condition.
As shown in figure 5, the device specifically includes: MAC Address sending module 510 and MAC Address receiving module 520.
Wherein, MAC Address sending module 510 detects that third pin touches for main ear speaker device and/or auricular appendage machine equipment
When the third pin contact of point and bluetooth headset box establishes connection, sent by the third pin to the bluetooth headset box
MAC Address;MAC Address receiving module 520 receives the auricular appendage machine equipment that the bluetooth headset box is sent for main ear speaker device
MAC Address, auricular appendage machine equipment receive the MAC Address for the main ear speaker device that the bluetooth headset box is sent, and complete MAC Address and hand over
It changes.
Further, MAC Address receiving module is specifically used for: main ear speaker device receives the bluetooth ear by Bluetooth protocol
The MAC Address for the auricular appendage machine equipment that machine box is sent, auricular appendage machine equipment receive what the bluetooth headset box was sent by Bluetooth protocol
The MAC Address of main ear speaker device.
The technical solution of the present embodiment, by the way that using bluetooth headset box as intermediary, main ear speaker device and auricular appendage machine equipment divide
Not Tong Guo the connection of chip serial ports establish serial communication, send respective MAC Address to bluetooth headset box, then pass through bluetooth headset box
The MAC Address for receiving the bluetooth headset to match with it solves bluetooth headset and carries out MAC Address exchange and successfully match limited
In the special interference shielding instrument the problem of, bluetooth headset is realized the case where not being interfered and without special cask flask
Lower completion pairing, reduces the cost of bluetooth headset MAC Address exchange pairing.
The executable present invention of vehicle row bluetooth headset MAC Address switch provided by the embodiment of the present invention is any to be implemented
Bluetooth headset MAC Address provided by example exchanges method, has the corresponding functional module of execution method and beneficial effect.
Embodiment six
Fig. 6 is the structural schematic diagram of bluetooth headset MAC Address switch provided by the embodiment of the present invention six, the device
It is configured in bluetooth headset box provided by the embodiment of the present invention, is matched suitable for bluetooth headset exchange MAC Address
The case where.
As shown in fig. 6, the device specifically includes: MAC Address receiving module 610 and MAC Address sending module 620.
Wherein, MAC Address receiving module 610, for by the third pin of bluetooth headset box receive main ear speaker device and
The MAC Address that auricular appendage machine equipment is sent;MAC Address sending module 620, for sending the set of headphones to the main ear speaker device
The MAC Address of equipment sends the MAC Address of the main ear speaker device to the auricular appendage machine equipment, completes MAC Address exchange.
Further, MAC Address sending module 620 is specifically used for: being sent by Bluetooth protocol to the main ear speaker device
The MAC Address of the auricular appendage machine equipment sends the MAC of the main ear speaker device by Bluetooth protocol to the auricular appendage machine equipment
Location.
The technical solution of the present embodiment passes through chip serial ports and main earphone by making bluetooth headset box as intermediary respectively
Equipment and auricular appendage machine equipment establish serial communication, receive the MAC Address of main ear speaker device and auricular appendage machine equipment, then will by bluetooth
The interaction of the MAC Address of main ear speaker device and auricular appendage machine equipment is sent to other side, solves bluetooth headset and carries out MAC Address exchange
And the problem of successfully pairing is limited to special interference shielding instrument, it realizes bluetooth headset and be not interfered and is being not necessarily to specially
Pairing is completed in the case where cask flask, reduces the cost of bluetooth headset MAC Address exchange pairing.
The executable present invention of vehicle row bluetooth headset MAC Address switch provided by the embodiment of the present invention is any to be implemented
Bluetooth headset MAC Address provided by example exchanges method, has the corresponding functional module of execution method and beneficial effect.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.