<?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>Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46345/central-device-disconnects-ble-connection-after-30-seconds</link><description>I have problem with BLE connection being constantly disconnected after 30 seconds. It is always disconnected by central device. It doesn&amp;#39;t matter if it is iOS, Android or Windows 10 PC. It doesn&amp;#39;t matter if my device is paired or not. I think that my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2019 22:33:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46345/central-device-disconnects-ble-connection-after-30-seconds" /><item><title>RE: Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/thread/183915?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 22:33:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da28db47-08d3-46ac-9614-e78c7174dba4</guid><dc:creator>grzegorz</dc:creator><description>&lt;p&gt;It would be great if you could report it internally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/thread/183889?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 15:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:077e9eb2-68bc-4cef-af26-a5199ea9b1a7</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Good point, seems someone introduced the issue in SDK15.1, since the same line of code does not exist in SDKv15.0. I slightly like the implementation in SDKv15.0 also, since it actually start a timer that will secure the link after a configurable timeout, should not be needed though, but as kind of a &amp;quot;failsafe&amp;quot; it may also work if you require an encrypted link.&lt;/p&gt;
&lt;p&gt;In any case, I can report it internally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/thread/183603?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 20:10:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d785931a-2f89-4023-bf02-b3d37707b763</guid><dc:creator>grzegorz</dc:creator><description>&lt;p&gt;Thanks Kenneth. I was using pm_handler_secure_on_connection() in ble_evt_handler(). I&amp;#39;ve switched to pm_handler_secure_on_error() and it works now.&lt;/p&gt;
&lt;p&gt;But calling pm_handler_secure_on_connection() wasn&amp;#39;t my random choice. It&amp;#39;s how it looks like in SDK ANCS example. Why Nordic calls this function in their official example instead of pm_handler_secure_on_error()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/thread/183540?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 14:34:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2333bc34-7cbb-4aa5-8dbb-a52142358d51</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suggest to compare with one of the working SDK examples, though you may want to check out:&lt;br /&gt;&lt;a href="https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf"&gt;https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For instance it says in 23.10 Pairing: &amp;quot;The accessory should not request pairing until an ATT request is rejected using the Insufficient Authentication error code.&amp;quot;&amp;nbsp;I can see from the sniffer log you are sending it almost immediately after connection, that won&amp;#39;t work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/thread/183245?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 19:19:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfe6e29b-24a0-4440-b7b7-ccf94e57867b</guid><dc:creator>grzegorz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I use custom apps on Windows and iOS, but they don&amp;#39;t make the disconnection. On Android there is just nRF Connect used for tests. So I think this must be something about BLE stack or BLE standard.&lt;/p&gt;
&lt;p&gt;I use SDK 15.3 and SoftDevice 6.1.1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central device disconnects BLE connection after 30 seconds</title><link>https://devzone.nordicsemi.com/thread/183173?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 14:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9b9202d-8c85-45da-a9a3-0e142afb9ed7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The disconnect reason is what is shown as &amp;quot;Error Code&amp;quot; in the sniffer trace - remote user terminated connection (0x13). This does not indicate an error in itself, it just states that the central side decided to disconnect (for some reason). A 30 seconds match for instance a GATT timeout, but I do not see anything in the sniffer trace that it should be the problem. In that case you should get disconnect reason 0x08 (timeout). Could it be that the software running on the central devices decide to disconnect for some reason? Do you use custom apps?&lt;/p&gt;
&lt;p&gt;Which SDK and SoftDevice version do you use?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>