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

BLE_GAP_EVT_DISCONNECTED is not always sent when using Peer Manager

Details: SoftDevice 132, nRF5_SDK_15.2.0_9412b96, Peer Manager, nRF52832-QFAA-0E, nRF Connect 4.22.3,  Android 7.1

For some reason, bonding via nRF Connect on  Android 7 does not complete same fast on on Android 5. nRF Connect keeps showing progress rings while the  Peer Manager already reported successful bonding and connection. Sometimes, in process of bonding nRF Connect disconnects (by timeout?) and BLE stack does not send BLE_GAP_EVT_DISCONNECTED to the application. Neither by disconnection event, nor by timeout.  nRF Connect may reconnect to the device and again - no BLE_GAP_EVT_DISCONNECTED is sent on disconnecting.

This leaves device in pseudo connected state, only the phone that caused this state is able to connect, other phones - cannot because application starts advertising on disconnect event. Forced disconnect from the application recovers from this state.

Related