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
  • It is hard to give any good advice without being able to reproduce the issue. If it only happens in your application and with only a specific device, it is hard to reproduce and debug on our end. This is why I asked the questions.

    1. 30 seconds are hardcoded and given by spec (see Vol 3, Part F. - 3.3.3 of Bluetooth Core v5.0 specifications). Just to be sure, you are not receiving the BLE_GATTC_EVT_TIMEOUT event either?
    2. Do you have any debug capabilities on the dongle? It would help if you could be able to debug the connectivity firmware, to see if the events are reported from the softdevice or not. If they are reported from the softdevice, there must be some issue/bug causing the events to not being passed along to the pc-ble-driver application. I have never encountered a situation where these events are not delivered from the softdevice.
Reply
  • It is hard to give any good advice without being able to reproduce the issue. If it only happens in your application and with only a specific device, it is hard to reproduce and debug on our end. This is why I asked the questions.

    1. 30 seconds are hardcoded and given by spec (see Vol 3, Part F. - 3.3.3 of Bluetooth Core v5.0 specifications). Just to be sure, you are not receiving the BLE_GATTC_EVT_TIMEOUT event either?
    2. Do you have any debug capabilities on the dongle? It would help if you could be able to debug the connectivity firmware, to see if the events are reported from the softdevice or not. If they are reported from the softdevice, there must be some issue/bug causing the events to not being passed along to the pc-ble-driver application. I have never encountered a situation where these events are not delivered from the softdevice.
Children
No Data
Related