Can anyone tell me where the BLE_GAP_EVT_AUTH_STATUS event that starts initial bonding on the ble_app_hrs_c originates?
Can anyone tell me where the BLE_GAP_EVT_AUTH_STATUS event that starts initial bonding on the ble_app_hrs_c originates?
BLE_GAP_EVT_AUTH_STATUS event tells you the status of the authentication procedure (either failed or successful) and this event only happens once in the paring step after the security parameters are exchanged. If the event returns success, the link between 2 devices is encrypted.
If the two devices are bonded after that, in the next reconnections, this event won't show up.
BLE_GAP_EVT_AUTH_STATUS event tells you the status of the authentication procedure (either failed or successful) and this event only happens once in the paring step after the security parameters are exchanged. If the event returns success, the link between 2 devices is encrypted.
If the two devices are bonded after that, in the next reconnections, this event won't show up.
Mostly right, but I would also like to add that the auth status event can also appear without any application interaction at all. If the peer tries to (somehow) initiate paring with invalid (out of spec) parameter - e.g. a minimum key size of 6 - a BLE_GAP_EVT_AUTH_STATUS with reason "Invalid parameters" will be produced.