I have found the BLE_Bonding application at "100 projects at 100 days" section. Here is what i didn't understand. Whenever the cysmart sends passkey request, the pioneer kit sends passkey from uart and i can enter it from cysmart. But how can i set constant passkey? I added the code block from passkey displaying, i don't understand that creates the passkey randomly or something?
Here is the code block:
printf("CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST. Passkey is: %d%d.\r\n",
HI16(*(uint32 *)eventParam), LO16(*(uint32 *)eventParam));
printf("Please enter the passkey on your Server device.\r\n");
I found this function at API document:
CyBle_GapGetPeerDevSecurityKeyInfo(uint8 bdHandle, uint8 * keysFlag, CYBLE_GAP_SMP_KEY_DIST_T * keyInfo);
But i don't know how can i use the *keysFlag and *keyInfo
Random keys are generated for Pairing. Please have a look at: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day017_Privacy/Privacy
to understand the usage of CyBle_GapGetPeerDevSecurityKeyInfo
I was looking for a documantation about using constant passkeys but i have learned that we can not use constant passkeys for now. Thank you for you response anyway :)
This will fix the passkey.