<?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>Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24987/is-there-a-way-to-reduce-the-link-loss-detection-time</link><description>ble_gap.h Hi,
At the moment, when a link loss is detected (in a connected mode), it takes around 3 seconds for it to be identified (with DISCONNECTED event). Is there a way to reduce this link loss detection time from 3 seconds to less than a second</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 09 Sep 2017 18:45:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24987/is-there-a-way-to-reduce-the-link-loss-detection-time" /><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98410?ContentTypeID=1</link><pubDate>Sat, 09 Sep 2017 18:45:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42f0cf41-d2e8-47cf-8fbe-4cc9efa39abe</guid><dc:creator>nordicdev</dc:creator><description>&lt;p&gt;Thanks for the reply, endnode. You are correct. Found this in ble_gap.h : &amp;quot;The Supervision_Timeout in milliseconds shall be larger than (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds.&amp;quot; .&lt;/p&gt;
&lt;p&gt;My max conn interval is 30msec and conn latency is 0.&lt;/p&gt;
&lt;p&gt;hash define MAX_CONNECTION_INTERVAL     MSEC_TO_UNITS(30, UNIT_1_25_MS)&lt;br /&gt;
hash define SLAVE_LATENCY               0&lt;br /&gt;
hash define SUPERVISION_TIMEOUT         MSEC_TO_UNITS(4000, UNIT_10_MS)&lt;/p&gt;
&lt;p&gt;Hence, I can reduce my supervision timeout from 4 seconds to 1 second.
This works! Now, I get link loss indication after 1 second the link is actually lost. Thanks, again Endnode!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98408?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2017 06:16:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d852e80-add7-4fbd-ad43-697fe7d77a1c</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;No, you&amp;#39;ve misunderstood. Indeed your &lt;code&gt;ble_gap.h&lt;/code&gt; file is intact, otherwise (most probably) Soft Device API calls stop working. You should &lt;strong&gt;SEARCH&lt;/strong&gt; for Supervision Timeout and &lt;strong&gt;READ&lt;/strong&gt; what is explained there. Moreover what you write in your original question isn&amp;#39;t precise: if link timeouts because there are no answers from the peer (being Slave or Master, doesn&amp;#39;t matter) then you should get different event then DISCONNECTED.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98409?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 23:16:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e435521-0f4c-4d87-a1eb-fb71e6c3da54</guid><dc:creator>nordicdev</dc:creator><description>&lt;p&gt;Hi Endnode, thanks for the reply. The ble_gap.h in the central side is the same as in the example code provided for ble_app_hrs_c. I am not sure which hash define to look for. I have attached my ble_gap.h (which is the same as provided by the example code) herewith. I thought it would be as simple as changing the value of a hash defined. Sorry, I am not very familiar with BT SIG Core spec. Which chapter do you recommend I should have a read in the BT SIG Core spec?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98407?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 07:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3310af24-8a0a-4b89-8fbb-8b2d6f90609d</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Also MIN and MIX values are useless, there must be ACTUAL value which is really used on Master side. What is that? Because Supervision Timeout has also certain limits which depend on other things like connection interval and latency. See more in that specification or shorter extract in comments from Nordic in SDk file &lt;code&gt;\components\softdevice\s132\headers\ble_gap.h&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98406?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 07:45:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e4470f0-4795-4bb1-91d0-fa834cc2014d</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;We are talking about Supervision Timeout not connection interval here. That&amp;#39;s why I asked you not for defines in your source code but actual content of Connection Request. Have you read anything about that time-out procedure e.g. in BT SIG Core specification?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98405?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 07:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e4717c4-4116-4c32-8175-6da1084bc268</guid><dc:creator>nordicdev</dc:creator><description>&lt;p&gt;Hi Endnode, thanks for the response. Following are my connection interval parameters set at the master:
HASH define MIN_CONNECTION_INTERVAL     MSEC_TO_UNITS(7.5, UNIT_1_25_MS)&lt;br /&gt;
HASH define MAX_CONNECTION_INTERVAL     MSEC_TO_UNITS(30, UNIT_1_25_MS)&lt;br /&gt;
One side of the link is peripheral (nrf51822: ble_app_hrs example) and the other side is central (nrf51822: ble_app_hrs_c example). I am not sure if this has answered your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to reduce the link loss detection time?</title><link>https://devzone.nordicsemi.com/thread/98404?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 07:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0053dd7b-18af-4d2a-9e14-7d4dbbbcc2f9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;This should be parameter set in Connection Request by Master (and possibly changed later on) so it cannot be 3 seconds all the time. What are both sides (HW+SW) of your link? What is in Connection Request during your tests?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>