This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BLE_GAP_EVT_CONNECTED and DISCONNECTED delay issue

Hi,

I have noticed that when a peripheral (using NUS)  is disconnected  from a central 
it takes 2-3 seconds for the peripheral's BLE_GAP_EVT_DISCONNECTED to trigger.

Shouldn't the event occur the moment the central is disconnected? Why this 2-3 sec delay?

On the other hand this does not happen when the central establishes connection to a central

Any ideas?

Parents
  • Hi Kostoulas, 

    Could you let me know which central you used ? 
    If the central deliberately send the connection termination request the BLE_GAP_EVT_DISCONNECTED should come immediately. 

    If you use the phone as central device and you click disconnect from the app, there is a chance that the OS would not disconnect automatically but check for any request from other apps to retain the connection or not before it actually disconnect. 


    You can find this out by using a sniffer. The sniffer trace would reveal if the connection termination come immediatelly after you click Disconnect or not. 

  • Hi, I have noticed this with both the android device and the nrf52840 DK. It takes around 3 seconds when the disconnection is not intentional, like disconnection due to range. In case of intentional disconnection it takes around 1 second in both cases

Reply
  • Hi, I have noticed this with both the android device and the nrf52840 DK. It takes around 3 seconds when the disconnection is not intentional, like disconnection due to range. In case of intentional disconnection it takes around 1 second in both cases

Children
  • Hi again, 

    If it's disconnection due to range, the BLE_GAP_EVT_DISCONNECTED event only comes after the connection timeout has passed. 
    If you disconnect intentionally from the nRF52840 central , the BLE_GAP_EVT_DISCONNECTED should come immediately. 

Related