<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BLE Disconnect Detect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24095/ble-disconnect-detect</link><description>Hi all,
I am not very proficient in NORDIC and BLE. I was wondering if you could answer me.
I am developing a module using NRF52. I have a redundant wireless communication channel: (1) a BLE connection (2) an RF link. This redundancy is just for sake</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Aug 2017 21:16:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24095/ble-disconnect-detect" /><item><title>RE: BLE Disconnect Detect</title><link>https://devzone.nordicsemi.com/thread/94870?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2017 21:16:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1776898c-3b22-4337-a7b0-6f96ff3f57e2</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;I suggest that you read up on the getting started guides for BLE in the &lt;a href="http://infocenter.nordicsemi.com/index.jsp"&gt;Infocenter&lt;/a&gt;. You probably want to start with the SoftDevice Specification and nRF5x Getting Started guide. The disconnection event will manifest as a SoftDevice event of type &lt;code&gt;BLE_GAP_EVT_DISCONNECTED&lt;/code&gt;, and depending on your setup it might trigger a Software Interrupt (SWI). There are some examples in the SDK that can get you started. Normally, the main code will pull events and optionally call a &lt;code&gt;xxx_on_ble_evt()&lt;/code&gt; function for each module. The heart rate and NUS examples are easy to start with.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Disconnect Detect</title><link>https://devzone.nordicsemi.com/thread/94869?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2017 18:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b86e402-57ad-4c90-b1f0-1de0d440cbb8</guid><dc:creator>Mehrdad</dc:creator><description>&lt;p&gt;Is there any interrupt of event to handle this disconnection. Would you provide some guides for the code?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Disconnect Detect</title><link>https://devzone.nordicsemi.com/thread/94868?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2017 17:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b3413ce-6d63-4e73-a14f-a844da7797ea</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The answer is &lt;strong&gt;yes&lt;/strong&gt;, you will get a disconnection event on both sides after some time.&lt;/p&gt;
&lt;p&gt;When two peers fail to communicate over Bluetooth, either due to poor signal quality, noise or other issues, they will retry until the Supervision Timeout is reached. The Supervision Timeout value is set by the central device upon connection, and is specified in a multiple of 10 milliseconds. Whenever the time since the last successful communication exceeds the timeout value, the link is considered lost and a disconnection event is triggered.&lt;/p&gt;
&lt;p&gt;So what you want is to make sure that the supervision timeout is quite low, in order to quickly detect issues. &lt;a href="https://devzone.nordicsemi.com/question/60/what-is-connection-parameters/"&gt;There are some rules&lt;/a&gt; from the Bluetooth spec on how low it can be, which depends on the other connection parameters, and the maximum on Nordic SoftDevices, it is 32000 milliseconds.&lt;/p&gt;
&lt;p&gt;I also recommend reading this answer for more information about connection parameters and what guidelines that phones are adhering to:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/60/what-is-connection-parameters/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>