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

BLE Disconnect Timeout

Hello,

How can we force a device to disconnect from a BLE Network after a certain period of inactivity (timeout) ?

Thanks.

Parents
  • There is nothing internally in softdevice or SDK drivers that will detect this inactivity. Your application have to detect this by itself. It can for example start a 10 second timer which has to be reset everytime there is data write is done. So when it expires it means that no data has been transferred in the last 10 seconds. The downside is that this will only work for writes, if you want notifications or other procedures to count as activity, you have to reset the timer at those places.

    There is a lot of traffic between two controllers in connection that are not notified to the application. If you use timers that traffic will be considered as inactivity. There is no other way that I can think of right now.

  • Yes you can close the thread, this is the answer i was looking for

Reply Children
No Data
Related