In the previous article "Bluetooth Pairing - Key Generation Method" , we discussed how to generate a key – if both the initiating device and the responding device satisfy certain IO functions, they can choose low-power traditional pairing (Legacy). Pairing) Passkey Entry method.
In this article, let's dive deeper into how to use Passkey Entry for traditional pairing and how it works.
Figure 1: Entering a low-power traditional pairing with Passkey Entry
1. Temporary key (TK) and random number generation
When using traditional Bluetooth pairing with low power consumption, both devices generate a Temporary Key (TK) for pairing.
If the IO of any of the initiating device or the responding device has a display function, any TK value between "000000" and "999999" is generated and displayed. The other device should have an input function, such as a keyboard, so that the user can enter this temporary key value.
If the IO functions of the initiating device and the responding device do not have the display function, but both are "Keyboard Only", then the user needs to ensure that the temporary key between the initiating device and the responding device is the same, this is A special case of Passkey Entry.
The following figure shows the scenario when a device named “AuthenTIcaTIon†is paired with an iOS device. The temporary key is displayed on the input interface of the “AuthenTIcaTIon†device. After that, the iOS device will pop up a dialog box prompting the user to enter the temporary key value.
Figure 2: Master key entry for iOS devices
After entering the temporary key value, the initiating device and the responding device should generate a 128-bit temporary value called the launch device called "Mrand ("master random") and the response device called Srand ("slave random").
2.Mconfirm and Sconfirm
Mconfirm and Sconfirm are 128-bit acknowledgment values ​​that can be calculated by confirming the value generation function c1. For details on this function, please refer to Bluetooth Core Specification Version 4.2, Volume 4, Part H, Section 2.2.3.
The input parameters of the c1 function include:
Temporary key (TK)
Mrand for calculating Mconfirm, or Srand for calculating Sconfirm
Pairing request instruction
Pairing response command
Initiating device address type
Initiating device address
Response device address type
Response device address
Mc4 Fuse Connector,Slocable Solar Pv Fuse,Mc4 Connector With Fuse,Mc4 Inline Fuse Connector
Sowell Electric CO., LTD. , https://www.sowellsolar.com