CN109005530A - A kind of method and bluetooth equipment with mobile terminal execution pairing service - Google Patents
A kind of method and bluetooth equipment with mobile terminal execution pairing service Download PDFInfo
- Publication number
- CN109005530A CN109005530A CN201810866845.7A CN201810866845A CN109005530A CN 109005530 A CN109005530 A CN 109005530A CN 201810866845 A CN201810866845 A CN 201810866845A CN 109005530 A CN109005530 A CN 109005530A
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- bluetooth equipment
- request
- submodule
- key
- 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.)
- Granted
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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0822—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0866—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- 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
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention relates to technical field of bluetooth communication, in particular to a kind of method and bluetooth equipment with mobile terminal execution pairing service, this method comprises: bluetooth equipment and mobile terminal establish connection;Bluetooth equipment receives the request that the mobile terminal issues, and judges the type of request, for example pairing request, bluetooth equipment bind mobile terminal, and judge binding lose flag bit whether set, if it is, it disconnects the connection with mobile terminal and then reconnects mobile terminal;Otherwise, with mobile terminal normal communication;For example CIPHERING REQUEST judges whether to have bound mobile terminal according to CIPHERING REQUEST, if so, terminating with mobile terminal normal communication;Otherwise, bluetooth equipment sends the request of application binding to mobile terminal, and flag bit is lost in set binding, receives the request that mobile terminal issues.It is serviced by the invention it is possible to be reacquired by bluetooth equipment by upper layer, bring query can not be communicated after avoiding connection, user experience is good.
Description
Technical field
The present invention relates to a kind of method of technical field of bluetooth communication more particularly to pairing service with mobile terminal execution and
Bluetooth equipment.
Background technique
In the prior art, after bluetooth equipment pairing is lost, mobile terminal device cannot communicate after initiating pairing, therefore connect
It can not be communicated after being connected into function, just can be carried out communication after needing user hand dynamic circuit breaker to open reconnection, user experience is bad.
Summary of the invention
In order to solve the problems in the existing technology the present invention, provides a kind of side with mobile terminal execution pairing service
Method and bluetooth equipment.
The present invention provides a kind of methods of bluetooth equipment and mobile terminal execution pairing service, comprising:
Step a, bluetooth equipment and mobile terminal establish connection;
Step b, bluetooth equipment receives the request that the mobile terminal issues, and judges the type of the request, for example matches
To request, step c is executed;For example CIPHERING REQUEST executes step e;
Step c, bluetooth equipment binds the mobile terminal;
Step d, bluetooth equipment judge binding lose flag bit whether set, if so, disconnecting with the mobile terminal
Connection, return step a;Otherwise, step f is executed;
Step e, bluetooth equipment judges whether to have bound mobile terminal according to the CIPHERING REQUEST, if so, executing step
Rapid f;Otherwise, bluetooth equipment sends the request of application binding to mobile terminal, and flag bit, return step b are lost in set binding;
Step f, bluetooth equipment and mobile terminal normal communication terminate.
The present invention provides a kind of bluetooth equipments with mobile terminal execution pairing service, comprising:
Link block, for establishing connection with mobile terminal;
Receiving module, the request issued for receiving mobile terminal;
Judgment module, for judging the type of request that receiving module receives;
Binding module, for judging the type for the request that the mobile terminal that receiving module receives issues when judgment module
When for pairing request, mobile terminal is bound;
Judgment module, be also used to judge binding lose flag bit whether set;
Module is disconnected, for disconnecting the company with mobile terminal when judgment module judges that flag bit set is lost in binding
It connects, triggers link block;
Judgment module is also used to when the type for judging request that receiving module receives is CIPHERING REQUEST, and judgement is
It is no to be bundled with mobile terminal;
Sending module, for being sent out to mobile terminal when judgment module judges that bluetooth equipment does not bind mobile terminal
The request for sending application to bind, and flag bit is lost in set binding, triggers receiving module;
Communication module, for when judgment module judge binding lose flag bit there is no set when or judgment module judge
When binding module has bound mobile terminal, with mobile terminal normal communication.
It is serviced by the invention it is possible to be reacquired by bluetooth equipment by mobile terminal, avoids mobile terminal and indigo plant
It can not be communicated after the connection of tooth equipment, user experience is good.
Detailed description of the invention
Illustrate the embodiment of the present invention or technical solution in the prior art in order to clearer, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
The method that Fig. 1 is a kind of bluetooth equipment provided in the embodiment of the present invention 1 and mobile terminal execution pairing service;
The method that Fig. 2 is a kind of bluetooth equipment provided in the embodiment of the present invention 2 and mobile terminal execution pairing service.
Fig. 3 is a kind of bluetooth equipment of the and mobile terminal execution pairing service provided in the embodiment of the present invention 3.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Embodiment 1
The method for present embodiments providing a kind of bluetooth equipment and mobile terminal execution pairing service, as shown in Figure 1, packet
It includes:
Step 101: bluetooth equipment and mobile terminal establish bluetooth connection.
Optionally, before step 101 further include:
Step a-1: bluetooth equipment is initialized;
Step a-2: bluetooth equipment opens Bluetooth broadcast;
Step a-3: bluetooth equipment judges whether to receive the connection request of mobile terminal transmission, if so, executing step
101;Otherwise, return step a-3.
Optionally, in step 101, after bluetooth equipment establishes bluetooth connection with mobile terminal, further includes: obtain mobile terminal
(Medium Access Control, the physical address) address MAC and save.
Specifically, in the present embodiment, bluetooth equipment can generate one after receiving the connection request that mobile terminal issues
Bluetooth connection event, which is realized, establishes bluetooth connection with mobile terminal;
For example, the connection request that mobile terminal issues are as follows: 0x0d 0x03 0x00 0x00 0x00 0x90 0x0d 0x24
0xaa 0xd6 0xbe 0x89 0x8e 0xc5 0x22 0x15 0x64 0x3a 0xb4 0xc9 0x46 0x06 0xc0
0x8c 0xa5 0xe0 0xdd 0x1a 0x93 0x9a 0xaf 0x5c 0x22 0xd4 0x03 0x14 0x00 0x18
0x00 0x00 0x00 0x48 0x00 0xff 0xff 0xff 0xff 0x1f 0xaa 0xd0 0x23 0x02;According to even
The 16th byte for connecing request gets mobile terminal MAC Address to the 21st byte are as follows: 0x46 0xc9 0xb4 0x3a 0x64
0x15;
It should be noted that after the MAC Address of bluetooth equipment acquisition mobile terminal, before mobile terminal MAC Address
Two bytes judge the type of MAC Address.
Specifically, the type of MAC Address includes: dynamic MAC address and static mac address.
It should be noted that the connection request that bluetooth equipment receives mobile terminal completes bluetooth equipment and movement eventually
The physical layer at end connects;Bluetooth equipment and mobile terminal establish bluetooth connection and complete bluetooth equipment protocol layer and mobile terminal
Protocol layer establishes bluetooth connection.
Step 102: bluetooth equipment receives the request that mobile terminal issues, and judges the type of the request received, if
It is pairing request, executes step 103;If it is CIPHERING REQUEST, step 105 is executed.
Specifically, in the present embodiment, the 28th byte data in the request that bluetooth equipment judgement receives
(OPCPDE), for example the first data are then pairing request, and for example the second data are then CIPHERING REQUEST;For example, the first data are
0x03, the second data are 0x00;
For example, the request that bluetooth equipment receives is 0x1b 0x06 0x28 0x01 0x70 0x11 0x06 0x0a
0x03 0x12 0x2f 0x1d 0x00 0xe0 0xbc 0x00 0x00 0xe0 0x5c 0x65 0x50 0x0e 0x15
0x11 0x00 0x06 0x00 0x03 0x38 0x82 0xd7 0xf6 0x90 0x56 0xfa 0x2f 0x89 0xf5
0x39 0x30 0x89 0x16 0x5f 0xe0 0xa1 0xc9 0x95 is then pairing request;As what bluetooth equipment received asks
It asks as 0x1b 0x06 0x2a 0x01 0x78 0x11 0x06 0x0a 0x03 0x0d 0x2f 0x21 0x00 0x8f
0xbc 0x00 0x00 0xe0 0x5c 0x65 0x50 0x0f 0x17 0x03 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0xdf 0xde 0xd8 0x67 0x5f 0x08 0xdc 0xe2 0xda 0x2d
0xe1 0xdb 0x94 0xad 0x0f is then CIPHERING REQUEST;
Optionally, before step 102, further includes: the request to be received such as bluetooth equipment, and judge whether to receive mobile whole
The request issued is held, if so, executing step 102;Otherwise, bluetooth connection, return step a-2 are disconnected.
Optionally, step 102 further include: bluetooth equipment removes broadcast special sign position.
Step 103: bluetooth equipment binds mobile terminal.
Specifically, step 103 includes:
Step 103-1: bluetooth equipment negotiates first key with mobile terminal and saves;
Preferably, step 103-1 is specifically included:
Step 103-11, bluetooth equipment returns to pairing response to mobile terminal;
For example, the pairing response returned are as follows: 0x0d 0x03 0x10 0x15 0x01 0x20 0x0e 0x0d 0xaa
0x1a 0x93 0x9a 0xaf 0x0a 0x0b 0x07 0x00 0x06 0x00 0x02 0x03 0x00 0x01 0x10
0x02 0x03 0xaa 0x48 0x24;
Step 103-12, mobile terminal sends the first random number to bluetooth equipment;
For example, the first random number are as follows: 0x4b 0xac 0xe7 0x3b 0xcb 0xd2 0x8b 0x5c 0x96 0x86
0x2d 0x5c 0x76 0xea 0x87 0x75;Mobile terminal sends data to bluetooth equipment are as follows: 0x1b 0x06 0x28
0x01 0x74 0x11 0x06 0x0a 0x03 0x22 0x2f 0x1f 0x00 0x8f 0xbc 0x00 0x00 0xe0
0x5c 0x65 0x50 0x0e 0x15 0x11 0x00 0x06 0x00 0x04 0x4b 0xac 0xe7 0x3b 0xcb
0xd2 0x8b 0x5c 0x96 0x86 0x2d 0x5c 0x76 0xea 0x87 0x75 0x2d 0xb7 0x14;
Step 103-13, bluetooth equipment receives the first random number and saves, and generates the second random number and sends it to shifting
Dynamic terminal;
For example, in the present embodiment, the second random number of generation are as follows: 0x34 0xbb 0x92 0x07 0x99 0x42 0x26
0xcf 0xcf 0xa6 0x7e 0x20 0x95 0x5d 0xec 0x87, the data that bluetooth equipment is sent to mobile terminal are as follows:
0x1b 0x06 0x28 0x01 0x74 0x11 0x06 0x0a 0x03 0x22 0x2f 0x1f 0x00 0x8f 0xbc
0x00 0x00 0xe0 0x5c 0x65 0x50 0x0e 0x15 0x11 0x00 0x06 0x00 0x04 0x4b 0xac
0xe7 0x3b 0xcb 0xd2 0x8b 0x5c 0x96 0x86 0x2d 0x5c 0x76 0xea 0x87 0x75 0x2d
0xb7 0x14;
In step 103-13, after bluetooth equipment receives the first random number and saves, sends to save to mobile terminal and ring
It answers, with the second random number just generated in the response, mobile terminal is responded according to preservation judges that bluetooth equipment is received and protected
Whether the first random number deposited is correct, is to then follow the steps 103-14;Otherwise, it reports an error;
Step 103-14, bluetooth equipment and mobile terminal are respectively according to default authentication code, the first random number, the second random number
First key is calculated;
Such as: first key is short key.
In the present embodiment, the first random number and the second random number are the data of 128bit, bluetooth equipment by first with
Low 64bit data in machine number and the second random number carry out head and the tail splicing, are then carried out according to default authentication code and splicing result
First key is calculated, wherein according to default authentication code and splicing result carrying out that formula used in first key is calculated
It is aes128 algorithm for s1 (k, r1, r2)=e (k, r '), e (), r1 is the first random number, and r2 is the second random number, and k is default
Authentication code, r ' are splicing result;For example, default authentication code is 0x00000000000000000000000000000000, first
Random number is 0x000F0E0D0C0B0A091122334455667788, and the second random number is
0x020203040506070899AABBCCDDEEFF00, splicing result are
0x112233445566778899AABBCCDDEEFF00, the first key being calculated are as follows:
0x9a1fe1f0e8b0f49b5b4216ae796da062;Bluetooth equipment and mobile terminal use in subsequent data communication
First key encrypts the data of transmission;
For example, first key is short key.
Step 103-2: bluetooth equipment generates communication key, obtains the first encryption knot using first key encryption communication key
First encrypted result is sent to mobile terminal by fruit;
Optionally, bluetooth equipment, which generates communication key, is generated according to key transport protocol, specifically: communication key=
D1 (ER, DIV, 0), function d1 are the function of many variables, which is encrypted based on AES-128, and DIV (Diversifying) is dispersion
Device disperses some data to be then 16 variation symbols by data convert by calculating, ER be in the present embodiment second with
Machine number, preferably 128 pseudo random numbers;
For example, the first encrypted result that bluetooth equipment generates and the data for being sent to mobile terminal are as follows:
0x99 0xdc 0x78 0x06 0x02 0xf2 0x15 0x6f 0x55 0x9d 0xd4 0x0d 0x2d 0x02
0x2c 0x8b, specific data are as follows: 0x0d 0x03 0x02 0x4e 0x01 0x60 0x0e 0x1b 0xaa 0x1a 0x93
0x9a 0xaf 0x06 0x19 0x11 0x00 0x06 0x00 0x06 0x99 0xdc 0x78 0x06 0x02 0xf2
0x15 0x6f 0x55 0x9d 0xd4 0x0d 0x2d 0x02 0x2c 0x8b 0xd4 0x80 0x12 0x98 0xee
0x49 0x6e。
Step 103-3: bluetooth equipment generates third random number, and according to the first identity code of third generating random number,
Third random number is encrypted using first key and the first identity code obtains the second encrypted result, and the second encrypted result is sent
To mobile terminal, and the corresponding MAC Address for saving mobile terminal, communication key and from received second identification of mobile terminal
Code is to list of bindings;
It should be noted that if mobile terminal MAC Address is dynamic, the corresponding identity solution for saving mobile terminal and transmitting
Analyse the communication key and the second identity code of key, generation;
Specifically, including: DIV (knowledge of the bluetooth equipment according to itself according to the first identity code of third generating random number
Other code, such as can be the private key that generates during bluetooth equipment production) and third random data mask (specially indigo plant is calculated
Tooth equipment private key and third random data do AES128 algorithm and 2 remainder of 16 powers are taken to obtain mask (Encrypted-identification-code)),
Then exclusive or is carried out according to mask and the DIV of itself and the first EDIV (identity code) is calculated;
Specifically, the second identity code and communication key, mobile terminal MAC Address (or identity resolution key) is right
Including but not limited to following implementation should be saved:
(1) bluetooth equipment updates binding count value, calculates storage location address according to binding count value, and will communicate close
Key, the second identity code and mobile terminal MAC Address are stored in list of bindings position corresponding with storage location address;
Specifically, binding the initial value of count value is 0, binding count value is updated specifically: binding count value adds 1 certainly;Root
According to binding count value calculate storage location address specifically: using bind count value divided by 4 remainders result as storage location
Location;
(2) bluetooth equipment judge in list of bindings whether available free storage location, be then by communication key, the second identity
Identification code, mobile terminal MAC Address and the current storage moment sequential storage storage location idle into list of bindings, otherwise
By communication key, the second identity code, mobile terminal MAC Address and current storage moment storage into list of bindings and most
The early corresponding storage location of storage time;
(3) bluetooth equipment shows information of mobile terminal connected to it, and user is prompted to carry out the mobile terminal of selection replacement;
When bluetooth equipment receives the replacement information of mobile terminal of user's selection, by communication key, the second identity code and movement
Terminal MAC address is saved in list of bindings storage location corresponding with replacement information of mobile terminal;
For example, the information of mobile terminal includes mobile terminal model, title, MAC value etc. in the present embodiment;
In the present embodiment, the second identity code and communication key, mobile terminal MAC Address are corresponded into the above-mentioned of preservation
Mobile terminal MAC Address in implementation could alternatively be identity resolution key.
Step 103-4: bluetooth equipment receives the identity resolution key that mobile terminal transmits, and uses first key crypto identity
Parsing key obtains third encrypted result, and third encrypted result is sent to mobile terminal;
In the present embodiment, before step 208 further include: mobile terminal issues IRK;Mobile terminal is sent to bluetooth equipment
One authentication address information;Mobile terminal issues a signature value;
Step 103-5: bluetooth equipment obtains the 4th encrypted result using the MAC Address of first key encrypted Bluetooth equipment,
4th encrypted result is sent to mobile terminal.
For example, first key is short key;Communication key is long key.
Step 104: bluetooth equipment judges whether set is returned and walked if so, disconnecting bluetooth connection binding loss flag bit
Rapid 101;Otherwise, step 106 is executed.
Preferably, in step 104, when bluetooth equipment judges that flag bit set is lost in binding, after disconnection bluetooth connection
It further include special sign position in modification broadcast, after bluetooth equipment judges specific flag bit modification in broadcast, then again
It is attached with mobile terminal.
Optionally, when judgement, which is bound, loses flag bit set, after disconnecting bluetooth connection, before return step 101, also
Flag bit is lost including binding to reset.
Step 105: bluetooth equipment judges whether to be bundled with mobile terminal according to CIPHERING REQUEST, if so, according to adding
Communication key is retrieved in close request, executes step 106;Otherwise, bluetooth equipment sends the request of application pairing, juxtaposition to mobile terminal
Flag bit, return step 102 are lost in position binding.
Specifically, step 105 includes: that bluetooth equipment obtains list of bindings, and the body of mobile terminal is obtained from CIPHERING REQUEST
Part identification code simultaneously judges the corresponding mobile terminal of identity code whether in list of bindings, if so, bluetooth equipment has been tied up
Mobile terminal is determined, communication key is retrieved according to CIPHERING REQUEST, executes step 106;Otherwise, bluetooth equipment loss and mobile terminal
Binding, bluetooth equipment to mobile terminal send application pairing request, and set binding lose flag bit, return step 102.
Step 106: bluetooth equipment and mobile terminal normal communication terminate.
It services, is avoided after connecting because that can not communicate by the invention it is possible to be reacquired by bluetooth equipment by upper layer
And user hand dynamic circuit breaker is needed to open reconnection, user experience is good.
Embodiment 2
The method for present embodiments providing a kind of bluetooth equipment and mobile terminal execution pairing service, as shown in Fig. 2, packet
It includes:
Step 201: bluetooth equipment is initialized;
Step 202: bluetooth equipment opens Bluetooth broadcast;
Step 203: bluetooth equipment judges whether to receive the connection request of mobile terminal, if so, executing step 204;
Otherwise, step 203 is continued to execute;
Step 204: bluetooth equipment and mobile terminal establish bluetooth connection, obtain the MAC (Medium of mobile terminal
Access Control, physical address) it address and saves;
Specifically, in the present embodiment, bluetooth equipment can generate one after receiving the connection request that mobile terminal issues
Bluetooth connection event, which is realized, establishes bluetooth connection with mobile terminal;
For example, the connection request that mobile terminal issues are as follows: 0x0d 0x03 0x00 0x00 0x00 0x90 0x0d 0x24
0xaa 0xd6 0xbe 0x89 0x8e 0xc5 0x22 0x15 0x64 0x3a 0xb4 0xc9 0x46 0x06 0xc0
0x8c 0xa5 0xe0 0xdd 0x1a 0x93 0x9a 0xaf 0x5c 0x22 0xd4 0x03 0x14 0x00 0x18
0x00 0x00 0x00 0x48 0x00 0xff 0xff 0xff 0xff 0x1f 0xaa 0xd0 0x23 0x02;According to even
The 16th byte for connecing request gets mobile terminal MAC Address to the 21st byte are as follows: 0x46 0xc9 0xb4 0x3a 0x64
0x15;
It should be noted that after the MAC Address of bluetooth equipment acquisition mobile terminal, before mobile terminal MAC Address
Two bytes judge the type of MAC Address.
Specifically, the type of MAC Address includes: dynamic MAC address and static mac address.
It should be noted that the connection request that bluetooth equipment receives mobile terminal completes bluetooth equipment and movement eventually
The physical layer at end connects;Bluetooth equipment and mobile terminal establish bluetooth connection and complete bluetooth equipment protocol layer and mobile terminal
Protocol layer establishes bluetooth connection.
Step 205: the request that the mobile terminal to be received such as bluetooth equipment issues judges whether that receiving mobile terminal issues
Request, if so, execute step 206;Otherwise, bluetooth connection, return step 202 are disconnected;
Step 206: bluetooth equipment removes broadcast special sign position, judges the type of request received, and for example pairing is asked
It asks, thens follow the steps 207;For example CIPHERING REQUEST thens follow the steps 213;
Specifically, in the present embodiment, the 28th byte data in the request that bluetooth equipment judgement receives
(OPCPDE), for example the first data are then pairing request, and for example the second data are then CIPHERING REQUEST;For example, the first data are
0x03, the second data are 0x00;
For example, the request that bluetooth equipment receives is 0x1b 0x06 0x28 0x01 0x70 0x11 0x06 0x0a
0x03 0x12 0x2f 0x1d 0x00 0xe0 0xbc 0x00 0x00 0xe0 0x5c 0x65 0x50 0x0e 0x15
0x11 0x00 0x06 0x00 0x03 0x38 0x82 0xd7 0xf6 0x90 0x56 0xfa 0x2f 0x89 0xf5
0x39 0x30 0x89 0x16 0x5f 0xe0 0xa1 0xc9 0x95 is then pairing request;As what bluetooth equipment received asks
It asks as 0x1b 0x06 0x2a 0x01 0x78 0x11 0x06 0x0a 0x03 0x0d 0x2f 0x21 0x00 0x8f
0xbc 0x00 0x00 0xe0 0x5c 0x65 0x50 0x0f 0x17 0x03 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0xdf 0xde 0xd8 0x67 0x5f 0x08 0xdc 0xe2 0xda 0x2d
0xe1 0xdb 0x94 0xad 0x0f is then CIPHERING REQUEST;
Optionally, before step 206 further include:
Whether the request that bluetooth equipment judgement receives meets preset condition, is to then follow the steps 206, otherwise disconnects bluetooth
Connection, returns to step 202;
In the present embodiment, meet the request of preset condition, specially meet asking for preset Bluetooth communication protocol version
It asks;For example, meeting preset Bluetooth communication protocol version is 4.0 Bluetooth communication protocol of bluetooth;
It should be noted that it is pre- whether to receive meeting for mobile terminal transmission within a preset time in bluetooth equipment judgement
It correspondingly, before executing step 206 further include closing detection timing if needing to start detection timer before the request of condition
Device;
In the present embodiment, detection timer can be one, can also be multiple.
Step 207: bluetooth equipment and mobile terminal negotiate first key and save the first key negotiated;
Preferably, in the present embodiment, the bluetooth equipment in step 207 negotiates first key with mobile terminal and specifically wraps
It includes:
Step 207-1, bluetooth equipment returns to pairing response to mobile terminal;
For example, the pairing response returned are as follows: 0x0d 0x03 0x10 0x15 0x01 0x20 0x0e 0x0d 0xaa
0x1a 0x93 0x9a 0xaf 0x0a 0x0b 0x07 0x00 0x06 0x00 0x02 0x03 0x00 0x01 0x10
0x02 0x03 0xaa 0x48 0x24;
Step 207-2, mobile terminal sends the first random number to bluetooth equipment;
For example, in the present embodiment, the first random number are as follows: 0x4b 0xac 0xe7 0x3b 0xcb 0xd2 0x8b 0x5c
0x96 0x86 0x2d 0x5c 0x76 0xea 0x87 0x75;Mobile terminal sends data to bluetooth equipment are as follows: 0x1b
0x06 0x28 0x01 0x74 0x11 0x06 0x0a 0x03 0x22 0x2f 0x1f 0x00 0x8f 0xbc 0x00
0x00 0xe0 0x5c 0x65 0x50 0x0e 0x15 0x11 0x00 0x06 0x00 0x04 0x4b 0xac 0xe7
0x3b 0xcb 0xd2 0x8b 0x5c 0x96 0x86 0x2d 0x5c 0x76 0xea 0x87 0x75 0x2d 0xb7
0x14;
Step 207-3, bluetooth equipment receives the first random number and saves, and generates the second random number and sends it to movement
Terminal;
For example, in the present embodiment, the second random number of generation are as follows: 0x34 0xbb 0x92 0x07 0x99 0x42 0x26
0xcf 0xcf 0xa6 0x7e 0x20 0x95 0x5d 0xec 0x87, the data that bluetooth equipment is sent to mobile terminal are as follows:
0x1b 0x06 0x28 0x01 0x74 0x11 0x06 0x0a 0x03 0x22 0x2f 0x1f 0x00 0x8f 0xbc
0x00 0x00 0xe0 0x5c 0x65 0x50 0x0e 0x15 0x11 0x00 0x06 0x00 0x04 0x4b 0xac
0xe7 0x3b 0xcb 0xd2 0x8b 0x5c 0x96 0x86 0x2d 0x5c 0x76 0xea 0x87 0x75 0x2d
0xb7 0x14;
In step 207-3, after bluetooth equipment receives the first random number and saves, sends to save to mobile terminal and ring
Answer, have the second random number in the response, mobile terminal according to save that response judges that bluetooth equipment receives and saves first with
Whether machine number is correct, is to then follow the steps 207-4;Otherwise, it reports an error;
Step 207-4, bluetooth equipment and mobile terminal are respectively according to default authentication code, the first random number, the second random number
First key is calculated;
Such as: first key is short key.
In the present embodiment, the first random number and the second random number are the data of 128bit, bluetooth equipment by first with
Low 64bit data in machine number and the second random number carry out head and the tail splicing, are then carried out according to default authentication code and splicing result
First key is calculated, wherein according to default authentication code and splicing result carrying out that formula used in first key is calculated
It is aes128 algorithm for s1 (k, r1, r2)=e (k, r '), e (), r1 is the first random number, and r2 is the second random number, and k is default
Authentication code, r ' are splicing result;For example, default authentication code is 0x00000000000000000000000000000000, first
Random number is 0x000F0E0D0C0B0A091122334455667788, and the second random number is
0x020203040506070899AABBCCDDEEFF00, splicing result are
0x112233445566778899AABBCCDDEEFF00, the first key being calculated are as follows:
0x9a1fe1f0e8b0f49b5b4216ae796da062;Bluetooth equipment and mobile terminal use in subsequent data communication
First key encrypts the data of transmission;
Step 208: bluetooth equipment generates communication key, generates the first encryption using first key encryption communication key and ties
Fruit, and the first encrypted result is sent to mobile terminal;
In the present embodiment, bluetooth equipment, which generates communication key, is generated according to key transport protocol, specifically: communication
Key=d1 (ER, DIV, 0), function d1 are the function of many variables, which is encrypted based on AES-128, and DIV (Diversifying) is
Disperser disperses some data to be then 16 variation symbols by data convert by calculating, and ER is the in the present embodiment
Two random numbers, preferably 128 pseudo random numbers;
For example, generate the first encrypted result and issue mobile terminal data be 0x99 0xdc 0x78 0x06 0x02
0xf2 0x15 0x6f 0x55 0x9d 0xd4 0x0d 0x2d 0x02 0x2c 0x8b, specific data are as follows: 0x0d 0x03
0x02 0x4e 0x01 0x60 0x0e 0x1b 0xaa 0x1a 0x93 0x9a 0xaf 0x06 0x19 0x11 0x00
0x06 0x00 0x06 0x99 0xdc 0x78 0x06 0x02 0xf2 0x15 0x6f 0x55 0x9d 0xd4 0x0d
0x2d 0x02 0x2c 0x8b 0xd4 0x80 0x12 0x98 0xee 0x49 0x6e。
Step 209: bluetooth equipment generates third random number, and according to the first identity code of third generating random number, makes
Encryption the second encrypted result of generation is carried out to third random number and the first identity code with first key and ties the second encryption
Fruit is sent to mobile terminal, and corresponding saves mobile terminal MAC Address, the second key generated and from mobile terminal received the
Two identity codes are to list of bindings;
For example, the third random number that generates and to issue terminal data as follows: 0x6d 0x63 0x15 0xe7 0x42 0x8d
0x36 0x0c it is as follows to send initial data: 0x0d 0x03 0x0a 0x50 0x01 0x60 0x0e 0x15 0xaa 0x1a
0x93 0x9a 0xaf 0x06 0x13 0x0b 0x00 0x06 0x00 0x07 0xcd 0xdb 0x6d 0x63 0x15
0xe7 0x42 0x8d 0x36 0x0c 0x88 0xf5 0x0c 0x96 0xa3 0x7b 0x57。
It should be noted that if mobile terminal MAC Address is dynamic, the corresponding identity solution for saving mobile terminal and transmitting
Analyse the communication key and identity code of key, generation;
Specifically, including: DIV (knowledge of the bluetooth equipment according to itself according to the first identity code of third generating random number
Other code, such as can be the private key that generates during bluetooth equipment production) and third random data mask (specially indigo plant is calculated
Tooth equipment private key and third random data do AES128 algorithm and 2 remainder of 16 powers are taken to obtain mask (Encrypted-identification-code)),
Then exclusive or is carried out according to mask and the DIV of itself and EDIV (identity code) is calculated;
Specifically, by the second identity code received from mobile terminal and the second key generated, mobile terminal MAC
(or identity resolution key) corresponding save includes but is not limited to following implementation:
(1) bluetooth equipment updates binding count value, calculates storage location address according to binding count value, and close by second
Key, the second identity code and mobile terminal MAC are stored in list of bindings position corresponding with storage location address;
Specifically, binding the initial value of count value is 0, binding count value is updated specifically: binding count value adds 1 certainly;Root
According to binding count value calculate storage location address specifically: using bind count value divided by 4 remainders result as storage location
Location;
(2) bluetooth equipment judge in list of bindings whether available free storage location, be then by the second key, the second identity
Identification code, mobile terminal MAC and the current storage moment sequential storage storage location idle into list of bindings, otherwise by the
Two keys, the second identity code, mobile terminal MAC and current storage moment store into list of bindings and earliest storage
Time corresponding storage location;
(3) bluetooth equipment shows information of mobile terminal connected to it, and user is prompted to carry out the mobile terminal of selection replacement;
When bluetooth equipment receives the replacement information of mobile terminal of user's selection, by the second key, the second identity code and movement
Terminal MAC is saved in list of bindings storage location corresponding with replacement information of mobile terminal;
For example, the information of mobile terminal includes mobile terminal model, title, MAC value etc. in the present embodiment;
In the present embodiment, by the second identity code and the corresponding above-mentioned realization saved of the second key, mobile terminal MAC
Mobile terminal MAC in mode could alternatively be identity resolution key.
Step 210: bluetooth equipment receives the IRK (identity resolution key) that mobile terminal transmits, and with first key to IRK
(identity resolution key) is encrypted to obtain third encrypted result, and third encrypted result is sent to mobile terminal;
For example, the IRK (identity resolution key) that generates and to issue terminal data as follows: 0xb2 0x0d 0x5b 0x44
It is as follows to send initial data by 0xd3 0xfb 0x55 0x80 0xec 0xd0 0x2f 0xc8 0x1f 0xcc 0xf8 0x67:
0d 0x03 0x32 0x52 0x01 0x60 0x0e 0x1b 0xaa 0x1a 0x93 0x9a 0xaf 0x06 0x19 0x11
0x00 0x06 0x00 0x08 0xb2 0x0d 0x5b 0x44 0xd3 0xfb 0x55 0x80 0xec 0xd0 0x2f
0xc8 0x1f 0xcc 0xf8 0x67 0xf0 0xd7 0xf6 0x6d 0x2e 0xac 0x30。
In the present embodiment, before step 208 further include: mobile terminal issues IRK;Mobile terminal is sent to bluetooth equipment
One authentication address information;Mobile terminal issues a signature value;
For example, the second key is long key.
Step 211: bluetooth equipment obtains the 4th encrypted result using the MAC Address of first key encrypted Bluetooth equipment, and
4th encrypted result is sent to mobile terminal;
For example, MAC Address and to issue terminal data as follows: 0x06 0xc0 0x8c 0xa5 0xe0 0xdd, sends original
Data are as follows: 0x0d 0x03 0x0e 0x54 0x01 0x60 0x0e 0x12 0xaa 0x1a 0x93 0x9a 0xaf
0x06 0x10 0x08 0x00 0x06 0x00 0x09 0x01 0x06 0xc0 0x8c 0xa5 0xe0 0xdd 0x77
0x54 0xda 0x58 0x2e 0xf7 0x8b
Step 212: bluetooth equipment judges binding to lose flag bit whether set and is modified if so, disconnecting bluetooth connection
Special sign position in broadcast, return step 204;Otherwise, step 214 is executed.
Step 213: bluetooth equipment judges whether to be bundled with mobile terminal according to CIPHERING REQUEST, if so, according to adding
Communication key is retrieved in close request, executes step 214;Otherwise, bluetooth equipment sends application pairing request, and set to mobile terminal
Mark, return step 205 are lost in binding;
Specifically, step 213 includes: that bluetooth equipment obtains list of bindings, and the second identification is obtained from CIPHERING REQUEST
Code simultaneously judges the corresponding mobile terminal of the second identity code whether in list of bindings, if so, bluetooth equipment has been bound
Mobile terminal retrieves communication key according to CIPHERING REQUEST, executes step 214;Otherwise, bluetooth equipment is lost and mobile terminal
Binding, bluetooth equipment sends the request of application pairing to mobile terminal, and flag bit, return step 205 are lost in set binding;
Step 214: bluetooth equipment and mobile terminal carry out normal communication, terminate.
It services, is avoided after connecting because that can not communicate by the invention it is possible to be reacquired by bluetooth equipment by upper layer
And user hand dynamic circuit breaker is needed to open reconnection, user experience is good.
Embodiment 3
A kind of bluetooth equipment with mobile terminal execution pairing service is present embodiments provided, as shown in Figure 3, comprising:
Link block 10, for establishing connection with mobile terminal;
Receiving module 11, the request issued for receiving mobile terminal;
Judgment module 12, for judging the type of request that receiving module 11 receives;
Binding module 13, for judging the request that the mobile terminal that receiving module 11 receives issues when judgment module 12
Type be pairing request when, bind mobile terminal;
Optionally, judgment module 12, be also used to judge binding lose flag bit whether set;
Disconnect module 14, for when judgment module 12 judge binding lose flag bit set when, disconnect and mobile terminal
Connection, trigger link block 10;
Optionally, judgment module 12 are also used to work as the type for the request for judging that receiving module 11 receives and ask for encryption
When asking, judge whether to be bundled with mobile terminal;
Sending module 15, for when judgment module 12 judges that bluetooth equipment does not bind mobile terminal, to it is mobile eventually
End sends the request of application binding, and flag bit is lost in set binding, triggers receiving module 10;
Communication module 16, for when judgment module 12 judge binding lose flag bit there is no set when or judgment module 12
When judging that binding module has bound mobile terminal, with mobile terminal normal communication.
Optionally, bluetooth equipment, further includes:
Initialization module, for initializing bluetooth equipment;
Broadcast module, for opening Bluetooth broadcast;
Judgment module 12 is also used to judge whether to receive the connection request of mobile terminal transmission, when judging to receive
When the connection request that mobile terminal is sent, link block 10 is triggered.
Optionally, judgment module 12 is also used to judge whether to receive the request that mobile terminal issues, when receiving movement
When the request that terminal issues, receiving module 11 is triggered;When being not received by the request that mobile terminal issues, it is disconnected to disconnect module 14
The connection with mobile terminal is opened, broadcast module is triggered.
Optionally, bluetooth equipment, further includes:
It obtains module and obtains the MAC Address of mobile terminal and preservation after establishing connection with mobile terminal.
Optionally, binding module 13 specifically includes:
Submodule is generated, for generating third random number, and according to the first identity code of third generating random number;
Submodule is encrypted, for using first key encryption to generate the third random number and the knowledge of the first identity that submodule generates
Other code obtains the second encrypted result;
Sending submodule, the second encrypted result for that will encrypt submodule acquisition are sent to mobile terminal;
Submodule is saved, for the corresponding MAC Address for saving mobile terminal and the second identity code to list of bindings;
Receiving submodule, for receiving identity resolution key from mobile terminal;
Submodule is encrypted, the identity resolution that first key encryption receiving submodule is received from mobile terminal is also used for
Key obtains third encrypted result;
Sending submodule is also used to encrypt the third encrypted result that submodule obtains and is sent to mobile terminal;
Submodule is encrypted, the MAC Address for being also used for first key encrypted Bluetooth equipment obtains the 4th encrypted result;
Sending submodule is also used to encrypt the 4th encrypted result that submodule obtains and is sent to mobile terminal.
Optionally, binding module 13 further include:
Submodule is generated to be also used to generate communication key;
Sending submodule is also used to generate the communication key that submodule generates and is sent to mobile terminal.
Optionally, judgment module 12 specifically includes:
Acquisition submodule for obtaining list of bindings, and obtains the second identity code from CIPHERING REQUEST;
Judging submodule, for judge acquisition submodule obtain the corresponding mobile terminal of the second identity code whether
In list of bindings;
Submodule is retrieved, for judging the corresponding mobile terminal of the second identity code in list of bindings when judging submodule
When middle, communication key is retrieved according to CIPHERING REQUEST, triggers communication module 16;
Sending module 15 includes:
Sending submodule, for judging that the corresponding mobile terminal of the second identity code is not arranged in binding when judging submodule
When in table, the request of application pairing is sent to mobile terminal, and binding is set and loses flag bit, triggers receiving module 11.
Optionally, it in bluetooth equipment, generates submodule and specifically includes:
Negotiation element, for negotiating first key with mobile terminal and saving;
Generation unit obtains the first encrypted result with first key encryption communication key for generating communication key;
Sending submodule includes:
Transmission unit, for the first encrypted result to be sent to mobile terminal.
Optionally, negotiation element specifically includes:
Subelement is returned to, for returning to pairing response to mobile terminal;
Transmission sub-unit, for sending the first random number to bluetooth equipment;
Receiving subelement, for receiving the first random number and saving;
Subelement is generated, for generating the second random number;
Transmission sub-unit, the second random number for being also used to generate subelement generation are sent to mobile terminal;
Computation subunit, the first random number, generation subelement for being received according to default authentication code, receiving subelement
First key is calculated in the second random number generated.
Optionally, submodule is saved to be also used to the corresponding preservation of communication key to list of bindings.
Optionally, bluetooth equipment further include:
Module is removed, for removing broadcast special sign position.
Optionally, judgment module 12 specifically includes:
Submodule is modified, for module 14 being disconnected and being disconnected when judgment module 12 judges that binding loses flag bit for set
Special sign position after the connection of mobile terminal, in modification broadcast;
Judging submodule, for judging whether the special sign position in broadcast is modified;
Submodule is connected, is also used to when the special sign position that judging submodule is judged in broadcast is modified, again
It is attached with mobile terminal.
Claims (26)
1. a kind of method of bluetooth equipment and mobile terminal execution pairing service characterized by comprising
Step a, bluetooth equipment and mobile terminal establish connection;
Step b, the described bluetooth equipment receives the request that the mobile terminal issues, and judges the type of the request, for example matches
To request, step c is executed;For example CIPHERING REQUEST executes step e;
Step c, the described bluetooth equipment binds the mobile terminal;
Step d, the described bluetooth equipment judge binding lose flag bit whether set, if so, disconnecting with the mobile terminal
Connection resets the binding and loses mark, return step a;Otherwise, step f is executed;
Step e, the described bluetooth equipment judges whether to have bound the mobile terminal according to the CIPHERING REQUEST, if so, holding
Row step f;Otherwise, the bluetooth equipment sends the request of application binding to the mobile terminal, and binds and lose described in set
Flag bit, return step b;
Step f, the described bluetooth equipment and the mobile terminal normal communication terminate.
2. the method as described in claim 1, which is characterized in that include: before the step a
Step a-1, the described bluetooth equipment is initialized;
Step a-2, the described bluetooth equipment opens Bluetooth broadcast;
Step a-3, the described bluetooth equipment judges whether to receive the connection request that the mobile terminal is sent, if so, executing
Step a;Otherwise, step a-3 is continued to execute.
3. method according to claim 2, which is characterized in that after the step a, before the step b, further includes: institute
The request to be received such as bluetooth equipment is stated, and judges whether to receive the request that the mobile terminal issues, if so, executing step
b;Otherwise, the connection with mobile terminal, return step a-2 are disconnected.
4. the method as described in claim 1, which is characterized in that bluetooth equipment described in the step a and the mobile terminal
It establishes after connection, further includes: the bluetooth equipment obtains the MAC Address of the mobile terminal and preservation.
5. method as claimed in claim 4, which is characterized in that the step c is specifically included:
Step c-1, the described bluetooth equipment generates third random number, and according to first identification of third generating random number
Code encrypts the third random number using first key and first identity code obtains the second encrypted result and is sent to institute
Mobile terminal is stated, and corresponds to the MAC Address for saving the mobile terminal and the second identity code to the list of bindings;
Step c-2, the described bluetooth equipment is close using the identity resolution that first key encryption is received from the mobile terminal
Key obtains third encrypted result and is sent to the mobile terminal;
Step c-3, the described bluetooth equipment obtains the 4th encryption using the MAC Address that the first key encrypts the bluetooth equipment
As a result it is sent to the mobile terminal.
6. method as claimed in claim 5, which is characterized in that first identity code is the identity of the bluetooth equipment
Identification code;Second identity code is the identity code of the mobile terminal.
7. method as claimed in claim 5, which is characterized in that in the step c further include: the bluetooth equipment generates communication
Key is simultaneously sent to the mobile terminal.
8. the method for claim 7, which is characterized in that the step e is specifically included: described in the bluetooth equipment obtains
List of bindings obtains second identity code from the CIPHERING REQUEST and judges that second identity code is corresponding
Whether mobile terminal is in the list of bindings, if so, the bluetooth equipment has bound the mobile terminal, according to described
CIPHERING REQUEST retrieves the communication key, executes step f;Otherwise, the bluetooth equipment loses the binding with the mobile device,
The bluetooth equipment sends the request of application pairing to the mobile terminal, and the binding is arranged and loses flag bit, returns to step
Rapid b.
9. the method for claim 7, which is characterized in that in the step e, when the bluetooth equipment is according to CIPHERING REQUEST
It is judged as when having bound the mobile terminal, before executing step f, further includes: retrieved according to the CIPHERING REQUEST described
Communication key.
10. the method for claim 7, which is characterized in that the bluetooth equipment generates the communication key and is sent to
The mobile terminal specifically includes:
Step 1-1, the described bluetooth equipment negotiates first key with the mobile terminal and saves;
Step 1-2, the described bluetooth equipment generates the communication key, encrypts the communication key using the first key and obtains
First encrypted result is sent to the mobile terminal by the first encrypted result.
11. method as claimed in claim 10, which is characterized in that step 1-1 is specifically included:
Step 1-11, the described bluetooth equipment returns to pairing response to the mobile terminal;
Step 1-12, the described mobile terminal sends the first random number to the bluetooth equipment;
Step 1-13, the described bluetooth equipment receives first random number and saves, and generates the second random number and sends it to
The mobile terminal;
Step 1-14, the described bluetooth equipment and the mobile terminal are respectively according to presetting authentication code, first random number, described
The first key is calculated in second random number.
12. the method for claim 7, which is characterized in that the step c-1 further include: the communication key is corresponding
It saves to the list of bindings.
13. the method as described in claim 1, which is characterized in that the step b further include: the bluetooth equipment removes broadcast
Special sign position.
14. the method as described in claim 1, which is characterized in that when the bluetooth equipment judges the binding in d described in step
When loss flag bit is set, disconnecting bluetooth connection later further includes modifying the special sign position in broadcasting, when the bluetooth is set
It the standby special sign position modification judged in the broadcast and then secondary is attached with the mobile terminal.
15. a kind of bluetooth equipment with mobile terminal execution pairing service characterized by comprising
Link block, for establishing connection with mobile terminal;
Receiving module, the request issued for receiving the mobile terminal;
Judgment module, for judging the type of the request that the receiving module receives;
Binding module, for judging that the mobile terminal that the receiving module receives issued asks when the judgment module
When the type asked is pairing request, the mobile terminal is bound;
The judgment module, be also used to judge binding lose flag bit whether set;
Module is disconnected, for disconnecting and the movement when the judgment module judges that flag bit set is lost in the binding
The connection of terminal triggers the link block;
The judgment module is also used to sentence when the type for judging request that the receiving module receives is CIPHERING REQUEST
It is disconnected whether to be bundled with the terminal;
Sending module, for when the judgment module judges that the bluetooth equipment does not bind the mobile terminal, to institute
The request that mobile terminal sends application binding is stated, and flag bit is lost in binding described in set, triggers the receiving module;
Communication module, for when the judgment module judges that the binding loses flag bit and do not have set or the judgement mould
When block judges that the binding module has bound the mobile terminal, with the mobile terminal normal communication.
16. bluetooth equipment as claimed in claim 15, which is characterized in that further include:
Initialization module, for initializing the bluetooth equipment;
Broadcast module, for opening Bluetooth broadcast;
The judgment module is also used to judge whether to receive the connection request that the mobile terminal is sent, when judging to receive
To the mobile terminal send the connection request when, trigger the link block.
17. bluetooth equipment as claimed in claim 16, which is characterized in that the judgment module is also used to judge whether to receive
The request that the mobile terminal issues triggers receiving module when receiving the request that the mobile terminal issues;When not connecing
When receiving the request that the mobile terminal issues, the connection for disconnecting module disconnection and the mobile terminal is triggered described wide
Broadcasting module.
18. bluetooth equipment as claimed in claim 15, which is characterized in that further include:
It obtains module and obtains the MAC Address of the mobile terminal and preservation after establishing connection with the mobile terminal.
19. bluetooth equipment as claimed in claim 18, which is characterized in that the binding module specifically includes:
Submodule is generated, for generating third random number, and according to first identity code of third generating random number;
Submodule is encrypted, for encrypting the third random number and described that the generation submodule generates using first key
One identity code obtains the second encrypted result;
Sending submodule, second encrypted result for obtaining the encryption submodule are sent to the mobile terminal;
Submodule is saved, for the corresponding MAC Address for saving the mobile terminal and the second identity code to list of bindings;
Receiving submodule, for receiving identity resolution key from the mobile terminal;
The encryption submodule is also used for the first key encryption receiving submodule and receives from the mobile terminal
To the identity resolution key obtain third encrypted result;
The sending submodule is also used to the third encrypted result that the encryption submodule obtains being sent to the movement
Terminal;
The encryption submodule, be also used for the first key encrypt the bluetooth equipment MAC Address obtain the 4th plus
Close result;
The sending submodule is also used to the 4th encrypted result that the encryption submodule obtains being sent to the movement
Terminal.
20. bluetooth equipment as claimed in claim 19, which is characterized in that the binding module further include:
The generation submodule is also used to generate communication key;
The sending submodule is also used to the communication key that the generation submodule generates being sent to the mobile terminal.
21. bluetooth equipment as claimed in claim 20, which is characterized in that the judgment module specifically includes:
Acquisition submodule for obtaining the list of bindings, and obtains second identification from the CIPHERING REQUEST
Code;
Judging submodule, the corresponding mobile terminal of second identity code for judging that the acquisition submodule obtains are
It is no in the list of bindings;
Submodule is retrieved, for judging that the corresponding mobile terminal of second identity code exists when the judging submodule
When in the list of bindings, the communication key is retrieved according to the CIPHERING REQUEST, triggers communication module;
The sending module includes:
Sending submodule, for judging the corresponding mobile terminal of second identity code not in institute when the judging submodule
When stating in list of bindings, the request of application pairing is sent to the mobile terminal, and the binding is set and loses flag bit, triggering
The receiving module.
22. bluetooth equipment as claimed in claim 20, which is characterized in that
The generation submodule specifically includes:
Negotiation element, for negotiating the first key with the mobile terminal and saving;
Generation unit encrypts the communication key with the first key and obtains the first encryption for generating the communication key
As a result;
The sending submodule includes:
Transmission unit, for first encrypted result to be sent to the mobile terminal.
23. bluetooth equipment as claimed in claim 22, which is characterized in that the negotiation element specifically includes:
Subelement is returned to, for returning to pairing response to the mobile terminal;
Transmission sub-unit, for sending the first random number to the bluetooth equipment;
Receiving subelement, for receiving the first random number and saving;
Subelement is generated, for generating the second random number;
The transmission sub-unit is also used to the second random number that the generation subelement generates being sent to the mobile terminal;
Computation subunit, first random number, the life for being received according to default authentication code, the receiving subelement
The first key is calculated at second random number that subelement generates.
24. bluetooth equipment as claimed in claim 20, which is characterized in that the preservation submodule is also used to the communication is close
Key is corresponding to be saved to the list of bindings.
25. bluetooth equipment as claimed in claim 15, which is characterized in that further include:
Module is removed, for removing broadcast special sign position.
26. the bluetooth equipment as described in right 15, which is characterized in that the judgment module specifically includes:
Submodule is modified, is used for when the judgment module judges that the binding loses flag bit for set, the disconnection module
Special sign position after disconnecting the connection with the mobile terminal, in modification broadcast;
Whether judging submodule, the special sign position for judging in the broadcast are modified;
Submodule is connected, is also used to when the special sign position that the judging submodule is judged in the broadcast is modified,
It is attached again with the mobile terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810866845.7A CN109005530B (en) | 2018-08-01 | 2018-08-01 | Method for executing pairing service with mobile terminal and Bluetooth device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810866845.7A CN109005530B (en) | 2018-08-01 | 2018-08-01 | Method for executing pairing service with mobile terminal and Bluetooth device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109005530A true CN109005530A (en) | 2018-12-14 |
CN109005530B CN109005530B (en) | 2021-04-06 |
Family
ID=64594879
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810866845.7A Active CN109005530B (en) | 2018-08-01 | 2018-08-01 | Method for executing pairing service with mobile terminal and Bluetooth device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109005530B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110602676A (en) * | 2019-09-09 | 2019-12-20 | 飞天诚信科技股份有限公司 | Method for preventing hardware wallet from being maliciously paired |
CN111464994A (en) * | 2020-06-16 | 2020-07-28 | 飞天诚信科技股份有限公司 | Method and system for realizing public search of Bluetooth equipment |
CN112182549A (en) * | 2020-09-25 | 2021-01-05 | 北京博睿维讯科技有限公司 | Safety control main control method, system and storage medium thereof |
CN112235732A (en) * | 2020-09-17 | 2021-01-15 | 联合汽车电子有限公司 | Equipment matching method for Bluetooth positioning |
CN114268980A (en) * | 2021-12-24 | 2022-04-01 | 广东乐心医疗电子股份有限公司 | Equipment binding method and device and electronic equipment |
CN116801258A (en) * | 2023-08-22 | 2023-09-22 | 北京领创医谷科技发展有限责任公司 | Wireless communication connection method, system, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130297690A1 (en) * | 2012-05-03 | 2013-11-07 | Nokia Corporation | Method and apparatus for binding devices into one or more groups |
CN103401623A (en) * | 2013-08-06 | 2013-11-20 | 深圳雷柏科技股份有限公司 | Code matching-free testing method and device for Bluetooth product |
CN104243165A (en) * | 2014-08-28 | 2014-12-24 | 电子科技大学 | Intelligent movable terminal privacy protection system and method based on intelligent bracelet |
CN105338402A (en) * | 2015-11-04 | 2016-02-17 | 北京数码视讯科技股份有限公司 | Bluetooth connection method and apparatus |
CN106385666A (en) * | 2016-09-26 | 2017-02-08 | 中颖电子股份有限公司 | Bluetooth anti-lost realization method |
CN106971525A (en) * | 2017-03-23 | 2017-07-21 | 青岛海信日立空调系统有限公司 | A kind of Bluetooth signal conversion equipment and Bluetooth signal conversion method |
CN107257536A (en) * | 2017-04-19 | 2017-10-17 | 上海卓易电子科技有限公司 | A kind of binding method and device of mobile terminal and bluetooth equipment |
-
2018
- 2018-08-01 CN CN201810866845.7A patent/CN109005530B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130297690A1 (en) * | 2012-05-03 | 2013-11-07 | Nokia Corporation | Method and apparatus for binding devices into one or more groups |
CN103401623A (en) * | 2013-08-06 | 2013-11-20 | 深圳雷柏科技股份有限公司 | Code matching-free testing method and device for Bluetooth product |
CN104243165A (en) * | 2014-08-28 | 2014-12-24 | 电子科技大学 | Intelligent movable terminal privacy protection system and method based on intelligent bracelet |
CN105338402A (en) * | 2015-11-04 | 2016-02-17 | 北京数码视讯科技股份有限公司 | Bluetooth connection method and apparatus |
CN106385666A (en) * | 2016-09-26 | 2017-02-08 | 中颖电子股份有限公司 | Bluetooth anti-lost realization method |
CN106971525A (en) * | 2017-03-23 | 2017-07-21 | 青岛海信日立空调系统有限公司 | A kind of Bluetooth signal conversion equipment and Bluetooth signal conversion method |
CN107257536A (en) * | 2017-04-19 | 2017-10-17 | 上海卓易电子科技有限公司 | A kind of binding method and device of mobile terminal and bluetooth equipment |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110602676A (en) * | 2019-09-09 | 2019-12-20 | 飞天诚信科技股份有限公司 | Method for preventing hardware wallet from being maliciously paired |
CN111464994A (en) * | 2020-06-16 | 2020-07-28 | 飞天诚信科技股份有限公司 | Method and system for realizing public search of Bluetooth equipment |
CN112235732A (en) * | 2020-09-17 | 2021-01-15 | 联合汽车电子有限公司 | Equipment matching method for Bluetooth positioning |
CN112182549A (en) * | 2020-09-25 | 2021-01-05 | 北京博睿维讯科技有限公司 | Safety control main control method, system and storage medium thereof |
CN112182549B (en) * | 2020-09-25 | 2023-10-27 | 北京博睿维讯科技有限公司 | Security control master control method, system and storage medium thereof |
CN114268980A (en) * | 2021-12-24 | 2022-04-01 | 广东乐心医疗电子股份有限公司 | Equipment binding method and device and electronic equipment |
CN116801258A (en) * | 2023-08-22 | 2023-09-22 | 北京领创医谷科技发展有限责任公司 | Wireless communication connection method, system, equipment and storage medium |
CN116801258B (en) * | 2023-08-22 | 2023-11-21 | 北京领创医谷科技发展有限责任公司 | Wireless communication connection method, system, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109005530B (en) | 2021-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109005530A (en) | A kind of method and bluetooth equipment with mobile terminal execution pairing service | |
CN108901010A (en) | A kind of bluetooth equipment and Bluetooth connecting method | |
US10547505B2 (en) | Software defined networking for edge nodes | |
US6301229B1 (en) | Distribution of protocol processes from network elements to end stations | |
EP1768321B1 (en) | Interworking, circuit emulation service over packet and IP/MPLS packet processing | |
US8477620B2 (en) | System and method to provide multiple private networks using PBB | |
CN105765919B (en) | It is used for transmission and receives the method and system of packet | |
EP2636188B1 (en) | Apparatus and methods for multimode internetworking connectivity | |
CN110677345B (en) | User message transmission method and communication equipment | |
CN102843292B (en) | VPN (Virtual Private Network) data processing method and device of across-operator network | |
US8582580B2 (en) | System and method to provide multiple private networks using PBB/TE | |
US7843944B2 (en) | System and method to provide multiple private networks using MPLS | |
EP3972221B1 (en) | Ethernet data transmission method and communication device | |
EP3119057A1 (en) | Packet conversion device and method for allowing transparent packet-based multipath bundling | |
US20210136050A1 (en) | Secured Transport in Remote MAC/PHY DAA Architecture | |
Kyung et al. | Software defined service migration through legacy service integration into 4G networks and future evolutions | |
CN101119181A (en) | Method for forming and using data message header format of integrated network communication layer | |
CN107645719A (en) | A kind of bluetooth binding method and device | |
CN100466590C (en) | Method for sharing V-Switch transparent-transferring data load | |
JP2021501519A (en) | Methods, related devices, and systems for obtaining target transmission routes | |
EP0928526B1 (en) | Method and apparatus for enhanced cmea employing enhanced transformations | |
CN114640626B (en) | Communication system and method based on software defined wide area network SD-WAN | |
EP1445896A1 (en) | Provider connection system, packet exchange apparatus thereof, dns server, packet exchange method, and computer program thereof | |
US20040258056A1 (en) | Provider connection system, packet exchange apparatus thereof, dns server, packet exchange method, and computer program thereof | |
US6876744B1 (en) | Methods and apparatus for enhanced CMEA including a CMEA iteration preceded and followed by transformations and employing an involuntary lookup |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |