Other Parts Discussed in Thread: CC2564MODN
Hi, thanks to Vihang for his help so far it's appreciated!
I can now perform my OOB connection with my CC2564MODN radio and STM32F4 MCU board. I have the pairing done and the encryption key are exchanged. Now If I want to do a bonding, I need to keep the LTK key exchanged during the key exchange, I guess this is done during:
GAP_LE_Authentication_Event_Data_t latEncryptionInformation (on the Central device only?)
Does the radio or the stack have API to store the information that stick between reboot? or do I have to store this information inside my MCU NVRAM?
How does the central unit perform a bonding connection?
My guess so far, is I need to fetch the info inside
BSC_SearchGenericListEntry()
Upon the device boot I would need to fill an entry from NVRAM info with:
BSC_AddGenericListEntry()
The follow flow is what I expect:
- Central try to connect to the device (scan or not) or peripheral try to request a connection
- upon connection completed (instead of calling the GAP_LE_Pair_Remote_Device) I need to call the GAP_LE_Reestablish_Security with the info from the BSC_SearchGenericListEntry()
Is saving the whole BSC List head entry a good idea? or should I only need the LTK and device address when a successful pairing occur?
How does the bonding work with random address? do I need to make IRK resolvable address and keep the public address of the device (exchange the IRK, resolve the random address with the IRK to keep only the public address into the NV memory with the LTK and IRK)? This imply that now I should always use random address create with GAP_LE_Generate_Resolvable_Address() and ditch the GAP_LE_Generate_Static_Address() or GAP_LE_Generate_Non_Resolvable_Address() which might not be a good idea anyway, felt more secure but might not with bonding).
The goal here is to use both device on cradle for initial OOB exchange, then whenever the device start BLE radio and are ready to go outside the cradle, they pair to each other (which work so far). But I would like them to be able to shutdown and power up again and still working until peripheral is put into another cradle. So I need this bonding feature.
Thanks, regards,
Jerome