CN105472776B - A kind of method that establishing bluetooth connection and blue-tooth intelligence key devices - Google Patents
A kind of method that establishing bluetooth connection and blue-tooth intelligence key devices Download PDFInfo
- Publication number
- CN105472776B CN105472776B CN201510789083.1A CN201510789083A CN105472776B CN 105472776 B CN105472776 B CN 105472776B CN 201510789083 A CN201510789083 A CN 201510789083A CN 105472776 B CN105472776 B CN 105472776B
- Authority
- CN
- China
- Prior art keywords
- information
- unit
- key
- devices
- blue
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
Abstract
The invention discloses a kind of method for establishing bluetooth connection and blue-tooth intelligence key devices, the method includes:It is stealth mode that bluetooth discovery mode, which is arranged, in blue-tooth intelligence key devices;Search for the facility information of bluetooth equipment;After searching the facility information of bluetooth equipment, the device identification in facility information is obtained;Using device identification as information to be selected or using device identification and the first presupposed information as information to be selected;Export information to be selected;After detecting confirmation signal, is identified according to the target device that user chooses in information to be selected, establish and connect with corresponding target Bluetooth devices;Etc. the instruction to be received from target Bluetooth devices.In the present invention, blue-tooth intelligence key devices and target Bluetooth devices are during establishing connection, set the bluetooth discovery mode of itself to stealth mode, the target Bluetooth devices searched with itself are attached, reduce the safety that blue-tooth intelligence key devices are improved by the possibility of malicious attack.
Description
Technical field
The present invention relates to information security field, more particularly to a kind of method for establishing bluetooth connection and blue-tooth intelligence key are set
It is standby.
Background technology
With the fast development of electronic information, internet bank trade is increasingly popularized in daily life.Blue-tooth intelligence key
Equipment (abbreviation bluetooth KEY) is a kind of safety and easily intelligent key to ensure that the safety of internet bank trade proposes
Equipment.In the prior art, bluetooth KEY exists during bluetooth connection by the risk of malicious attack.
Invention content
The present invention solves bluetooth KEY during bluetooth connection, there is technical issues that by malicious attack.
The present invention provides a kind of methods for establishing bluetooth connection, including:
Step S1:It is stealth mode that bluetooth discovery mode, which is arranged, in blue-tooth intelligence key devices;
Step S2:The facility information of the blue-tooth intelligence key devices search bluetooth equipment;
Step S3:After the blue-tooth intelligence key devices search the facility information of bluetooth equipment, the blue-tooth intelligence
Key devices obtain the device identification in the facility information, using the device identification as information to be selected or by the equipment mark
Know and the first presupposed information is as information to be selected;
Step S4:The blue-tooth intelligence key devices export the information to be selected;
Step S5:After the blue-tooth intelligence key devices detect confirmation signal, according to user in the information to be selected
In choose target device mark, with corresponding target Bluetooth devices establish connect;
Step S6:The instruction to be received from the target Bluetooth devices such as the blue-tooth intelligence key devices.
The present invention also provides a kind of blue-tooth intelligence key devices, including:Hidden module, search module, first obtain mould
Block, output module, detection module, link block and communication module;
The hidden module is stealth mode for bluetooth discovery mode to be arranged;
Described search module, for after hidden module setting bluetooth discovery mode is stealth mode, searching for bluetooth
The facility information of equipment;
First acquisition module, for obtaining device identification in stating the facility information that search module searches, by institute
Device identification is stated as information to be selected or by the equipment using the device identification and the first presupposed information as information to be selected;
The output module, for when first acquisition module is using the device identification as information to be selected or by institute
State equipment using the device identification and the first presupposed information as information to be selected after, export the information to be selected;
The detection module, for after the output module exports the information to be selected, detecting trigger signal;
The link block, for working as after the detection module detects confirmation signal, according to user in the letter to be selected
The target device mark chosen in breath, establishes with corresponding target Bluetooth devices and connects;
The communication module, the target device for being chosen in the information to be selected according to user when the link block
Mark waits the instruction to be received from the target Bluetooth devices after establishing connection with corresponding target Bluetooth devices.
The beneficial effects of the invention are as follows:Bluetooth KEY and target Bluetooth devices during connection, bluetooth KEY by itself
The bluetooth discovery mode target Bluetooth devices that are set as stealth mode and itself search be attached, reduce by malice
The possibility of attack improves the safety of bluetooth KEY.
Description of the drawings
Fig. 1 is a kind of flow chart for method for establishing bluetooth connection that the embodiment of the present invention 1 provides;
Fig. 2 is identified according to the target device chosen by user for the bluetooth KEY that the embodiment of the present invention 1 provides and target Bluetooth
Equipment establishes the particular flow sheet of connection;
Fig. 3-Fig. 4 is a kind of flow chart for method for establishing bluetooth connection that the embodiment of the present invention 2 provides;
Fig. 5 is the structure chart that the present invention implements a kind of blue-tooth intelligence key devices that 3 provide.
Specific implementation mode
Below in conjunction with the attached drawing of the present invention, technical scheme in the embodiment of the invention is clearly and completely described,
Obviously, described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based in the present invention
Embodiment, the every other embodiment that those skilled in the art are obtained without making creative work all belongs to
In the scope of protection of the invention.
Embodiment 1
A kind of method for establishing bluetooth connection is present embodiments provided, as shown in Figure 1, specifically including:
Step 101:Bluetooth KEY is powered on, and setting bluetooth discovery mode is stealth mode;
Step 102:The facility information of bluetooth KEY search bluetooth equipments, judges whether to search facility information, if so,
Then follow the steps 103;Otherwise, return to step 102;
In the present embodiment, the facility information of bluetooth equipment includes:The MAC Address of bluetooth equipment, the implementor name of bluetooth equipment
Claim and the equipment of bluetooth equipment accesses coding etc..Bluetooth equipment can be mobile phone bluetooth-capable or other equipment etc..
Step 103:Bluetooth KEY is obtained and the device identification in storing device information;
In the present embodiment, device identification is can to identify the information of bluetooth equipment, and the device identification of each bluetooth equipment is equal
It is different.In the present embodiment, the device identification of bluetooth equipment includes:The MAC Address of bluetooth equipment and/or the implementor name of bluetooth equipment
Claim etc..Preferably, the device identification of bluetooth equipment includes:The MAC Address of bluetooth equipment and the device name of bluetooth equipment.Work as indigo plant
When the device identification of tooth equipment includes device name and MAC Address, it can be stored according to the format of " device name | MAC Address "
The device identification of bluetooth equipment.
It should be noted that bluetooth KEY is obtained and after the device identification in storing device information, can be made device identification
For information to be selected.
Step 104:Bluetooth KEY output equipments identify;
Specifically, bluetooth KEY output equipment can be identified in several ways, can be, but not limited to:Bluetooth KEY is in liquid crystal
Screen display device identification reports device identification by voice-controlled manner.
Step 105:After bluetooth KEY detects confirmation signal, the target device mark and target chosen according to user are blue
Tooth equipment establishes connection, executes step 106.
In the present embodiment, bluetooth KEY can be, but not limited to more by touch screen triggering, button triggering or acoustic control triggering etc.
At least one of kind mode detects confirmation signal.
In this step, target Bluetooth devices are bluetooth equipment corresponding with target device mark.
Step 106:Bluetooth KEY is waited for receiving by Bluetooth channels and be instructed, and is signed when receiving review by Bluetooth channels
After instruction, step 107 is executed;After receiving other instructions by Bluetooth channels, bluetooth KEY executes corresponding operating, returns to step
Rapid 106.
In the present embodiment, other instruction can be, but not limited to for:Random number instruction is generated, key pair instruction is generated and reads
Public key instruction etc..
Specifically, after bluetooth KEY receives instruction by Bluetooth channels, bluetooth KEY analysis instructions, according to the finger of instruction
Enable head decision instruction type.After bluetooth KEY judges that instruction type is review signature command according to the instruction head of instruction, execute
Step 107;After bluetooth KEY judges that instruction type is to generate random number instruction according to the instruction head of instruction, then the 5th is generated
Random number sends the 5th random number, return to step 106;When bluetooth KEY judges that instruction type is made a living according to the instruction head of instruction
After being instructed at key pair, the second key pair, return to step 106 are generated;When bluetooth KEY judges to instruct according to the instruction head of instruction
Type is after reading public key instruction, to send the third public key of the second cipher key pair, return to step 106;
It should be noted that when bluetooth KEY judges that instruction type is to generate key pair instruction according to the instruction head of instruction,
After generating the second key pair, the third public key of the second cipher key pair, return to step 106 can also be directly transmitted.
In the present embodiment, third public key and private key for user are corresponding.
This step can also be specially:Bluetooth KEY is waited for receiving by Bluetooth channels in the second preset time and be instructed, when
After receiving review signature command by Bluetooth channels in the second preset time, step 107 is executed;When in the second preset time
After receiving other instructions by Bluetooth channels, bluetooth KEY executes corresponding operating, return to step 106;When in the second preset time
It is interior receive instruction not over Bluetooth channels after, into dormant state;
In the present embodiment, it is preferable that the second preset time is 30s.
It should be noted that after bluetooth KEY enters dormant state, the indigo plant of bluetooth KEY detection and target Bluetooth devices
Whether tooth connection is effective, if it is effective, then after receiving review signature command by Bluetooth channels, exits dormant state,
Transaction message is obtained according to review signature command, is continued;After receiving other instructions by Bluetooth channels, suspend mode shape is exited
State executes corresponding operating, return to step 102;If bluetooth KEY detections are invalid with the bluetooth connection of target Bluetooth devices, move back
Go out dormant state, output connection disconnects information, return to step 102 or shutdown.
Or after bluetooth KEY enters dormant state, whether bluetooth KEY detects the bluetooth connection with target Bluetooth devices
Effectively, if it is effective, then after receiving review signature command by Bluetooth channels, dormant state is exited, is signed according to review
Name instruction obtains transaction message, continues;After detecting trigger signal, dormant state, return to step 106 are exited;If bluetooth
KEY detections are invalid with the bluetooth connection of target Bluetooth devices, then exit dormant state, and output connection disconnects information, return to step
102 or shutdown.
Step 107:Bluetooth KEY obtains the transaction message in review signature command;
Step 108:Bluetooth KEY judges whether transaction message is correct, if so, thening follow the steps 109;Otherwise, bluetooth KEY
Export operation failure, return to step 106;
In this step, bluetooth KEY can judge transaction message according to whether the format of transaction message meets preset format
It is whether correct.
Step 109:Bluetooth KEY is handled to obtain Hash result and be preserved to transaction message progress Hash, preserves transaction message
In key message and export key message;
Specifically, bluetooth KEY is handled to obtain Hash result and be preserved to transaction message progress Hash, is preserved in transaction message
Key message after, can be, but not limited to liquid crystal screen display key message or by voice-controlled manner report key message,
Set marking keys, return to step 106.
Step 110:After bluetooth KEY detects trigger signal, the type of trigger signal is judged, when judging trigger signal
After turning over signal for up/down, 111 are thened follow the steps;After it is confirmation signal to judge trigger signal, 112 are thened follow the steps;When sentencing
Break and trigger signal after cancelling signal, to then follow the steps 115;
In the present embodiment, bluetooth KEY can be, but not limited to more by touch screen triggering, button triggering or acoustic control triggering etc.
At least one of kind mode detects trigger signal.
After bluetooth KEY detects trigger signal, can also judge marking keys whether set, be to judge trigger signal
Type, continue;Otherwise return to step 106;
Step 111:Bluetooth KEY up/down turns over output key message, return to step 106;
Specifically, bluetooth KEY can show key message by liquid crystal display page up/down.
Step 112:Bluetooth KEY signs to the Hash result of preservation using private key for user, judges whether signature succeeds,
If so, thening follow the steps 113;Otherwise, step 114 is executed;
Further, further include that message is shown that complement mark is set as effective after key message all exports.Accordingly
Ground, step 112 further include before:Bluetooth KEY judges that message shows whether complement mark is effective, is to then follow the steps 112;It is no
Then, step 114 is executed;
Step 113:Bluetooth KEY outputs operate successfully, preserve signature result, return to step 106;
Further, after bluetooth KEY outputs operate successfully, marking keys can also be removed and message shows complement mark.
Step 114:Bluetooth KEY exports operation failure, return to step 106;
Further, after bluetooth KEY exports operation failure, marking keys can also be removed.
Step 115:Bluetooth KEY output operations are cancelled, return to step 106.
Further, after bluetooth KEY outputs operation is cancelled, marking keys can also be removed.
As shown in Fig. 2, in the present embodiment, step 105 specifically includes:
Step 1051:After bluetooth KEY detects confirmation signal, bluetooth KEY according to target device mark judge whether and
Target Bluetooth devices have matched, if so, thening follow the steps 1054;Otherwise, step 1052 is executed;
Specifically, bluetooth KEY is identified to target Bluetooth devices according to target device and is sent authentication instruction, is received and is come from target
The authentication responses of bluetooth equipment obtain authenticating result according to authentication responses, judge whether to set with target Bluetooth according to authenticating result
Standby to have matched, if authenticating result is successfully, judgement has been matched with target Bluetooth devices, thens follow the steps 1054;If
Authenticating result is failure, then judgement is no and target Bluetooth devices match, and executes step 1052.
More specifically, it includes the first random number that bluetooth KEY, which is identified according to target device to target Bluetooth devices transmission,
Whether authentication instruction, receives the authentication responses from target Bluetooth devices, judge in authentication responses to include the first error identification, such as
Fruit is to then follow the steps 1052;Otherwise, bluetooth KEY inquire itself whether there is connection key corresponding with target Bluetooth devices,
After bluetooth KEY does not inquire the connection key corresponding with target Bluetooth devices of itself, bluetooth KEY judgements authenticating result is
Failure executes step 1052;After bluetooth KEY inquires the connection key corresponding with target Bluetooth devices of itself, then basis
Connect key, the first random number and target device mark obtain the first validation value, judge the first validation value whether and authentication responses
Match, if the first validation value is matched with authentication responses, judges that authenticating result for success, thens follow the steps 1054;
If the first verification number and authentication responses mismatch, judge that authenticating result for failure, thens follow the steps 1052;
Step 1052:Bluetooth KEY is matched according to target device mark and target Bluetooth devices;
Specifically, bluetooth KEY is identified to target Bluetooth devices according to target device and is sent matched order, is received and is come from target
The pairing response of bluetooth equipment obtains the matching method of target Bluetooth devices according to pairing response, according to target Bluetooth devices
Matching method and target Bluetooth devices are matched.
In the present embodiment, in order to ensure the safety during pairing, when the mesh that bluetooth KEY is got according to pairing response
After the matching method for marking bluetooth equipment, bluetooth KEY can use asymmetric encryption and decryption according to the matching method of target Bluetooth devices
Algorithm mechanism is set in such a way that asymmetric enciphering and deciphering algorithm mechanism and user intervention attack protection are combined with target Bluetooth
It is standby to be matched.
For example, after the matching method of the bluetooth KEY target Bluetooth devices got according to pairing response is first method,
Bluetooth KEY is matched according to the first public key of itself and the second public key of target Bluetooth devices with target Bluetooth devices.
It specifically includes:
Step m1:Bluetooth KEY generates first key pair, is identified by target device close to target Bluetooth devices transmission first
First public key of key centering obtains the second public key from target Bluetooth devices;According to the second public key and first key centering
First private key generates first key;
Step m2:Bluetooth KEY generates the second random number, by target device identify to target Bluetooth devices send second with
Machine number obtains the third random number from target Bluetooth devices;
Step m3:Bluetooth confirms key according to first key, the second random number and third generating random number, is set by target
It is standby identify to send to target Bluetooth devices confirm key, obtain and confirm as a result, after it is successfully to confirm result, then judge and target
Bluetooth equipment successful matching.
Can also include before step m3:Bluetooth KEY obtains the privacy key from target Bluetooth devices, according to the first public affairs
Key, the second public key and third random number judge whether privacy key is correct, if it is, execute step m3;Otherwise, return to step
m1。
In another example when the matching method of the bluetooth KEY target Bluetooth devices got according to pairing response is second method
Afterwards, bluetooth KEY is according to the first public key of itself, the first PIN code of itself, the second public key of target Bluetooth devices and target Bluetooth
Second PIN code of equipment, is matched with target Bluetooth devices.
Step n1:Bluetooth KEY generates first key pair, is identified by target device close to target Bluetooth devices transmission first
First public key of key centering obtains the second public key from target Bluetooth devices;According to the second public key and first key centering
First private key generates first key;
Step n2:Bluetooth KEY generates the second random number, by target device identify to target Bluetooth devices send second with
Machine number obtains the third random number from target Bluetooth devices;
Step n3:Bluetooth KEY is according to the first public key, the second public key, the second random number and third generating random number and exports
Whether the first PIN code judges the second PIN code from target Bluetooth devices with first after getting the confirmation signal of user
PIN code matches, if so, thening follow the steps n4;Fail otherwise, it is determined that being matched with target Bluetooth devices, return to step 102;
After bluetooth KEY judgements fail with target Bluetooth devices pairing, it can also report an error.
Step n4:Bluetooth confirms key according to first key, the second random number and third generating random number, is set by target
It is standby identify to send to target Bluetooth devices confirm key, obtain and confirm as a result, after it is successfully to confirm result, then judge and target
Bluetooth equipment successful matching.
Can also include before step n3:Bluetooth KEY obtains the privacy key from target Bluetooth devices, according to the first public affairs
Key, the second public key and third random number judge whether privacy key is correct, if it is, execute step n3;Otherwise, return to step
n1。
In the present embodiment, after bluetooth KEY judges pairing failure, it can also report an error.
Step 1053:Bluetooth KEY generates connection key corresponding with target Bluetooth devices;
Specifically, bluetooth KEY is according to first key, the second random number and third generating random number and preservation and target Bluetooth
The corresponding connection key of equipment.
Step 1054:Bluetooth KEY generates encryption key according to connection key corresponding with target Bluetooth devices.
Specifically, bluetooth KEY generate the 4th random number, according to connection key corresponding with target Bluetooth devices, the 4th with
Machine number and target device mark generate and preserve encryption key corresponding with target Bluetooth devices.
Step 1055:Bluetooth KEY and target Bluetooth devices successful connection execute step 106;
Specifically, bluetooth KEY is identified to target Bluetooth devices according to target device and is sent connection completion instruction, is judged whether
It gets the connection from target Bluetooth devices and completes response, if it is, bluetooth KEY judges to connect with target Bluetooth devices
Success executes step 106;Otherwise, bluetooth KEY judge not with target Bluetooth devices successful connection, return to step 102.
In the present embodiment, when bluetooth KEY according to target device mark judge not with target Bluetooth devices successful connection
Afterwards, it can also report an error.
In the present embodiment, can also include after step 105:Bluetooth KEY is by selected target device mark as
Connect device identification, storage connected device mark;Correspondingly, in step 103, when bluetooth KEY gets setting for bluetooth equipment
After standby mark, further include:
Step a1:Bluetooth KEY judge in the device identification got with the presence or absence of and connected device mark match
Device identification, if so, thening follow the steps a2;Otherwise, corresponding operating is executed.
Step a2:Bluetooth KEY will bluetooth equipment corresponding with connected device mark as target Bluetooth devices and target
Bluetooth equipment is attached, and executes step 106.
Wherein, when bluetooth KEY judges that there is no identified with connected device in the device identification got in step a1
After the device identification to match, executing corresponding operating is specially:After bluetooth KEY steps 103, judge before step 104
After the device identification to match with connected device mark is not present in the device identification got, step 104 is continued to execute;When
Bluetooth KEY after step 104, judges to be not present and connected device mark in the device identification got before step 105
After sensible matched device identification, step 105 is continued to execute.
It should be noted that can also include before step 105:Bluetooth KEY is by the first device identification in device identification
It is set as current markers information;
Correspondingly, step 105 specifically includes:After bluetooth KEY detects confirmation signal, current markers information is obtained, it will
Current markers information is identified as target device, is identified according to target device, is established and is connected with corresponding target Bluetooth devices;
After bluetooth KEY, which is detected, turns over signal, bluetooth KEY judges whether current markers information is the first device identification,
If it is, return to step 105;Otherwise, it sets upper a device identification for current markers information to current markers information, returns
Return step 105;
After bluetooth KEY, which is detected down, turns over signal, bluetooth KEY judges whether current markers information is the last one equipment mark
Know, if it is, return to step 105;Otherwise, next device identification of current markers information is set to current markers letter
Breath, return to step 105.
Embodiment 2
A kind of method that establishing bluetooth connection is present embodiments provided to specifically include as Figure 3-Figure 4:
Step 201:Bluetooth KEY is powered on, and setting bluetooth discovery mode is stealth mode;
Step 202:Bluetooth KEY empties first buffering area, and the facility information of bluetooth equipment is searched in the first preset time;
Specifically, bluetooth KEY initializing various variables empty first buffering area, open timer in the first preset time
The facility information of interior search bluetooth equipment.In the present embodiment, the first preset time can be 60s.
In the present embodiment, initializing various variables are specially:Set each variable to initial value.Preferably, initial value
It is 1.
In the present embodiment, each variable specifically includes:Current device sum and current markers message identification.
Step 203:Bluetooth KEY judges the facility information of bluetooth equipment whether is searched in the first preset time, if so,
Then follow the steps 204;Otherwise, using the first presupposed information as information to be selected, the first presupposed information of setting is current markers information,
Execute step 206;
In the present embodiment, the first presupposed information can be " re-searching for " etc., and bluetooth KEY is arranged after the first presupposed information
There are end mark, bluetooth KEY that the first presupposed information can also be stored in advance in first buffering area.
In the present embodiment, it is preferable that end mark accords with for new line.
Step 204:Bluetooth KEY obtains the device identification in facility information and device identification is stored in first buffering area;
In the present embodiment, device identification includes the device name of bluetooth equipment and/or the MAC Address of bluetooth equipment.
For example, bluetooth KEY obtains the MAC Address of the device name and bluetooth equipment of bluetooth equipment, according to " bluetooth equipment
Device name | the MAC Address of bluetooth equipment " format the device identification of bluetooth equipment is stored in first buffering area;
In this step, after getting the device identification of a bluetooth equipment, end mark is added after device identification and is incited somebody to action
Current device sum adds 1.
It should be noted that after step 204, it can be with return to step 203.
Step 205:The first presupposed information is arranged using the first presupposed information and device identification as information to be selected in bluetooth KEY
For current markers information;
Specifically, bluetooth KEY is using the device identification of the bluetooth equipment in the first presupposed information and first buffering area as waiting for
Information is selected, it is current markers information that the first presupposed information, which is arranged, in bluetooth KEY, and setting current markers message identification is initial value.
In the present embodiment, bluetooth KEY be arranged any one information to be selected be current markers information after, when bluetooth KEY is in liquid
When brilliant screen display information to be selected, current markers information can be focused on display.For example, current markers presentation of information is by bluetooth KEY
Other presentation of information to be selected are white gravoply, with black engraved characters etc. by black matrix wrongly written or mispronounced character.
Step 206:Bluetooth KEY is in liquid crystal screen display information to be selected;
Specifically, bluetooth KEY shows the first presupposed information in the first trip of liquid crystal display, other except the first trip of liquid crystal display
Row display is stored in the device identification of the bluetooth equipment in first buffering area.
In the present embodiment, the device identification of each bluetooth equipment can be displayed in a line or multirow of liquid crystal display.
Step 207:Bluetooth KEY is searched in second buffering area with the presence or absence of the connected device mark to match with device identification
Know, if so, thening follow the steps 217;Otherwise, step 208 is executed;
Step 208:Bluetooth KEY detects trigger signal;After it is confirmation signal to detect trigger signal, step 209 is executed;
After turning over signal under detecting that trigger signal is, step 212 is executed;After it is to turn over signal to detect trigger signal, step is executed
Rapid 214;
Step 209:Bluetooth KEY judges whether current markers information is the first presupposed information, if it is, return to step
202;Otherwise, step 210 is executed;
Specifically, bluetooth KEY judges whether current markers message identification is initial value, if it is, judging current markers
Information is the first presupposed information;Otherwise, it is the first presupposed information to judge current markers information not.
Step 210:Bluetooth KEY obtains current markers information, is identified current markers information as target device, according to mesh
Marking device identifies and target Bluetooth devices establish connection;
Step 211:Bluetooth KEY judge whether with target Bluetooth devices successful connection, if so, thening follow the steps 216;It is no
Then, return to step 202;
In the present embodiment, after bluetooth KEY judges not with target Bluetooth devices successful connection, it can also report an error.
Step 212:Bluetooth KEY judges whether current markers information is last information to be selected, if it is, return to step
208;Otherwise, step 213 is executed;
Specifically, bluetooth KEY judges whether current markers message identification is equal with current device sum, if it is, sentencing
Disconnected current markers information is last information to be selected;Otherwise, it is last information to be selected to judge current markers information not.
Step 213:Bluetooth KEY sets next information to be selected of current markers information to current markers information, returns
Step 208;
Specifically, bluetooth KEY sets next information to be selected of current markers information to current markers information, will be current
Label information mark plus 1.
Step 214:Bluetooth KEY judges whether current markers information is the first information to be selected, if it is, return to step
208;It is no to then follow the steps 215;
Specifically, bluetooth KEY judges whether current markers message identification is initial value, if it is, judging current markers
Information is the first information to be selected, and otherwise, it is the first information to be selected to judge current markers information not.
Step 215:Bluetooth KEY sets a upper information to be selected for current markers information to current markers information, returns
Step 208;
Specifically, bluetooth KEY sets a upper information to be selected for current markers information to current markers information, will be current
Label information mark subtracts 1.
Step 216:Current markers information is stored in second buffering area by bluetooth KEY, executes
Step 218;
Step 217:Bluetooth KEY will bluetooth equipment corresponding with connected device mark as target Bluetooth devices and mesh
Mark bluetooth equipment establish connection, judge whether with target Bluetooth devices successful connection, if so, thening follow the steps 218;Otherwise,
Return to step 202;
Step 218:Bluetooth KEY is waited for receiving by Bluetooth channels and be instructed, and is signed when receiving review by Bluetooth channels
After instruction, step 219 is executed;After receiving other instructions by Bluetooth channels, bluetooth KEY executes corresponding operating, returns to step
Rapid 218.
Specifically, after bluetooth KEY receives the instruction from target Bluetooth devices by Bluetooth channels, bluetooth KEY solutions
Analysis instruction, according to the instruction head decision instruction type of instruction.When bluetooth KEY judges that instruction type is according to the instruction head of instruction
After checking signature command, step 219 is executed;When bluetooth KEY judges that instruction type is to generate at random according to the instruction head of instruction
After number instruction, then the 5th random number is generated, sends the 5th random number, return to step 218;When bluetooth KEY is according to the instruction of instruction
Head judges that instruction type is after generating key pair instruction, to generate the second key pair, return to step 218;When bluetooth KEY is according to finger
The instruction head of order judges that instruction type is after reading public key instruction, to send the third public key of the second cipher key pair, return to step
218;
In the present embodiment, when bluetooth KEY judges that instruction type is to generate key pair instruction, life according to the instruction head of instruction
After the second key pair, the third public key of the second cipher key pair, return to step 218 can also be directly transmitted;
In the present embodiment, third public key and private key for user are corresponding.
This step can also be specially:Bluetooth KEY, which waits for receiving by Bluetooth channels in the second preset time, comes from mesh
The instruction for marking bluetooth equipment executes step after receiving review signature command by Bluetooth channels in the second preset time
219;After the second preset time receives other instructions by Bluetooth channels, bluetooth KEY executes corresponding operating, return to step
218;After receiving instruction not over Bluetooth channels in the second preset time, into dormant state;
In the present embodiment, it is preferable that the second preset time is 30s.
It should be noted that after bluetooth KEY enters dormant state, the indigo plant of bluetooth KEY detection and target Bluetooth devices
Whether tooth connection is effective, if it is, after receiving review signature command by Bluetooth channels, exits dormant state, according to
It checks signature command and obtains transaction message, continue;After receiving other instructions by Bluetooth channels, dormant state is exited, is held
Row corresponding operating, return to step 202;Otherwise, dormant state is exited, output connection disconnects information, return to step 202 or pass
Machine.
Or after bluetooth KEY enters dormant state, whether bluetooth KEY detects the bluetooth connection with target Bluetooth devices
Effectively, if it is, after receiving review signature command by Bluetooth channels, dormant state is exited, is referred to according to review signature
It enables and obtains transaction message, continue;After detecting trigger signal, dormant state, return to step 218 are exited;Otherwise, suspend mode is exited
State, output connection disconnect information, return to step 202 or shutdown.
Step 219:Bluetooth KEY obtains the transaction message in review signature command;
Step 220:Bluetooth KEY judges whether transaction message is correct, if so, thening follow the steps 221;Otherwise, bluetooth KEY
Display operation fails, return to step 218;
In this step, bluetooth KEY can judge transaction message according to whether the format of transaction message meets preset format
It is whether correct.
Step 221:Bluetooth KEY is handled to obtain Hash result and be preserved to transaction message progress Hash, preserves transaction message
In key message and in liquid crystal screen display key message, execute step 222;
Step 222:After bluetooth KEY detects trigger signal, bluetooth KEY judges the type of trigger signal, when judging
Trigger signal is after up/down turns over signal, to then follow the steps 223;After it is confirmation signal to judge trigger signal, then follow the steps
224;After it is cancelling signal to judge trigger signal, 227 are thened follow the steps;
Wherein, after bluetooth KEY detects trigger signal, bluetooth KEY can also judge marking keys whether set, if
It is the type that then bluetooth KEY judges trigger signal, continues;Otherwise return to step 218.
Step 223:Bluetooth KEY shows key message, return to step 218 by liquid crystal display page up/down;
Step 224:Bluetooth KEY signs to the Hash result of preservation using private key for user, judges whether signature succeeds,
If so, thening follow the steps 225;Otherwise, step 226 is executed;
Further, further include that message is shown that complement mark is set as after completion key message is all exported and shown
Effectively.Correspondingly, further include before step 224:Bluetooth KEY judges that message shows whether complement mark is effective, is to execute step
Rapid 224;Otherwise, step 226 is executed;
Step 225:The success of bluetooth KEY display operations, preserves signature result, return to step 218;
Further, after bluetooth KEY outputs operate successfully, marking keys can also be removed.
Step 226:Bluetooth KEY display operations fail, return to step 218;
Further, after bluetooth KEY exports operation failure, marking keys can also be removed.
Step 227:Bluetooth KEY display operations are cancelled, return to step 218.
Further, after bluetooth KEY display operations are cancelled, marking keys can also be removed.
In the present embodiment, when current markers information is specially current screen label information, step 206 specifically includes:
Step a1:Bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
Judging whether can be in the whole information to be selected of liquid crystal screen display, if so, thening follow the steps a2;Otherwise, execute step a3 or
Person's step d1;
Specifically, bluetooth KEY is according to the byte number of information to be selected, the default display line number of liquid crystal display, default often row byte
Number and preset characters size judge whether can be in the whole information to be selected of liquid crystal screen display, if so, thening follow the steps a2;It is no
Then, step a3 is executed.
Wherein, the displayable maximum number of lines of often screen that display line number is preset liquid crystal display is preset, it is preferable that default display
Line number is 4 rows;Default often row byte number is the often capable displayable maximum number of byte of preset liquid crystal display, it is preferable that default every
Row byte number is 16 bytes;Preset characters size is the size of displayable each character of preset liquid crystal display, it is preferable that
Preset characters size is 12 pounds.
Step a2:Bluetooth KEY executes step 207 in the whole information to be selected of liquid crystal screen display;
Specifically, bluetooth KEY shows the first presupposed information in the first trip of liquid crystal display, other except the first trip of liquid crystal display
Row shows device identification.
Step a3:Bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
Obtaining split screen information to be selected will currently shield using the first screen information to be selected in split screen information to be selected as information to be selected is currently shielded
First information to be selected of label information is currently shielded information to be selected in liquid crystal screen display, is executed as current screen label information
Step 207;
Specifically, bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
Split screen information to be selected is obtained, using the first screen information to be selected in split screen information to be selected as information to be selected is currently shielded, according to current
The number for shielding the end mark of information to be selected obtains current screen equipment sum, shields label information using the first presupposed information as current,
The current screen label information of setting is identified as initial value.Currently shield information to be selected in liquid crystal screen display.
Correspondingly, after bluetooth KEY executes step a3, step 213 specifically includes:
Step b1:Bluetooth KEY judges whether to need to show the next screen information to be selected for currently shielding information to be selected, if so,
Then follow the steps b2;Otherwise, using next information to be selected of current screen label information as current screen label information, return to step
208;
Specifically, it is equal equal to current screen equipment sum to judge that current screen label information is identified whether by bluetooth KEY, if
It is to then follow the steps b2;Otherwise, using next information to be selected of current screen label information as current screen label information, will work as
Preceding screen label information mark plus 1, adds 1, return to step 208 by current markers message identification;
Step b2:Bluetooth KEY will work as using the next screen for currently shielding information to be selected information to be selected as information to be selected is currently shielded
First information to be selected of preceding screen information to be selected currently shields information to be selected, return to step as current screen label information, display
208;
Specifically, bluetooth KEY will work as using the next screen for currently shielding information to be selected information to be selected as information to be selected is currently shielded
First information to be selected of preceding screen information to be selected is as current screen label information, according to for the end mark for currently shielding information to be selected
Number obtains current screen equipment sum, and current screen label information is arranged and is identified as initial value, current markers message identification is added 1, is shown
Show and currently shields information to be selected, return to step 208;
After bluetooth KEY executes step a3, step 215 specifically includes:
Step c1:Bluetooth KEY judges whether to need to show the upper screen information to be selected for currently shielding information to be selected, if so,
Then follow the steps c2;Otherwise, a upper information to be selected for current screen label information is shielded label information by bluetooth KEY as current,
Return to step 208;
Specifically, bluetooth KEY judges whether that currently shielding label information identifies whether to be less than 1, if so, thening follow the steps
c2;Otherwise, bluetooth KEY will currently shield mark using a upper information to be selected for current screen label information as current screen label information
Note message identification subtracts 1, return to step 208;
Step c2:Bluetooth KEY will work as using the upper screen information to be selected for currently shielding information to be selected as information to be selected is currently shielded
First information to be selected of preceding screen information to be selected currently shields information to be selected, return to step as current screen label information, display
208。
Specifically, bluetooth KEY will work as using the upper screen information to be selected for currently shielding information to be selected as information to be selected is currently shielded
First information to be selected of preceding screen information to be selected is as current screen label information, according to for the end mark for currently shielding information to be selected
Number obtains current screen equipment sum, and current screen label information is arranged and is identified as initial value, subtracts 1 by current screen label information mark,
Information to be selected, return to step 208 are currently shielded in display.
Step d1:Bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
The first screen information to be selected is obtained, using the first screen information to be selected as information to be selected is currently shielded, will currently shield the first of information to be selected
A information to be selected currently shields information to be selected as current screen label information, in liquid crystal screen display, executes step 207;
Specifically, bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
The first screen information to be selected is obtained, using the first screen information to be selected as information to be selected is currently shielded, according to the knot for currently shielding information to be selected
The number of beam symbol obtains current screen equipment sum, and using the first presupposed information as current screen label information, current screen label is arranged
Message identification is initial value.Currently shield information to be selected in liquid crystal screen display, executes step 207;
Correspondingly, after bluetooth KEY executes step d1, step 213 specifically includes:
Step f1:Bluetooth KEY judges whether to need to show the next screen information to be selected for currently shielding information to be selected, if so,
Then follow the steps f2;Otherwise, using next information to be selected of current screen label information as current screen label information, return to step
208;
Specifically, it is equal equal to current screen equipment sum to judge that current screen label information is identified whether by bluetooth KEY, if
It is to then follow the steps f2;Otherwise, using next information to be selected of current screen label information as current screen label information, will work as
Preceding screen label information mark plus 1, adds 1, return to step 208 by current markers message identification;
Step f2:Bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
The next screen information to be selected for currently shielding information to be selected is obtained, using the next screen for currently shielding information to be selected information to be selected as current screen
Information to be selected shows using first information to be selected for currently shielding information to be selected as current screen label information and currently shields letter to be selected
Breath, return to step 208;
Specifically, bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
The next screen information to be selected for currently shielding information to be selected is obtained, using the next screen for currently shielding information to be selected information to be selected as current screen
Information to be selected, will currently shield first information to be selected of information to be selected as current screen label information, according to currently shielding letter to be selected
The number of the end mark of breath obtains current screen equipment sum, and current screen label information is arranged and is identified as initial value, by current markers
Message identification adds 1, and information to be selected, return to step 208 are currently shielded in display;
After bluetooth KEY executes step d1, step 215 specifically includes:
Step g1:Bluetooth KEY judges whether to need to show the upper screen information to be selected for currently shielding information to be selected, if so,
Then follow the steps g2;Otherwise, a upper information to be selected for current screen label information is shielded label information by bluetooth KEY as current,
Return to step 208;
Specifically, bluetooth KEY judges whether that currently shielding label information identifies whether to be less than 1, if so, thening follow the steps
g2;Otherwise, bluetooth KEY will currently shield mark using a upper information to be selected for current screen label information as current screen label information
Note message identification subtracts 1, return to step 208;
Step g2:Bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
The upper screen information to be selected for currently shielding information to be selected is obtained, will currently shield the upper screen information to be selected of information to be selected as current screen
Information to be selected shows using first information to be selected for currently shielding information to be selected as current screen label information and currently shields letter to be selected
Breath, return to step 208.
Specifically, bluetooth KEY is according to information to be selected, default display line number, default often row byte number and preset characters size
The upper screen information to be selected for currently shielding information to be selected is obtained, will currently shield the upper screen information to be selected of information to be selected as current screen
Information to be selected, will currently shield first information to be selected of information to be selected as current screen label information, according to currently shielding letter to be selected
The number of the end mark of breath obtains current screen equipment sum, and current screen label information is arranged and is identified as initial value, will currently shield mark
Note message identification subtracts 1, and information to be selected, return to step 208 are currently shielded in display.
Wherein, bluetooth KEY establishes connection according to target device mark and target Bluetooth devices and specifically includes:
Step h1:After bluetooth KEY detects confirmation signal, bluetooth KEY is judged whether according to target device mark and mesh
Mark bluetooth equipment has matched, if so, thening follow the steps h4;Otherwise, step h2 is executed;
Specifically, bluetooth KEY is identified to target Bluetooth devices according to target device and is sent authentication instruction, is received and is come from target
The authentication responses of bluetooth equipment obtain authenticating result according to authentication responses, judge whether to set with target Bluetooth according to authenticating result
It is standby to have matched, if authenticating result is successfully, judges that target device mark judge to have been matched with target Bluetooth devices, then hold
Row step h4;If authenticating result is failure, judgement is no and target Bluetooth devices match, and executes step h2.
More specifically, it includes the first random number that bluetooth KEY, which is identified according to target device to target Bluetooth devices transmission,
Whether authentication instruction, receives the authentication responses from target Bluetooth devices, judge in authentication responses to include the first error identification, such as
Fruit is to then follow the steps h2;Otherwise, bluetooth KEY inquire itself whether there is connection key corresponding with target Bluetooth devices, when
After bluetooth KEY does not inquire the connection key corresponding with target Bluetooth devices of itself, bluetooth KEY judgement authenticating results are mistake
It loses, executes step h2;After bluetooth KEY inquires the connection key corresponding with target Bluetooth devices of itself, then according to connection
Key, the first random number and target device mark obtain the first validation value, judge the first validation value whether with authentication responses phase
Match, if the first validation value is matched with authentication responses, judges that authenticating result for success, thens follow the steps h4;If the
One verification number and authentication responses mismatch, then judge that authenticating result for failure, thens follow the steps h2.
In the present embodiment, the first error identification can be " NO_PIN ".
Step h2:Bluetooth KEY is matched according to target device mark and target Bluetooth devices;
Specifically, bluetooth KEY is identified to target Bluetooth devices according to target device and is sent matched order, is received and is come from target
The pairing response of bluetooth equipment obtains the matching method of target Bluetooth devices according to pairing response, according to target Bluetooth devices
Matching method and target Bluetooth devices are matched.
In the present embodiment, when the matching method for the target Bluetooth devices that bluetooth KEY is got according to pairing response is first
After mode, bluetooth KEY is according to the first public key of itself and the second public key of target Bluetooth devices is identified by target device and mesh
Mark bluetooth equipment is matched.
It specifically includes:
Step m1:Bluetooth KEY generates first key pair, is identified by target device close to target Bluetooth devices transmission first
First public key of key centering obtains the second public key from target Bluetooth devices;According to the second public key and first key centering
First private key generates first key;
Step m2:Bluetooth KEY generates the second random number, by target device identify to target Bluetooth devices send second with
Machine number obtains the third random number from target Bluetooth devices;
Step m3:Bluetooth confirms key according to first key, the second random number and third generating random number, is set by target
It is standby identify to send to target Bluetooth devices confirm key, obtain and confirm as a result, after it is successfully to confirm result, then judge and target
Bluetooth equipment successful matching.
Can also include before step m3:Bluetooth KEY obtains the privacy key from target Bluetooth devices, according to the first public affairs
Key, the second public key and third random number judge whether privacy key is correct, if it is, execute step m3;Otherwise, return to step
m1。
After the matching method for the target Bluetooth devices that bluetooth KEY is got according to pairing response is second method, bluetooth
KEY is according to the first public key of itself, the first PIN code of itself, the second public key of target Bluetooth devices and target Bluetooth devices
Second PIN code, is matched with target Bluetooth devices.
Step n1:Bluetooth KEY generates first key pair, is identified by target device close to target Bluetooth devices transmission first
First public key of key centering obtains the second public key from target Bluetooth devices;According to the second public key and first key centering
First private key generates first key;
Step n2:Bluetooth KEY generates the second random number, by target device identify to target Bluetooth devices send second with
Machine number obtains the third random number from target Bluetooth devices;
Step n3:Bluetooth KEY is according to the first public key, the second public key, the second random number and third generating random number and exports
Whether the first PIN code judges the second PIN code from target Bluetooth devices with first after getting the confirmation signal of user
PIN code matches, if so, thening follow the steps n4;Fail otherwise, it is determined that being matched with target Bluetooth devices, return to step 202;
After bluetooth KEY judgements fail with target Bluetooth devices pairing, it can also report an error.
Step n4:Bluetooth confirms key according to first key, the second random number and third generating random number, is set by target
It is standby identify to send to target Bluetooth devices confirm key, obtain and confirm as a result, after it is successfully to confirm result, then judge and target
Bluetooth equipment successful matching.
Can also include before step n3:Bluetooth KEY obtains the privacy key from target Bluetooth devices, according to the first public affairs
Key, the second public key and third random number judge whether privacy key is correct, if it is, execute step n3;Otherwise, return to step
n1。
Step h3:Bluetooth KEY generates connection key corresponding with target Bluetooth devices;
Specifically, bluetooth KEY is according to first key, the second random number and third generating random number and target Bluetooth devices pair
The connection key answered.
Step h4:Bluetooth KEY generates encryption key according to connection key corresponding with target Bluetooth devices.
Specifically, bluetooth KEY generate the 4th random number, according to connection key corresponding with target Bluetooth devices, the 4th with
Machine number and target device mark generate encryption key corresponding with target Bluetooth devices.
Embodiment 3
A kind of blue-tooth intelligence key devices are present embodiments provided, as shown in figure 5, including:Hidden module 01, search module
02, the first acquisition module 03, output module 04, detection module 05, link block 06 and communication module 07;
Hidden module 01 is stealth mode for bluetooth discovery mode to be arranged;
Search module 02, for after it is stealth mode that bluetooth discovery mode, which is arranged, in hidden module 01, searching for bluetooth equipment
Facility information;
First acquisition module 03, for obtaining device identification in the facility information that search module 02 searches, by equipment
Mark is as information to be selected or using device identification and the first presupposed information as information to be selected;
Output module 04, for when the first acquisition module 03 using device identification as information to be selected or by device identification and
After first presupposed information is as information to be selected, information to be selected is exported;
Detection module 05 detects trigger signal for working as after output module 04 exports information to be selected;
Link block 06 is chosen according to user in information to be selected for working as after detection module 05 detects confirmation signal
Target device mark, with corresponding target Bluetooth devices establish connect;
Link block 06 specifically includes:First judging unit, pairing unit, the first generation unit and the second generation unit;
First judging unit is used for after detection module 05 detects confirmation signal, is judged whether according to target device mark
It has been matched with target Bluetooth devices;
First judging unit, which is specifically used for being identified to target Bluetooth devices according to target device, sends authentication instruction, obtains and
From the authentication responses of target Bluetooth devices, authenticating result is obtained according to authentication responses, is judged whether according to authenticating result and target
Bluetooth equipment has matched, if authenticating result is successfully, judgement and target Bluetooth devices have matched;If authenticating result is to lose
It loses, then judgement is no and target Bluetooth devices match.
Pairing unit is used for after the first judging unit is judged as NO, according to target device mark and corresponding target Bluetooth
Equipment is matched;
Pairing unit is specifically used for after the first judging unit is judged as NO, and is identified to corresponding target according to target device
Bluetooth equipment sends matched order, obtains the pairing response from target Bluetooth devices, and target Bluetooth is obtained according to pairing response
The matching method of equipment, is matched according to matching method and target Bluetooth devices.
Pairing unit specifically includes:First matches sub-unit with sub-unit or second;
First is used for sub-unit after the first judging unit is judged as NO, and is identified to target Bluetooth according to target device
Equipment sends matched order, obtains the pairing response from target Bluetooth devices, and target Bluetooth devices are obtained according to pairing response
Matching method, when matching method be first method after, according to the second public key of the first public key of itself and target Bluetooth devices
It is matched with target Bluetooth devices.
Second is used for sub-unit after the first judging unit is judged as NO, and is identified to target Bluetooth according to target device
Equipment sends matched order, obtains the pairing response from target Bluetooth devices, and target Bluetooth devices are obtained according to pairing response
Matching method, when matching method be second method after, according to the first public key of itself, itself the first PIN code, target Bluetooth
Second public key of equipment and the second PIN code of target Bluetooth devices, are matched with target Bluetooth devices.
First generation unit is used to be matched according to target device mark and corresponding target Bluetooth devices when pairing unit
To rear, generation connection key corresponding with target Bluetooth devices;
Second generation unit is used to generate encryption key according to the connection key that the first generation unit generates and when first
After judging unit is judged as YES, encryption key is generated according to the connection key that the first generation unit generates.
Second generation unit is specifically used for the connection key generated according to the first generation unit and target device mark generates
Encryption key and after the first judging unit is judged as YES, the connection key and target device generated according to the first generation unit
Mark generates encryption key.
Communication module 07, for being identified according to the target device that user chooses in information to be selected when link block 06, with
After corresponding target Bluetooth devices establish connection, the instruction to be received from target Bluetooth devices is waited.
In the present embodiment, communication module 07 can specifically include:First receiving unit, review unit and signature unit;Phase
Ying Di:
First receiving unit is used to be identified according to the target device that user chooses in information to be selected when link block 06, with
After target Bluetooth devices establish connection, waiting receives the instruction from target Bluetooth devices,
Review unit is used to receive the review label from target Bluetooth devices by Bluetooth channels when the first receiving unit
After name instruction, transaction message is obtained according to review signature command, Hash result and key message are obtained according to transaction message;
Signature unit is used for after detection module 05 detects confirmation signal, is got to review unit using private key for user
Hash result sign, obtain signature result;
Output module 04 is additionally operable to the key message that output review unit is got;And output is obtained according to signature unit
The obtained operating result of signature result.
Further, output module 04 can be also used for after exporting key message, when detection module 05 detects up/down
After turning over signal, up/down turns over output key message;And after exporting key message, when detection module 05 detects cancelling signal
Afterwards, operation failure is exported.
In the present embodiment, communication module 07 specifically includes:First receiving unit and suspend mode unit,
First receiving unit is used to establish after connection when link block 06 and target Bluetooth devices, waits to be received from target
The instruction of bluetooth equipment;
Suspend mode unit is used to be not received by from target Bluetooth devices in the second preset time when the first receiving unit
Instruction when, enter dormant state.
In the present embodiment, it is preferable that the second preset time is 30s.
Further, communication module 07 can also include detection connection unit;
It detects connection unit to be used for after suspend mode unit enters dormant state, detection and the bluetooth of target Bluetooth devices connect
Whether effectively to connect;
Correspondingly:Suspend mode unit is additionally operable to after detection connection unit is detected as no, exit dormant state;When detection connects
Unit is detected as being and after the first receiving unit receives the instruction from target Bluetooth devices by Bluetooth channels, exiting not
Dormancy state executes corresponding operating according to the type of described instruction;And when detection connection unit be detected as be and detection module 05
After detecting trigger signal, dormant state is exited;Output module 04 is additionally operable to be detected as no and work as suspend mode when detection connection unit
After unit exits dormant state, output connection disconnects information.
In the present embodiment, blue-tooth intelligence key devices can also include memory module and time gang mould block;
The target device that memory module is used to chosen in information to be selected according to user when link block 06 identifies, and corresponding
Target Bluetooth devices establish connection after, by target device mark as connected device mark preserve;
Gang mould block is returned to be used to obtain in the device identification that the first acquisition module 03 is got and connected device mark phase
Matched device identification, then will bluetooth equipment corresponding with connected device mark as target Bluetooth devices, with target Bluetooth
Equipment establishes connection;
Communication module 07 is additionally operable to after returning gang mould block with target Bluetooth devices foundation connection, wait to be received blue from target
The instruction of tooth equipment.
In the present embodiment, the first acquisition module 03 is additionally operable to not search the equipment letter of bluetooth equipment when search module 02
After breath, using the first presupposed information as information to be selected;Correspondingly:Output module 04 is additionally operable to work as the first acquisition module 03 by first
After presupposed information is as information to be selected, information to be selected is exported.
Further, blue-tooth intelligence key devices further include the first mark module;Link block 06 specifically includes first really
Recognize unit, the first connection unit, second judgment unit, first turn over and turn over unit under unit and first;
First mark module is used for before output module 04 exports information to be selected, and the first presupposed information of setting is current mark
Remember information;
First confirmation unit is used for after detection module 05 detects confirmation signal, obtains current markers information;
Second judgment unit is used to judge whether the current markers information that the first confirmation unit is got to be the first default letter
Breath;After detection module 05, which detects, turns over signal, judge whether current markers information is the first information to be selected;Work as detection module
After 05 detects down and turns over signal, judge whether current markers information is last information to be selected;
Search module 02 is additionally operable to judge that the current markers information that the first confirmation unit is got is when second judgment unit
After first presupposed information, the facility information of bluetooth equipment is searched for;
First connection unit is used for after it is the first presupposed information that second judgment unit, which judges current markers information not, will
Current markers information is identified as target device, is identified according to target device, is established and is connected with corresponding target Bluetooth devices;
First, which turns over unit, is used for after it is the first information to be selected that second judgment unit, which judges current markers information not, will
A upper information to be selected for current markers information is set as current markers information;
Unit is turned under first to be used for after it is last information to be selected that second judgment unit, which judges current markers information not, it will
Next information to be selected of current markers information is set as current markers information.
Further, when current markers information is specially current screen label information;Output module 04 specifically includes:The
Three judging units, the first display unit, first acquisition unit;
Third judging unit is used for according to information to be selected, default display line number, default often row byte number and preset characters are big
It is small that judge whether can be in the whole information to be selected of liquid crystal screen display;
First acquisition unit is specifically used for after third judging unit is judged as NO, according to information to be selected, default display line
Number, default often row byte number and preset characters acquiring size split screen information to be selected, the first screen in split screen information to be selected is to be selected
Information is set as first information to be selected of current screen label information currently to shield label information as information to be selected is currently shielded;
First display unit is for showing the currently screen information to be selected that first acquisition unit is got;And when third judges
Unit judges are after being, in the whole information to be selected of liquid crystal screen display;It turns over unit and will currently shield the upper of information to be selected when first
One screen information to be selected will currently shield first information to be selected of information to be selected as current screen label as information to be selected is currently shielded
After information, currently shield information to be selected in liquid crystal screen display;Unit is turned under first to wait for the next screen for currently shielding information to be selected
It selects information as information to be selected is currently shielded, will currently shield first information to be selected of information to be selected as current screen label information
Afterwards, currently shield information to be selected in liquid crystal screen display;
First, which turns over unit, is specifically used for:It is the first information to be selected to judge current markers information not when second judgment unit
Afterwards, judge whether to need to show the upper screen information to be selected for currently shielding information to be selected, if so, will currently shield the upper of information to be selected
One screen information to be selected will currently shield first information to be selected of information to be selected as current screen label as information to be selected is currently shielded
Information;Otherwise, using a upper information to be selected for current screen label information as current screen label information;
Unit is turned under first to be specifically used for:It is last information to be selected to judge current markers information not when second judgment unit
Afterwards, judge whether to need to show the next screen information to be selected for currently shielding information to be selected, if it is, will currently shield information to be selected
Next screen information to be selected will currently shield first information to be selected of information to be selected as current screen mark as information to be selected is currently shielded
Remember information;Otherwise, using next information to be selected of current screen label information as current screen label information.
When current markers information is specially current screen label information, output module 04 can also specifically include:4th sentences
Disconnected unit, the second display unit and second acquisition unit;
4th judging unit is used for according to information to be selected, default display line number, default often row byte number and preset characters are big
It is small that judge whether can be in the whole information to be selected of liquid crystal screen display;
Second display unit is used to show the currently screen information to be selected that second acquisition unit is got, and when the 4th judgement
Unit judges are after being, in the whole information to be selected of liquid crystal screen display;When first turn over unit judges and go out be need to show it is current
Shield the upper screen information to be selected of information to be selected, and using the upper screen information to be selected for currently shielding information to be selected as currently shielding letter to be selected
Breath shows after currently shielding first information to be selected of information to be selected as current screen label information and currently shields information to be selected;When
It is to need to show the next screen information to be selected for currently shielding information to be selected, and will currently shield information to be selected to turn over unit judges under first to go out
Next screen information to be selected as information to be selected is currently shielded, will currently shield first information to be selected of information to be selected as currently shielding
After label information, information to be selected is currently shielded in display;
Second acquisition unit is used for according to information to be selected, default display line number, default often row byte number and preset characters are big
Small acquisition the first screen information to be selected will currently shield the of information to be selected using the first screen information to be selected as information to be selected is currently shielded
One information to be selected is as current screen label information;
First, which turns over unit, is specifically used for judging whether to need to show the upper screen information to be selected for currently shielding information to be selected, such as
Fruit is, then according to information to be selected, default display line number, default often row byte number and preset characters acquiring size currently shield letter to be selected
The upper screen information to be selected of breath, will currently shield the upper screen information to be selected of information to be selected as information to be selected is currently shielded, will be current
Shield first information to be selected of information to be selected as current screen label information;Otherwise, upper one of current screen label information is waited for
Select information as current screen label information;
Unit is turned under first to be specifically used for:Judge whether to need to show the next screen information to be selected for currently shielding information to be selected,
If it is, currently being shielded according to information to be selected, default display line number, default often row byte number and preset characters acquiring size to be selected
The next screen information to be selected of information will be worked as using the next screen for currently shielding information to be selected information to be selected as information to be selected is currently shielded
First information to be selected of preceding screen information to be selected is as current screen label information;Otherwise, by the next of current screen label information
Information to be selected is as current screen label information.
In the present embodiment, blue-tooth intelligence key devices further include the second mark module;Link block 06 specifically includes second
Confirmation unit, the second connection unit, the 5th judging unit, second turn over turns over unit under unit and second;
Second mark module is used for when the first acquisition module 03 is using device identification as after information to be selected, will be in device identification
The first device identification be set as current markers information;
Second confirmation unit is used for after detection module 05 detects confirmation signal, obtains current markers information;
The current markers information that second connection unit is used to get the second confirmation unit is identified as target device, root
It is identified according to target device, establishes and connect with corresponding target Bluetooth devices;
5th judging unit is used for after detection module 05 detects and turns over signal, judges whether current markers information is the
One mark to be selected;After detection module 05, which detects down, turns over signal, judge whether current markers information is end-use device mark;
Second, which turns over unit, is used for after it is the first information to be selected that the 5th judging unit, which judges current markers information not, will
A upper information to be selected for current markers information is set as current markers information;
Unit is turned under second to be used for after it is last information to be selected that the 5th judging unit, which judges current markers information not, it will
Next information to be selected of current markers information is set as current markers information.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
Any one skilled in the art is in technical scope disclosed by the invention, the change or replacement that can be readily occurred in,
It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
Subject to.
Claims (32)
1. a kind of method for establishing bluetooth connection, which is characterized in that including:
Step S1:It is stealth mode that bluetooth discovery mode, which is arranged, in blue-tooth intelligence key devices;
Step S2:The facility information of the blue-tooth intelligence key devices search bluetooth equipment;
Step S3:After the blue-tooth intelligence key devices search the facility information of bluetooth equipment, the blue-tooth intelligence key
Equipment obtains the device identification in the facility information, using the device identification as information to be selected or by the device identification and
First presupposed information is as information to be selected;
Step S4:The blue-tooth intelligence key devices export the information to be selected;
Step S5:After the blue-tooth intelligence key devices detect confirmation signal, selected in the information to be selected according to user
In target device mark, with corresponding target Bluetooth devices establish connect;
Step S6:The instruction to be received from the target Bluetooth devices such as the blue-tooth intelligence key devices
The step S6 is specifically included:
Step S61:The instruction to be received from the target Bluetooth devices such as the blue-tooth intelligence key devices, when the bluetooth
After intelligent cipher key equipment receives the review signature command from the target Bluetooth devices by Bluetooth channels, according to described multiple
Core signature command obtains transaction message, and Hash result and key message are obtained according to the transaction message, exports the crucial letter
Breath;
Step S62:After the blue-tooth intelligence key devices detect confirmation signal, using private key for user to the Hash result
It signs, obtains signature result, operating result is exported according to the signature result.
2. according to the method described in claim 1, it is characterized in that, further including in the step S62:When the blue-tooth intelligence is close
After key equipment detects that up/down turns over signal, the blue-tooth intelligence key devices up/down turns over the output key message;When described
After blue-tooth intelligence key devices detect cancelling signal, the blue-tooth intelligence key devices export operation failure.
3. according to the method described in claim 1, it is characterized in that, further including in the step S61:When the blue-tooth intelligence is close
When key equipment is not received by the instruction from the target Bluetooth devices in the second preset time, the blue-tooth intelligence key
Equipment enters dormant state.
4. according to the method described in claim 3, it is characterized in that, when the blue-tooth intelligence key devices enter dormant state
Afterwards, further include:Whether the blue-tooth intelligence key devices detection is effective with the bluetooth connection of the target Bluetooth devices, if
It is then after receiving the instruction from the target Bluetooth devices by Bluetooth channels, dormant state to be exited, according to the finger
The type of order executes corresponding operating;Or after detecting trigger signal, dormant state, return to step S6 are exited;Otherwise, it exits not
Dormancy state, output connection disconnect information, return to step S2.
5. according to the method described in claim 1, it is characterized in that, further including after the step S5:By the target device
Mark is preserved as connected device mark;
The blue-tooth intelligence key devices further include after obtaining the device identification in the facility information:The blue-tooth intelligence key
Equipment obtains in the device identification identifies the device identification to match with the connected device, will be set with described have connected
It is standby to identify corresponding bluetooth equipment as target Bluetooth devices, it establishes and connects with the target Bluetooth devices, execute the step
S6。
6. according to the method described in claim 1, it is characterized in that, the step S5 is specifically included:
Step A1:After the blue-tooth intelligence key devices detect confirmation signal, the blue-tooth intelligence key devices are according to institute
It states target device mark to judge whether to have matched with the target Bluetooth devices, if so, thening follow the steps A4;Otherwise, it executes
Step A2;
Step A2:The blue-tooth intelligence key devices are matched according to target device mark and corresponding target Bluetooth devices
It is right;
Step A3:The blue-tooth intelligence key devices generate connection key corresponding with the target Bluetooth devices;
Step A4:The blue-tooth intelligence key devices generate encryption key, the blue-tooth intelligence key devices according to connection key
With the target Bluetooth devices successful connection.
7. according to the method described in claim 6, it is characterized in that, the step A1 is specially:When the blue-tooth intelligence key
After equipment detects confirmation signal, the blue-tooth intelligence key devices, which are identified according to the target device to the target Bluetooth, to be set
Preparation send authentication to instruct, and obtains the authentication responses from the target Bluetooth devices, and authentication knot is obtained according to the authentication responses
Fruit judges whether to have matched with the target Bluetooth devices according to the authenticating result, if the authenticating result is successfully,
Judgement and the target Bluetooth devices have matched;If the authenticating result is failure, the no and target Bluetooth is judged
Device pairing.
8. according to the method described in claim 6, it is characterized in that, the step A2 is specially:The blue-tooth intelligence key is set
Standby identified to corresponding target Bluetooth devices according to the target device sends matched order, and acquisition is set from the target Bluetooth
Standby pairing response obtains the matching method of the target Bluetooth devices according to the pairing response, according to the matching method
It is matched with the target Bluetooth devices.
9. according to the method described in claim 8, it is characterized in that, the matching method includes first method;
It is described to be matched specially according to the matching method and the target Bluetooth devices:When the matching method is described
When first method, the blue-tooth intelligence key devices are according to the first public key of itself and the second public key of the target Bluetooth devices
It is matched with the target Bluetooth devices.
10. according to the method described in claim 8, it is characterized in that, the matching method includes second method;
It is described to be matched specially according to the matching method and the target Bluetooth devices:When the matching method is second
When mode, the blue-tooth intelligence key devices are set according to the first public key, the first PIN code, the target Bluetooth of itself of itself
Second PIN code of standby the second public key and the target Bluetooth devices, is matched with the target Bluetooth devices.
11. according to the method described in claim 6, it is characterized in that, the step A4 is specially:The blue-tooth intelligence key is set
It is standby that the encryption key, the blue-tooth intelligence key devices and institute are generated according to the connection key and target device mark
State target Bluetooth devices successful connection.
12. according to the method described in claim 1, it is characterized in that, when the information to be selected include the first presupposed information when, institute
Stating step S2 further includes later:It is described after the blue-tooth intelligence key devices do not search the facility information of bluetooth equipment
Blue-tooth intelligence key devices execute step S4 using first presupposed information as information to be selected.
13. according to the method for claim 12, it is characterised in that further include before the step S4:It is pre- to be arranged described first
If information is current markers information;
The step S5 is specially:After the blue-tooth intelligence key devices detect confirmation signal, current markers information is obtained,
Judge whether current markers information is first presupposed information, if it is, return to step S2;Otherwise, by the current mark
Remember that information is identified as target device, identified according to the target device, establishes and connect with corresponding target Bluetooth devices;
After the blue-tooth intelligence key devices, which detect, turns over signal, the blue-tooth intelligence key devices judge that current markers are believed
Whether breath is the first information to be selected, if it is, return to step S5;Otherwise, by a upper information to be selected for current markers information
It is set as current markers information, return to step S5;
After the blue-tooth intelligence key devices, which detect down, turns over signal, the blue-tooth intelligence key devices judge that current markers are believed
Whether breath is last information to be selected, if it is, return to step S5;Otherwise, by next information to be selected of current markers information
It is set as current markers information, return to step S5.
14. according to the method for claim 13, which is characterized in that the current markers information is specially current screen label letter
Breath, the step S4 are specifically included:
Step a1:The blue-tooth intelligence key devices according to the information to be selected, default display line number, default often row byte number and
Preset characters size judges whether can be in the whole information to be selected of liquid crystal screen display, if so, thening follow the steps a2;Otherwise,
Execute step a3;
Step a2:The blue-tooth intelligence key devices execute step S5 in the whole information to be selected of liquid crystal screen display;
Step a3:The blue-tooth intelligence key devices according to the information to be selected, default display line number, default often row byte number and
Preset characters acquiring size split screen information to be selected, using the first screen information to be selected in split screen information to be selected as currently shielding letter to be selected
Breath is set as first information to be selected of current screen label information currently to shield label information, currently shield in liquid crystal screen display
Information to be selected executes step S5;
It is described to set a upper information to be selected for current markers information to current markers information and specifically include:
Step c1:The blue-tooth intelligence key devices judge whether to need to show the upper screen letter to be selected for currently shielding information to be selected
Breath, if so, thening follow the steps c2;Otherwise, the blue-tooth intelligence key devices are to be selected by upper one of current screen label information
Information is as current screen label information, return to step S5;
Step c2:The blue-tooth intelligence key devices are to be selected as currently shielding using the upper screen information to be selected for currently shielding information to be selected
Information shows using first information to be selected for currently shielding information to be selected as current screen label information and currently shields information to be selected, return
Return step S5;
It is described to set next information to be selected of current markers information to current markers information and specifically include:
Step b1:The blue-tooth intelligence key devices judge whether to need to show the next screen letter to be selected for currently shielding information to be selected
Breath, if so, thening follow the steps b2;Otherwise, using next information to be selected of current screen label information as current screen label letter
Breath, return to step S5;
Step b2:The blue-tooth intelligence key devices are to be selected as currently shielding using the next screen for currently shielding information to be selected information to be selected
Information shows using first information to be selected for currently shielding information to be selected as current screen label information and currently shields information to be selected, return
Return step S5.
15. according to the method for claim 13, which is characterized in that the current markers information is specially current screen label letter
Breath, the step S4 are specifically included:
Step a1:The blue-tooth intelligence key devices according to the information to be selected, default display line number, default often row byte number and
Preset characters size judges whether can be in the whole information to be selected of liquid crystal screen display, if so, thening follow the steps a2;Otherwise,
Execute step d1;
Step a2:The blue-tooth intelligence key devices execute step S5 in the whole information to be selected of liquid crystal screen display;
Step d1:Blue-tooth intelligence key devices are according to the information to be selected, default display line number, default often row byte number and default
Character boundary obtains the first screen information to be selected will currently shield letter to be selected using the first screen information to be selected as information to be selected is currently shielded
First information to be selected of breath currently shields information to be selected as current screen label information, in liquid crystal screen display, executes step S5;
It is described to set a upper information to be selected for current markers information to current markers information and specifically include:
Step g1:The blue-tooth intelligence key devices judge whether to need to show the upper screen letter to be selected for currently shielding information to be selected
Breath, if so, thening follow the steps g2;Otherwise, blue-tooth intelligence key devices will currently shield a upper information to be selected for label information
As current screen label information, return to step S5;
Step g2:The blue-tooth intelligence key devices are according to information to be selected, default display line number, default often row byte number and preset
Character boundary obtains the upper screen information to be selected for currently shielding information to be selected, and the upper screen for currently shielding information to be selected information to be selected is made
Currently to shield information to be selected, using first information to be selected for currently shielding information to be selected as current screen label information, show current
Shield information to be selected, return to step S5;
It is described to set next information to be selected of current markers information to current markers information and specifically include:
Step f1:The blue-tooth intelligence key devices judge whether to need to show the next screen letter to be selected for currently shielding information to be selected
Breath, if so, thening follow the steps f2;Otherwise, using next information to be selected of current screen label information as current screen label letter
Breath, return to step S5;
Step f2:The blue-tooth intelligence key devices are according to information to be selected, default display line number, default often row byte number and preset
Character boundary obtains the next screen information to be selected for currently shielding information to be selected, and the next screen for currently shielding information to be selected information to be selected is made
Currently to shield information to be selected, using first information to be selected for currently shielding information to be selected as current screen label information, show current
Shield information to be selected, return to step S5.
16. according to the method described in claim 1, it is characterized in that, it is described using the device identification as information to be selected after, institute
Further include before stating step S4:Set the first device identification in the device identification to current markers information;
The step S5 is specifically included:After the blue-tooth intelligence key devices detect confirmation signal, current markers letter is obtained
Breath is identified current markers information as target device, is identified according to the target device, is built with corresponding target Bluetooth devices
Vertical connection;
After the blue-tooth intelligence key devices, which detect, turns over signal, the blue-tooth intelligence key devices judge that current markers are believed
Whether breath is the first information to be selected, if it is, return to step S5;Otherwise, by a upper information to be selected for current markers information
It is set as current markers information, return to step S5;
After the blue-tooth intelligence key devices, which detect down, turns over signal, the blue-tooth intelligence key devices judge that current markers are believed
Whether breath is last information to be selected, if it is, return to step S5;Otherwise, by next information to be selected of current markers information
It is set as current markers information, return to step S5.
17. a kind of blue-tooth intelligence key devices, which is characterized in that including:It is hidden module, search module, the first acquisition module, defeated
Go out module, detection module, link block and communication module;
The hidden module is stealth mode for bluetooth discovery mode to be arranged;
Described search module, for after hidden module setting bluetooth discovery mode is stealth mode, searching for bluetooth equipment
Facility information;
First acquisition module, for described search block search to facility information in obtain device identification, will be described
Device identification is as information to be selected or using the device identification and the first presupposed information as information to be selected;
The output module is set for working as first acquisition module using the device identification as information to be selected or by described
After standby mark and the first presupposed information are as information to be selected, the information to be selected is exported;
The detection module, for after the output module exports the information to be selected, detecting trigger signal;
The link block, for working as after the detection module detects confirmation signal, according to user in the information to be selected
The target device mark chosen, establishes with corresponding target Bluetooth devices and connects;
The communication module, the target device mark for being chosen in the information to be selected according to user when the link block
Know, after establishing connection with corresponding target Bluetooth devices, waits the communication of the instruction from the target Bluetooth devices to be received
Module specifically includes:First receiving unit, review unit and signature unit;
First receiving unit is used to establish after connection when the link block and the target Bluetooth devices, waits to be received next
From the instruction of the target Bluetooth devices;
The review unit is used to receive from the target Bluetooth devices by Bluetooth channels when first receiving unit
Review signature command after, according to the review signature command obtain transaction message, according to the transaction message obtain Hash knot
Fruit and key message;
The signature unit is used for after the detection module detects confirmation signal, using private key for user to the review unit
The Hash result got is signed, and signature result is obtained;
The output module is additionally operable to export the key message that the review unit is got;And output is according to the label
The operating result that the signature result that name unit obtains obtains.
18. equipment according to claim 17, which is characterized in that the output module is additionally operable to when the output crucial letter
After breath:After the detection module detects that up/down turns over signal, up/down, which is turned over, exports the pass that the review unit is got
Key information exports operation failure after the detection module detects cancelling signal.
19. equipment according to claim 17, which is characterized in that the communication module further includes:Suspend mode unit;
The suspend mode unit is used to be not received by the second preset time from the target when first receiving unit
When the instruction of bluetooth equipment, dormant state is entered.
20. equipment according to claim 19, which is characterized in that the communication module further includes detection connection unit;
The detection connection unit is used for after the suspend mode unit enters dormant state, detection and the target Bluetooth devices
Bluetooth connection it is whether effective;
The suspend mode unit is additionally operable to after the detection connection unit is detected as no, exit dormant state;When the detection connects
Order member is detected as
After order, dormant state is exited, corresponding operating is executed according to the type of described instruction;And when the detection connection unit is detected as
It is and after the detection module detects trigger signal, exits dormant state;
The output module be additionally operable to when the detection connection unit be detected as it is not no and when the suspend mode unit exits dormant state
Afterwards, output connection disconnects information.
21. equipment according to claim 17, which is characterized in that the equipment further includes memory module and time gang mould block;
The memory module is used to be identified according to the target device that user chooses in the information to be selected when the link block,
After establishing connection with corresponding target Bluetooth devices, target device mark is preserved as connected device mark;
Described time gang mould block is used to obtain and the connected device in the device identification that first acquisition module is got
Identify the device identification that matches, will bluetooth equipment corresponding with connected device mark as target Bluetooth devices, with
The target Bluetooth devices establish connection;
The communication module is additionally operable to after described time gang mould block is established with the target Bluetooth devices and connected, wait to be received come from
The instruction of the target Bluetooth devices.
22. equipment according to claim 17, which is characterized in that the link block specifically includes:First judging unit,
Pairing unit, the first generation unit and the second generation unit;
First judging unit is used for after the detection module detects confirmation signal, is sentenced according to target device mark
It is disconnected whether to have been matched with the target Bluetooth devices;
The pairing unit is used for after first judging unit is judged as NO, and is identified according to the target device and corresponding
Target Bluetooth devices are matched;
First generation unit is used to be set according to target device mark and corresponding target Bluetooth when the pairing unit
After being matched, connection key corresponding with the target Bluetooth devices is generated;
The connection key that second generation unit is used to be generated according to the first generation unit generates encryption key and works as
After first judging unit is judged as YES, encryption key is generated according to the connection key that the first generation unit generates.
23. equipment according to claim 22, which is characterized in that first judging unit is specifically used for according to the mesh
Marking device identifies to the target Bluetooth devices and sends authentication instruction, obtains the authentication responses from the target Bluetooth devices,
Authenticating result is obtained according to the authentication responses, judges whether to have matched with the target Bluetooth devices according to the authenticating result
Right, if the authenticating result is successfully, judgement and the target Bluetooth devices have matched;If the authenticating result is to lose
It loses, then judgement with the target Bluetooth devices without matching.
24. equipment according to claim 22, which is characterized in that the pairing unit is specifically used for judging when described first
It after unit judges are no, are identified to corresponding target Bluetooth devices according to the target device and sends matched order, acquisition comes from
The pairing response of the target Bluetooth devices obtains the matching method of the target Bluetooth devices, root according to the pairing response
It is matched according to the matching method and the target Bluetooth devices.
25. equipment according to claim 24, which is characterized in that the pairing unit specifically includes:First matches antithetical phrase list
Member;
Described first with sub-unit be used for after first judging unit is judged as NO, according to the target device identify to
The target Bluetooth devices send matched order, the pairing response from the target Bluetooth devices are obtained, according to the pairing
Response obtains the matching method of the target Bluetooth devices, after the matching method is first method, according to itself first
Second public key of public key and the target Bluetooth devices is matched with the target Bluetooth devices.
26. equipment according to claim 24, which is characterized in that the pairing unit specifically includes:Second matches antithetical phrase list
Member;
Described second with sub-unit be used for after first judging unit is judged as NO, according to the target device identify to
The target Bluetooth devices send matched order, the pairing response from the target Bluetooth devices are obtained, according to the pairing
Response obtains the matching method of the target Bluetooth devices, after the matching method is second method, according to itself first
Second PIN code of public key, the first PIN code of itself, the second public key of the target Bluetooth devices and the target Bluetooth devices,
It is matched with the target Bluetooth devices.
27. equipment according to claim 22, which is characterized in that second generation unit is specifically used for according to the first life
The connection key generated at unit and target device mark generate encryption key and work as first judging unit
The connection key generated according to the first generation unit after being judged as YES and target device mark generate encryption key.
28. equipment according to claim 17, which is characterized in that first acquisition module is additionally operable to work as described search mould
After block does not search the facility information of bluetooth equipment, using the first presupposed information as information to be selected;
The output module is additionally operable to when first acquisition module is using first presupposed information as after information to be selected, output
The information to be selected.
29. equipment according to claim 28, which is characterized in that the equipment further includes the first mark module;The company
Connection module specifically includes the first confirmation unit, the first connection unit, second judgment unit, first turns over and turn over list under unit and first
Member;
First mark module is used for before the output module exports the information to be selected, the described first default letter of setting
Breath is current markers information;
First confirmation unit is used for after the detection module detects confirmation signal, obtains current markers information;
The second judgment unit is used to judge whether current markers information that first confirmation unit is got to be described the
One presupposed information;After the detection module, which detects, turns over signal, judge whether current markers information is the first information to be selected;
After the detection module, which detects down, turns over signal, judge whether current markers information is last information to be selected;
Described search module is additionally operable to judge the current markers that first confirmation unit is got when the second judgment unit
Information be the first presupposed information after, search for the facility information of bluetooth equipment;
First connection unit is used to judge current markers information not when the second judgment unit to be described first default
It after information, identifies the current markers information as target device, is identified according to the target device, with corresponding target indigo plant
Tooth equipment establishes connection;
Described first, which turns over unit, is used to judge current markers information not when the second judgment unit to be the first information to be selected
Afterwards, upper an information to be selected for current markers information is set to current markers information;
It is last information to be selected that unit is turned under described first for judging current markers information not when the second judgment unit
Afterwards, next information to be selected of current markers information is set to current markers information.
30. equipment according to claim 29, which is characterized in that the current markers information is specially current screen label letter
Breath;The output module specifically includes:Third judging unit, the first display unit, first acquisition unit;
The third judging unit is used for according to the information to be selected, default display line number, default often row byte number and predetermined word
Symbol size judges whether can be in the whole information to be selected of liquid crystal screen display;
The first acquisition unit is specifically used for when the third judging unit is judged as NO after, according to the information to be selected, in advance
If display line number, default often row byte number and preset characters acquiring size split screen information to be selected, by the in split screen information to be selected
One screen information to be selected is set as first information to be selected of current screen label information currently to shield mark as information to be selected is currently shielded
Remember information;
First display unit is for showing the currently screen information to be selected that the first acquisition unit is got;And when described
After third judging unit is judged as YES, in the whole information to be selected of liquid crystal screen display;It turns over unit and will currently shield when described first
The upper screen information to be selected of information to be selected makees first information to be selected for currently shielding information to be selected as information to be selected is currently shielded
After currently shielding label information, currently shield information to be selected in liquid crystal screen display;Unit is turned under described first to wait for current screen
Select the next screen of information information to be selected as currently shielding information to be selected, will currently shield first information to be selected of information to be selected as
After current screen label information, currently shield information to be selected in liquid crystal screen display;
Described first, which turns over unit, is specifically used for:It is first to be selected to judge current markers information not when the second judgment unit
After information, judge whether to need to show the upper screen information to be selected for currently shielding information to be selected, if so, will currently shield information to be selected
Upper screen information to be selected as information to be selected is currently shielded, will currently shield first information to be selected of information to be selected as currently shielding
Label information;Otherwise, using a upper information to be selected for current screen label information as current screen label information;
Unit is turned under described first to be specifically used for:It is last to be selected to judge current markers information not when the second judgment unit
After information, judge whether to need to show the next screen information to be selected for currently shielding information to be selected, if it is, will currently shield letter to be selected
The next screen information to be selected of breath will currently shield first information to be selected of information to be selected as current as information to be selected is currently shielded
Shield label information;Otherwise, using next information to be selected of current screen label information as current screen label information.
31. equipment according to claim 29, which is characterized in that the current markers information is specially current screen label letter
Breath, the output module specifically include:4th judging unit, the second display unit and second acquisition unit;
4th judging unit is used for according to the information to be selected, default display line number, default often row byte number and predetermined word
Symbol size judges whether can be in the whole information to be selected of liquid crystal screen display;
Second display unit is used to show the currently screen information to be selected that the second acquisition unit is got, and when described
After 4th judging unit is judged as YES, in the whole information to be selected of liquid crystal screen display;It turns over unit judges and goes out and be when described first
Need to show the upper screen information to be selected for currently shielding information to be selected, and will currently shield the upper screen information to be selected of information to be selected as
Currently shield information to be selected, after currently shielding first information to be selected of information to be selected as current screen label information, display is current
Shield information to be selected;It is to need to show the next screen information to be selected for currently shielding information to be selected to turn over unit judges under described first to go out,
And using the next screen for currently shielding information to be selected information to be selected as information to be selected is currently shielded, it will currently shield first of information to be selected
After information to be selected is as current screen label information, information to be selected is currently shielded in display;
The second acquisition unit is used for according to the information to be selected, default display line number, default often row byte number and predetermined word
Symbol the first screen of acquiring size information to be selected will currently shield information to be selected using the first screen information to be selected as information to be selected is currently shielded
First information to be selected as current screen label information;
Described first, which turns over unit, is specifically used for judging whether to need to show the upper screen information to be selected for currently shielding information to be selected, such as
Fruit is, then according to information to be selected, default display line number, default often row byte number and preset characters acquiring size currently shield letter to be selected
The upper screen information to be selected of breath, will currently shield the upper screen information to be selected of information to be selected as information to be selected is currently shielded, will be current
Shield first information to be selected of information to be selected as current screen label information;Otherwise, upper one of current screen label information is waited for
Select information as current screen label information;
Unit is turned under described first to be specifically used for:Judge whether to need to show the next screen information to be selected for currently shielding information to be selected,
If it is, currently being shielded according to information to be selected, default display line number, default often row byte number and preset characters acquiring size to be selected
The next screen information to be selected of information will be worked as using the next screen for currently shielding information to be selected information to be selected as information to be selected is currently shielded
First information to be selected of preceding screen information to be selected is as current screen label information;Otherwise, by the next of current screen label information
Information to be selected is as current screen label information.
32. equipment according to claim 17, which is characterized in that the equipment further includes the second mark module;The company
Connection module specifically includes the second confirmation unit, the second connection unit, the 5th judging unit, second turns over and turn over list under unit and second
Member;
Second mark module is used for when first acquisition module is using the device identification as after information to be selected, will described in
The first device identification in device identification is set as current markers information;
Second confirmation unit is used for after the detection module detects confirmation signal, obtains current markers information;
The current markers information that second connection unit is used to get second confirmation unit is as target device mark
Know, identified according to the target device, establishes and connect with corresponding target Bluetooth devices;
5th judging unit be used for after the detection module detects and turns over signal, judge current markers information whether be
First mark to be selected;After the detection module, which detects down, turns over signal, judge whether current markers information is end-use device mark
Know;
Described second, which turns over unit, is used to judge current markers information not when the 5th judging unit to be the first information to be selected
Afterwards, upper an information to be selected for current markers information is set to current markers information;
It is last information to be selected that unit is turned under described second for judging current markers information not when the 5th judging unit
Afterwards, next information to be selected of current markers information is set to current markers information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510789083.1A CN105472776B (en) | 2015-11-17 | 2015-11-17 | A kind of method that establishing bluetooth connection and blue-tooth intelligence key devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510789083.1A CN105472776B (en) | 2015-11-17 | 2015-11-17 | A kind of method that establishing bluetooth connection and blue-tooth intelligence key devices |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105472776A CN105472776A (en) | 2016-04-06 |
CN105472776B true CN105472776B (en) | 2018-08-28 |
Family
ID=55609914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510789083.1A Active CN105472776B (en) | 2015-11-17 | 2015-11-17 | A kind of method that establishing bluetooth connection and blue-tooth intelligence key devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105472776B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105681886B (en) * | 2016-03-22 | 2018-11-16 | 广东欧珀移动通信有限公司 | Bluetooth connection control method, device and the playback equipment of playback equipment |
CN106211355B (en) * | 2016-06-15 | 2019-12-20 | 飞天诚信科技股份有限公司 | Equipment and system for controlling data interaction and working method thereof |
CN107071709B (en) * | 2017-04-06 | 2021-06-08 | 飞天诚信科技股份有限公司 | Pairing method and device with Bluetooth equipment |
CN107465994B (en) * | 2017-06-13 | 2020-06-30 | 天地融科技股份有限公司 | Service data transmission method, device and system |
CN109286996A (en) * | 2018-10-16 | 2019-01-29 | 深圳Tcl新技术有限公司 | Mode switching method, bluetooth equipment, apparatus and system based on bluetooth connection |
CN113473435A (en) * | 2021-08-19 | 2021-10-01 | Oppo广东移动通信有限公司 | Bluetooth-based equipment connection method and device, electronic equipment and storage medium |
EP4203517A3 (en) * | 2021-12-23 | 2023-09-13 | GN Hearing A/S | Accessory device for a hearing device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102129A (en) * | 2006-07-04 | 2008-01-09 | 三星电子株式会社 | Bluetooth device capable of selecting profile and data transmission method thereof |
CN102469453A (en) * | 2010-11-12 | 2012-05-23 | 国民技术股份有限公司 | Security certificate method and system |
CN103702440A (en) * | 2013-12-19 | 2014-04-02 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and equipment connecting method |
CN103810832A (en) * | 2014-01-17 | 2014-05-21 | 惠州Tcl移动通信有限公司 | Method and device for controlling equipment by utilizing Bluetooth |
-
2015
- 2015-11-17 CN CN201510789083.1A patent/CN105472776B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102129A (en) * | 2006-07-04 | 2008-01-09 | 三星电子株式会社 | Bluetooth device capable of selecting profile and data transmission method thereof |
CN102469453A (en) * | 2010-11-12 | 2012-05-23 | 国民技术股份有限公司 | Security certificate method and system |
CN103702440A (en) * | 2013-12-19 | 2014-04-02 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and equipment connecting method |
CN103810832A (en) * | 2014-01-17 | 2014-05-21 | 惠州Tcl移动通信有限公司 | Method and device for controlling equipment by utilizing Bluetooth |
Non-Patent Citations (1)
Title |
---|
智能手机蓝牙漏洞挖掘与分析;古益杰;《中国优秀硕士学位论文全文数据库》;20110315;正文第3.4节 * |
Also Published As
Publication number | Publication date |
---|---|
CN105472776A (en) | 2016-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105472776B (en) | A kind of method that establishing bluetooth connection and blue-tooth intelligence key devices | |
US8826406B2 (en) | Password security input system using shift value of password key and password security input method thereof | |
US10574647B2 (en) | User authentication method and system for implementing same | |
CN103795545B (en) | Safety communication method and system | |
CN103838499A (en) | Touch screen terminal unlocking method and touch screen terminal | |
WO2016165557A1 (en) | Method and device for realizing verification code | |
JP2005535990A5 (en) | ||
US20130276100A1 (en) | Method and apparatus for authenticating password | |
CN104408344A (en) | System switching method, system switching device and terminal | |
CN109687975A (en) | A kind of hardware wallet can the implementation method that is initialized of off line and device | |
CN107292205A (en) | A kind of input method and device, electronic equipment | |
KR101228090B1 (en) | System and method for inputing password | |
CN103246839A (en) | Method for operating intelligent secret key equipment | |
CN101986670A (en) | Method for protecting password input security at mobile phone by using password keyboard | |
CN108809982A (en) | It is a kind of that close authentication method and system is exempted from based on credible performing environment | |
CN205334484U (en) | Password safety input device based on touch -sensitive screen | |
KR20180118635A (en) | Method and apparatus for processing icons in an application | |
EP1999682A2 (en) | A method and apparatus to provide authentication using an authentication card | |
CN106529232A (en) | Startup method and device | |
JP2005092614A (en) | Biometrics system, program, and information storage medium | |
CN108052831A (en) | Image watermarking and display methods, mobile terminal and storage medium | |
CN104615267B (en) | password input management method, system and electronic device | |
CN106557708A (en) | A kind of method for security protection and system | |
US10621332B2 (en) | Computer system, IoT device monitoring method, and program | |
JP2008005371A (en) | Japanese language password converter and method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |