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

inactivity timeout

I use a nrf51822 with the sdk 10.0.0 and s110 8.0.0. The nrf51822 have a peripheral role. The Connection interval min is set to 500ms, the Connection interval max to 1s, the slave latency to 0 and the connection supervisory timeout to 4s. The connexion and the data exchange between the central and the peripheral works well. But no timeout occur after an inactivity of 4s and more. The central must be indefinetly connected without timeout event. I would like to know if the timeout is manage by the soft device, or i must manage it?

Parents
  • Is the inactivity you mention inactivity of your messaging between the central and peripheral, or are you referring to 4 seconds of no connection events?

    Update: OK, the BLE protocol keeps the connection up using connect events. As long as those are flowing, the connection will not time out. What I did in my application was to create an app timer to timeout my activity on the connection. If I do not get a message from my central application in X seconds I then execute the following call:

    sd_ble_gap_disconnect(appBleData.connHandle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
    

    This will break the connection.

    I restart the timer every time I receive one of my proprietary commands.

  • You are welcome. Please mark the answer as accepted if you don't mind.

Reply Children
No Data
Related