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

disconnecting while operations are in progress never gives BLE_GAP_EVT_DISCONNECTED event

2020-01-24-092119EST-ProductStoppedGettingEventsFromNordicDK.txtImprivataTestNordicEventsNotReceived.zipCalls_to_pc_ble_driver.cpp0285.2020-02-24-TestProgramUploadedToNordicSupport.zipFeb25TestProgramUploadedToNordicSupport.zipImprivata_bgTestApp.zipbgSDKTestAppMay4.zip2020-05-05-035347-NordicDK_USB840M_200505_ClockInternal_2in1.hex.txt.txtbgSDKTestAppMay6.zipI’m developing an application based on pc-ble-driver to talk to an nRF52840-based dongle (from Fanstel).

I’m having trouble disconnecting cleanly when a connection has operations in progress.  For example, I call ‘sd_ble_gattc_write’, which returns NRF_SUCCESS, but I don’t receive event BLE_GATTC_EVT_WRITE_RSP (after waiting 60 seconds), so I decide to disconnect. When this happens, sd_ble_gap_disconnect returns NRF_SUCCESS, but I do not receive BLE_GAP_EVT_DISCONNECTED even after waiting 30 seconds. The connection supervision timeout is 4 seconds.  What could cause the disconnect to not generate any BLE_GAP_EVT_DISCONNECTED event?

What I’m trying to accomplish here: if a connection is not responsive, I want to end that connection, without disturbing other connections I have open.

Thanks,

Paul Bradford

Parents
  • I was able to read the trace, but unfortunately, it did not provide more details on why this happens.

    1. Are you able to provide a project that we can use to reproduce this behavior? 
    2. What slave device are you interfacing? Are you seeing this with other devices or only with this one?
    3. Is the nRF52840 Dongle responsive after the GATT write/disconnect functions are triggered?
    4. Which version of pc-ble-driver are you using, and which softdevice API version?

    Regarding your questions:

    1. If you do not get a response to the GATTC procedure API call, you should get a BLE_GATTC_EVT_TIMEOUT event after 30 seconds (see GATTC Timeout).
    2. For DISCONNECTED, the event should come right after connection supervision timeout at latest (see BT 5.0 Core spec Vol 6, Part B - 5.1.6)

Reply
  • I was able to read the trace, but unfortunately, it did not provide more details on why this happens.

    1. Are you able to provide a project that we can use to reproduce this behavior? 
    2. What slave device are you interfacing? Are you seeing this with other devices or only with this one?
    3. Is the nRF52840 Dongle responsive after the GATT write/disconnect functions are triggered?
    4. Which version of pc-ble-driver are you using, and which softdevice API version?

    Regarding your questions:

    1. If you do not get a response to the GATTC procedure API call, you should get a BLE_GATTC_EVT_TIMEOUT event after 30 seconds (see GATTC Timeout).
    2. For DISCONNECTED, the event should come right after connection supervision timeout at latest (see BT 5.0 Core spec Vol 6, Part B - 5.1.6)

Children
No Data
Related