Could you, please, direct me to any example (if available) how to manage lost bond with nRF52832/ SDK16 BLE?
Let say very common situation that will try to demonstrate with the simplest example I found within the SDK\examples\ble_peripheral\ble_app_template :
Connect to nRF 52832 from a client (Android) and bond. After disconnect, then clear bonding information at the client (Android)side.
Next time when try connect to nRF (which still keep bonding information), I get this:
<info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
<info> app: Connected.
<info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
<info> app: Fast advertising.
If there is no such example, will appreciate any help on these questions:
Q1. Who initiate the disconnection for “Bonding, error: 133”: nRF or the client/central/(Android in my case)?
Q2. If nRF initiate the disconnection – can I avoid it, then delete only bonding info that failed and leave to the client/central reinitiate the bonding eventually when request later access to an attribute that requires security connection?
Q3. If nRF initiate the disconnection - Can I send to the client disconnection reason with some specific code that would give me hint at the Android side what happened?
Q4. At nRF side, can I distinguish that the current connected client address (assume is RPA) , but with lost bond info at the client side, can match with any static addresses and LTK pairs saved in the nRF’s flash and if so delete only this bonding information?
Thanks