Hello,
I have a small test BLE peripheral application with a few functions I can invoke over a UART dialog. With one function, I can print the first peer in the peer manager, by calling pm_next_peer_id_get() and then retrieve the details of the bond using pm_peer_data_bonding_load(). With an other function, I can invoke pm_peers_delete(). With a third function, I can set previously stored bonding data, using pm_peer_new().
My test procedure goes like this:
- Bond the device to a GATT client
- store that bonding information to somewhere
- Delete the bond information
- Reset the device
- add previously stored bonding information, using pm_peer_new()
- Print existing bonding information (pm_next_peer_id_get() / pm_peer_data_bonding_load())
In the last step, pm_next_peer_id_get() returns a peer ID, with is not PM_PEER_ID_INVALID. However, pm_peer_data_bonding_load() returns NRF_ERROR_NOT_FOUND. I know, that the bonding data is not available shortly after it was inserted into the database. But I can wait for minutes between the call to pm_peer_new() and pm_peer_data_bonding_load() and this delay does not solve the inconsistency.
What could be the reason for the inconsistency?
best regards,
Torsten
I haven't found any examples of the usage of pm_peer_new() in the SDK examples. SDK version is 16.0.0, SD is S113. All return values to SDK function calls are systematically checked.