<?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>Disconnect timeout</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11981/disconnect-timeout</link><description>I have been having issue with BLE Connection that frequently and randomly disconnect due to timeout. When there is no disconnection, everything else has been working fine: getting data through Notification, sending Write Command to the board, etc. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Mar 2016 18:04:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11981/disconnect-timeout" /><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45357?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2016 18:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dd073e0-86ed-4122-91a1-250ad4e533d5</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;Increasing the the connection supervision timeout resolved the problem. It was originally set at 100ms, and increasing to 1000ms removed the problem. As explained in the comments by run_ar, it requires about 6 times the connection interval, which is also can be set in nRFgo Studio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45356?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2016 17:59:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19bcb74b-06df-424d-bcf1-b5bc65f886f0</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;Thank you very much for the explanation.
And to answer my previous question, the connection interval is defined in nRFGo Studio with the minimum and maximum connection interval parameters. It was set at max of 22.50 ms previously, and seems 100ms connection supervision timeout is not enough then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45355?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2016 12:54:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0438fd67-b492-46fd-8407-6be20dda4c82</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Sort of. The connection interval is the interval at which the slave will wake up and listen for a packet from the master. This can be empty packets or data etc. When a packet is received by the slave it will reply to this (empty packet or data)  Note that there is one connection event per connection interval and that  multiple packets can be exchanged in one connection event. The Link Layer checks that packets has been successfully transmitted, and will re-transmit a packet until it&amp;#39;s successfully transmitted or the connection supervision timeout is reached. If the connection supervision timeout is reached, the connection is considered broken and the slave can go back to advertising (application dependent). So if you have a short connection supervision timeout it only takes a few consecutive failing packets for the connection to break.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45354?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 13:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92558891-aad0-4f74-982d-68b308ec65cf</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;Sorry, it seems my question wasn&amp;#39;t clear.
You mentioned about timeout should be 6 times &amp;#39;re-transmit&amp;#39;, or in the last message you use the term &amp;#39;connection interval&amp;#39;.  I don&amp;#39;t understand where are those values come from?
Is this how frequently the Android sends request to the BLE? So that will include how frequently Android sends Write or Indication for Client Characteristic Configuration Descriptor?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45353?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 10:21:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8bc449f-5bab-46b6-bf7b-4022668fb021</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;If your connection interval is 1000ms I would recommend using a connection supervision timeout of about 6000 ms.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45352?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 21:53:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dc5b945-f6f9-4d31-a4bb-88db28db0631</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;So what is the re-transmit value? Is that configurable as well in the nRFStudio?  I picked the 1000ms randomly, so it will be good to know what should be the right number. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45351?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2016 15:28:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be66a6e4-955e-4d01-bd62-e9ece1842f55</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Yes, In general I would recommend that the timeout value allows for at least 6 re-transmits to allow for some interference (causing re-transmissions).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45350?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2016 04:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d46b2b-722e-4fea-8d0a-ec38ffa6309b</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;I added update 3 with the debug output in Arduino.&lt;/p&gt;
&lt;p&gt;So I may have found the root cause of the problem.&lt;br /&gt;
The connection supervision timeout was originally set at 100ms, and it was showing the disconnect. The update3 test (btsnoop_hci-26.log and arduino-serial-26.txt) also uses the same setting.  In a different run, I have tried to increase it to 1000ms, and I didn&amp;#39;t see the disconnect timeout then.
Please check whether you can see the same evidence from the debug output.   Since the problem was intermittent, I still need to run multiple times of tests.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45349?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 15:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e1f12f3-90f4-4800-bf37-f6a1dab9b05b</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Having two handle value notifications on different handles shouldn&amp;#39;t be a problem. Could you &lt;a href="https://github.com/NordicSemiconductor/ble-sdk-arduino/blob/master/libraries/BLE/lib_aci.h#L136"&gt;enable debugging&lt;/a&gt; in ble-sdk-arduino so I can see the debug output in the arduino serial log?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45348?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 00:58:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f260e50-1aa1-4817-ac53-31d101de0eb5</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;I tried to add second bluetooth snoop wireshark file, but somehow it didn&amp;#39;t show up as link. I&amp;#39;m not sure why.  I wonder whether I attached too many files. Please advise.
Although in preview those two wireshark files were showed up as proper hyperlink and I was able to download them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45347?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 12:26:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a223a7b-b519-4972-a822-147977d237a0</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;You can change the 32KHz clock source by opening the configuration xml file in nrfgo studio and modify the HW settings, then generate a new services file.  Another possibility would be to increase the ppm value for the 32 KHz crystal to see if this helps.&lt;/p&gt;
&lt;p&gt;The sniffer trace will show what is happening on air, while the Bluetooth snoop will show what is happening between the phone the Bluetooth chipset. But we can start by looking at the bluetooth snoop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45346?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2016 14:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33dd49ea-839a-47f6-a5be-0c55a62364dd</guid><dc:creator>Kunta</dc:creator><description>&lt;p&gt;I&amp;#39;m not familiar with 32kHz clock setting. How do I verify that?
And will sniffer trace give a more information than the Bluetooth snoop that is available from Android platform?  I&amp;#39;m going to collect more data and post the wireshark file from Bluetooth snoop.
I don&amp;#39;t add anything on the security settings of the device, so it sounds like bonding will not be required then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect timeout</title><link>https://devzone.nordicsemi.com/thread/45345?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2016 12:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a13ddc5d-5b6f-48ea-8d39-76a76ad59da9</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Whether bonding is required or not depend on the security settings on your device, e.g. in the setup content. You should also make sure the hw settings for the 32kHz clock is correct or consider using the internal rc. A sniffer trace might help to see why you where disconnected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>