This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

disconnect time

Hi. I'm using nRF52832, SDK13.0.0 as peripheral.

When I want to disconnect central, I'm using sd_ble_gap_disconnect function as below.

	err_code = sd_ble_gap_disconnect(conn_handle_val, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
	APP_ERROR_CHECK(err_code);

I can get disconnected event immediately from "BLE_GAP_EVT_DISCONNECTED" case.

But somtimes(under 1%), i get the BLE_GAP_EVT_DISCONNECTED event 5~10second later. I don't know why.

I need your help.

  • Hi Roger,

    You may want to capture a sniffer trace when the issue happens and see check why the link was not terminated immediately.

    My understanding is that the connection terminate request has to be ACKed before the BLE_GAP_EVT_DISCONNECTED can come. So there is a chance that the central didn't ACK the request and simply stop sending data after that. This will end up BLE_GAP_EVT_DISCONNECTED comes after 10 seconds because of timeout. You can check the disconnect reason to see if it's a timeout or it's user terminates connection.

  • Thank you very much for your help.

Related