BCM920737 passKey lenght

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

Is it possible to set passKey lenght to 4 digits? I have checked example where passkey=123456 and tried to modify it to passkey=1234.

To do so I have changed passKey to:

//passkey=1234(dec)->  HEX 0x000004D2 -> 0x00 0x00 0x04 0xD2 -> (little endian) 0xD2 0x04 0x00 0x00

const UINT8 passKey[LESMP_MAX_KEY_SIZE] = {0xD2, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

And i  tried to modify: lesmp_setSMPassKey((UINT8*)passKey, LESMP_MAX_KEY_SIZE); to lesmp_setSMPassKey((UINT8*)passKey, 4);

That didn't work. Any help would be usefull.

Best Regards

0 Likes
1 Solution
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

You may refer to the BT Spec 4.x for more details on this. If you really want to implement a 4-digit passkey, you may automatically append two zeros to it to make it a 6-digit.

luktym

View solution in original post

0 Likes
2 Replies