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

SD132 sd_ble_gap_disconnect - missing event

Dear Nordic, 

we are using s132_nrf52_3.0.0_softdevice.hex on nRF52832, nRF5_SDK_12.2.0_f012efa

We have noticed, that sometimes after issuing sd_ble_gap_disconnect(m_device_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION) we do not get disconnect event (BLE_GAP_EVT_DISCONNECTED). It is happening 1 out of 40 cases. What can we actually expect that will happen for sure/probably after this command?

We have designed our application, that it relates on that signal to be emitted (when in connection state), like clearing connection handles and so. And it usually happen, but as I wrote we documented cases when this fails. In both cases we get no error from the command. Our test case is to run continuous connections/disconnections in rounds for several hours.

Is this something that sounds familiar?

Our workaround is to wait limited time after and if the event won't happen, we will do the action manually. 

Thank you for any advice, Jan

Related