This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to store bonding key manually

I'm using sdk10, I tried the bonding feature using device_manager and it's working. but then when I perform DFU, the bonding information is erased. I can't modify the bootlader DFU_APP_DATA_RESERVED setting because the product is already hit the market, so my only solution is to store the key manually (I need only one bonded device).

how can I sue the bonding key manuly, for my understanding, the key is stored on p_sec_keyset structure and then provide it on sd_ble_gap_sec_params_reply() in BLE_GAP_EVT_SEC_PARAMS_REQUEST.

my question is

1 - at when event the key is retrieved? whatevent triggered when I bond using nrf master control for example ?? I think it's on BLE_GAP_EVT_AUTH_STATUS event, but then how can I implement that? is there any example??

2 - how can I save the key on flash using an array of uint8_t (how it is casted)?

Related