Embodiment
For making object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment referring to accompanying drawing, the present invention is described in more detail.
Fig. 1 is the flow chart of an embodiment according to Bluetooth pairing methods of the present invention.As shown in the figure, the method for embodiment comprises the steps:
After self-defining data is added Bluetooth signal to be broadcast by equipment to be paired, active broadcast this comprise the Bluetooth signal of self-defining data, this self-defining data can write in the agreement field of Bluetooth signal.After Bluetooth function opened by the terminal equipment preparing to be connected with this device pairing to be paired, when the multiple Bluetooth signal existed in Bluetooth effective range being detected, start to search for this equipment to be paired, be specially, terminal equipment self-defining resolution rules wherein any one Bluetooth signal to the plurality of Bluetooth signal detected is resolved, if unsuccessful to the parsing of this Bluetooth signal, namely this Bluetooth signal does not comprise the self-defining data meeting this self-defined resolution rules, then terminal equipment is resolved the next Bluetooth signal in the plurality of Bluetooth signal in turn, once to certain the Bluetooth signal successfully resolved in the plurality of Bluetooth signal, namely the self-defining data meeting this self-defined resolution rules is included in this Bluetooth signal, then think that the equipment to be paired of broadcasting this Bluetooth signal is target device to be paired, therefore terminal equipment with correspond to the equipment to be paired of this Bluetooth signal and carry out pairing and be connected.
In the present embodiment, the self-defining resolution rules that terminal equipment uses is corresponding with the self-defining data in the Bluetooth signal of device broadcasts to be paired, namely, this self-defining resolution rules consults in advance between equipment to be paired and terminal equipment, by arranging the feature of the self-defining data in the Bluetooth signal of device broadcasts to be paired in advance, and the corresponding self-defining resolution rules that prestores in terminal equipment, when reality uses, target device broadcast to be paired have self-defining data special Bluetooth signal and etc. to be paired, when terminal equipment detects multiple Bluetooth signal, each Bluetooth signal is resolved with self-defining resolution rules, determine the Bluetooth signal comprising there being the self-defining data meeting self-defined resolution rules, thus identification target device, initiatively match with target device afterwards and be connected.
By the method for the present embodiment, have multiple can paired device match simultaneously time, can identify target device to be paired fast from the Bluetooth signal of multiple broadcast, simplified operation, accuracy rate, ease for use are good.
In one embodiment of the invention, self-defining data can have specific format, such as, have specific prefix or suffix.Such as self-defining data can be " ER_12345 ", it has specific prefix " ER ", or can be " abcde_ & & ", it has specific suffix " & & ", and underscore " _ " wherein can be used to prefix or suffix and body of data part to demarcate.After terminal equipment detects multiple Bluetooth signal, with self-defining resolution rules, the plurality of Bluetooth signal is resolved, be specially and check in each Bluetooth signal whether comprise the self-defining data with the such as specific format such as particular prefix or suffix, once detect that certain Bluetooth signal comprises the self-defining data with specific format, then think that the equipment to be paired of this Bluetooth signal of broadcast is target device, terminal equipment initiatively matches with this target device and is connected.
Although the specific format in above-described embodiment is for prefix or suffix, but the present invention is not limited to this, specific format can also be the queueing discipline of upper and lower case letter in such as self-defining data, such as self-defining data can be " aBCdef ", with self-defined resolution rules carry out resolving can also be check in Bluetooth signal whether comprise second and the 3rd be capitalization other be the self-defining data of lowercase, once detect that Bluetooth signal comprises the self-defining data with this form, can target device be confirmed, carry out pairing and connect.Other specific formats can also be the such as character string at space character interval, the character string etc. of particular number of bits in a particular form.
In another embodiment of the present invention, self-defining data can be through the encrypt data of specific key encryption, cryptographic object can be the character data etc. of agreement, such as, obtain the self-defining data of ciphertext form after " abdcf " being encrypted with specific key, and these data are added the Bluetooth signal that will broadcast.The character data of this specific key and this agreement of also prestoring in terminal equipment.After terminal equipment detects multiple Bluetooth signal, with self-defining resolution rules, each Bluetooth signal is resolved, namely attempt being decrypted Bluetooth signal with this specific key, see the character data that whether can obtain this agreement from the signal after decryption processing, once obtain, can target device be confirmed, carry out pairing and connect.
In yet another embodiment of the present invention, self-defining data can comprise specific identifier, and such as self-defining data can be " skyblue ", and agreement specific identifier is " sky ".After terminal equipment detects multiple Bluetooth signal, with self-defining resolution rules, Bluetooth signal is resolved, be specially and check in Bluetooth signal whether comprise the self-defining data with specific identifier " sky ", once detect, can target device be confirmed, carry out pairing and connect.
Above-described embodiment can in conjunction with realization, such as self-defining data is carried out encrypting the encrypt data obtained to the data comprising particular prefix with specific key, and the resolution rules of terminal equipment is reexamine in the data after deciphering whether comprise the data with particular prefix after being decrypted Bluetooth signal with the specific key prestored.Or self-defining data comprises specific suffix and specific identifier, terminal equipment checks in Bluetooth signal the data whether comprising and not only have specific suffix but also have specific identifier, etc.
In an embodiment of the present invention, after equipment to be paired and terminal equipment match and are connected, equipment to be paired can be gone off the air and be comprised the Bluetooth signal of self-defining data, and being changed to by oneself state can not Discovery Status, in order to avoid other-end equipment unnecessarily detects its Bluetooth signal.
In an embodiment of the present invention, equipment to be paired can be bluetooth Key, and terminal equipment can be the equipment such as notebook computer, mobile phone, panel computer.
Fig. 2 is the structured flowchart of an embodiment according to Bluetooth communication system of the present invention.
As shown in the figure, the Bluetooth communication system of the present embodiment comprises equipment to be paired and terminal equipment.
Equipment to be paired comprises processing unit and transmitter unit, and processing unit is used for adding self-defining data in Bluetooth signal to be broadcast, and transmitter unit comprises the Bluetooth signal of described self-defining data for broadcasting.User can the self-defining data be stored in advance in equipment to be paired be added Bluetooth signal to be broadcast by processing unit, also the self-defining data that user inputs immediately can be added Bluetooth signal to be broadcast, or user only inputs the specific part of self-defining data, comprised the self-defining data of this specific part by the automated randomized generation of processing unit.
Terminal equipment comprises detecting unit, memory cell, resolution unit and pairing unit.Detecting unit is for detecting Bluetooth signal, memory cell is for storing the data relevant to self-defining resolution rules, this self-defining resolution rules corresponds to above-mentioned self-defining data, resolution unit is resolved for a Bluetooth signal in multiple Bluetooth signals of utilizing self-defining resolution rules and detecting detecting unit, if resolve unsuccessful to this Bluetooth signal, then resolution unit is resolved the next Bluetooth signal in the plurality of Bluetooth signal in turn, pairing unit is used for being connected carrying out pairing with the equipment to be paired corresponding to this Bluetooth signal during certain Bluetooth signal successfully resolved in the plurality of Bluetooth signal in resolution unit.
In an embodiment of the invention, self-defining data can have specific format, such as, have specific prefix or suffix.Self-defining data can be such as " ER_12345 ", it has specific prefix " ER ", or can be " abcde_ & & ", it has specific suffix " & & ", and underscore " _ " wherein can be used to prefix or suffix and self-defining data body to demarcate.This prefix or suffix can be stored in memory cell.After detecting unit detects multiple Bluetooth signal, resolution unit is resolved the plurality of Bluetooth signal, check in each Bluetooth signal the self-defining data whether comprising and there is this prefix or the suffix stored in memory cell, once detect that certain Bluetooth signal comprises the self-defining data with specific format, then think that the equipment to be paired of this Bluetooth signal of broadcast is target device, pairing unit is initiatively matched with this target device and is connected.
Above-mentioned specific format can also be the queueing discipline of upper and lower case letter in such as self-defining data, and such as self-defining data can be " aBCdef ".What then can store in memory cell advises relevant data to self-defining parsing is: second and the 3rd character=capitalization, other character=lowercases.Resolution unit check in Bluetooth signal whether comprise second and the 3rd be capitalization other be the self-defining data of lowercase, once resolution unit detects that Bluetooth signal comprises the self-defining data with this form, can confirm target device, then pairing unit and target device carry out pairing and are connected.
In another embodiment of the present invention, self-defining data can be through the encrypt data of specific key encryption, cryptographic object can be the character data etc. of agreement, such as processing unit specific key obtains the self-defining data of ciphertext form after being encrypted " abdcf ", and these data is added the Bluetooth signal that will broadcast.Also prestore in the memory cell of terminal equipment this specific key and this agreement character data.After the detecting unit of terminal equipment detects multiple Bluetooth signal, the self-defining resolution rules of resolution unit is resolved each Bluetooth signal, namely attempt being decrypted Bluetooth signal with this specific key, see the character data that whether can obtain this agreement from the signal after decryption processing, once obtain, can confirm target device, then pairing unit is carried out pairing with this equipment to be paired and is connected.
In yet another embodiment of the present invention, self-defining data can comprise specific identifier, and such as arranging specific identifier is " sky ", and this specific identifier is added self-defining data by processing unit, and self-defining data can be " skyblue ".After detecting unit detects multiple Bluetooth signal, the self-defining resolution rules of resolution unit is resolved Bluetooth signal, be specially and check in Bluetooth signal whether comprise the self-defining data with specific identifier " sky ", once detect, can confirm target device, pairing unit and equipment to be paired carry out pairing and are connected.
Above-described embodiment can in conjunction with realization, such as self-defining data is carried out encrypting the encrypt data obtained to the data comprising particular prefix with specific key, and the resolution rules of terminal equipment is reexamine in the data after deciphering whether comprise the data with particular prefix after being decrypted Bluetooth signal with the specific key prestored.Or self-defining data comprises specific suffix and specific identifier, terminal equipment checks in Bluetooth signal the data whether comprising and not only have specific suffix but also have specific identifier, etc.
In an embodiment of the present invention, after equipment to be paired and terminal equipment match and are connected, the transmitter unit of equipment to be paired can be gone off the air and be comprised the Bluetooth signal of self-defining data, the state of equipment to be paired being changed to can not Discovery Status, in order to avoid other-end equipment unnecessarily detects its Bluetooth signal.
In an embodiment of the present invention, equipment to be paired can be bluetooth Key, and terminal equipment can be the equipment such as notebook computer, mobile phone, panel computer.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.