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

Ble inactivity Timeout

Hello everyone, 

I work on a project with a custom board and e NRF52840 on it. 

I work with the SDK15.2.0, the SoftDevice s140 and FreeRTOS. 

The BLE function well but if the Android App crash the peripheral is still connected. 

I want to know if there is a timeout or a mechanism to detect inactivity on the connection.

Or I must to implement a app timer to do that ?

Thanks in advance for any answer.

Etienne

  • I would suggest that you change your app so that you store the device that you were last connected to and scan for connected devices on app start.

    Note that the standard Android scan doesn't always pick up devices that are bonded or connected to the phone that the app is running on, instead call the Adapter API for GetConnectedDevices. You can then either continue with the connection or disconnect and reconnect your device.

Related