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.

Parents
  • Hi,

    You will get a BLE_GAP_EVT_DISCONNECTED event on the nRF side even if the phone never sends a disconnect, and in that case, the disconnect reason will be a timeout. The fact that you don't see a timeout indicates that the connection is still up, which you could verify by using a sniffer. Therefore I think we can assume that this issue on the phone side. Which phone model using Android 7.1 did you use? Have you tested others?

Reply
  • Hi,

    You will get a BLE_GAP_EVT_DISCONNECTED event on the nRF side even if the phone never sends a disconnect, and in that case, the disconnect reason will be a timeout. The fact that you don't see a timeout indicates that the connection is still up, which you could verify by using a sniffer. Therefore I think we can assume that this issue on the phone side. Which phone model using Android 7.1 did you use? Have you tested others?

Children
Related