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

Fast BLE disconnect (sd_ble_gap_disconnect)

My central and peripheral are continuously connected at 1sec connection interval to conserve power on both devices.

When a button is pressed, I would like to exchange data as fast as possible.

So, I would like to change from the slow connection interval (1sec) to a faster one (20ms). To update the connection interval at such slow intervals it takes long time (more than 6sec).

Therefore, I found that it is faster to disconnect and reconnect BLE again (less than 2.5sec). But I would like to optimize this time to less than 1.5sec.

From the bellow capture, I see that the sd_ble_gap_disconnect command always takes 2 connection intervals to be executed.

Is this any reason for this (BLE specs)?

Is there any way to disconnect on the 1st received connection event?

I am using nRF52832, S132 SD v5.1.0 & SDK v14.2.0

.

Parents Reply
  • Yes, when the central is also power constrained, you will gain not much with slave latency. The Connection Update Procedure is limited by this requirement from the standard: "The master should allow a minimum of 6 connection events that the slave will be listening for before the instant occurs."

    How much data do you have to transmit? Maybe, if you try to utilize your 1s connection intervals as much as possible (high MTU, multiple PDUs per connection event, L2CAP channels etc.), you could already achieve high throughput until your connection update procedure is done.

Children
Related