Kangear Note: The article is converted from: internal (this figure is an internal MTK image ).
[Description] In bt2.1 and later versions, the Bluetooth protocol has added a Simple Pairing method in addition to the traditional PIN code pairing. This new pairing method is simpler and more secure. Currently, most Bluetooth devices on the market support simple pairing. From the user's perspective, the traditional PIN code pairing requires both Bluetooth devices to enter the pair password (if both sides have devices ), simple Pairing requires both parties to confirm that the six random numbers on the screen are the same (if both sides have screens ). The following describes the Simple Pairing protocol and code process. [Solution]
1. describes the Simple Pairing process in the Bluetooth specification.
A) the first line above describes three pairing processes: Bluetooth in band, OOB discovery only, OOB discovery and authentication. OOB refers to the out of band, that is, the non-Bluetooth transmission mode, such as NFC.
B) The first column on the left is the four steps from device discovery to authentication, the link key and authentication required for searching devices, establishing physical connections, and generating data encryption respectively (that is, confirming that the link key of both parties is correct ).
C) Bluetooth in band is the most common Bluetooth pairing Method for mobile phones.
I. Use inquiry (Bluetooth term, the specification defines in detail how to locate the peripheral device through the inquiry operation) to search for the peripheral device,
Ii. Create a Bluetooth physical connection (ACL link) through page (like inquiry)
III. The process of generating the link key is more in-depth. We will not discuss it here. If you are interested, you can study Bluetooth specification version 4.0-Volume 3-part H-Security Manager specification.
IV. after both parties generate the link key, they can perform authentication in three ways: Numeric compare (6-bit random password comparison), passkey entry (one party displays data, and the other party enters the password) and just works (use directly without authentication ).
D) OOB discovery only & OOB discovery and authentication are part of the procedure of using a non-Bluetooth transmission method to complete a Bluetooth in band, for example, NFC is used to exchange the Bluetooth address and link key of both parties to achieve "No pairing" user experience.
2. mediatek Android pairing code process
The following code process is based on Alps. jb2.mp. Other versions are similar and can be referenced. Here, we will only post the flowchart. If you want to learn more, you can submit it to eservice for discussion so that we can improve it as needed.