<?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 Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27066/ble-central-disconnect-after-exactly-65-5-sec</link><description>Hi, 
 I&amp;#39;m having a problem at the moment with code based on Espruino on nrf52. 
 I connect as follows: 
 ble_gap_scan_params_t m_scan_param;
 memset(&amp;amp;m_scan_param, 0, sizeof(m_scan_param));
 m_scan_param.active = 1; // Active scanning set.
 m_scan_param</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Aug 2019 13:38:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27066/ble-central-disconnect-after-exactly-65-5-sec" /><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/203850?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 13:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c2968a5-7bb8-465c-9c8e-d492332c27f6</guid><dc:creator>Marius Heil</dc:creator><description>&lt;p&gt;Hi, I am not quite sure if I correctly understood the answer. Was this a confirmed softDevice bug? i created a ticket of my own for a similar issue:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50942/still-trouble-with-ble_gattc_evt_timeout"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/50942/still-trouble-with-ble_gattc_evt_timeout&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106382?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 13:26:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:805c2c9f-8cd1-4d25-afdc-c63259ecbef3</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Great - thanks for all your help, and for looking in to this further! So it really was just one bug (the central mode) after all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106378?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 11:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a21f2e7b-e54c-4348-ba98-5a1af106b986</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;The SoftDevice is disconnecting because the central is not responding to the CPU Request. By not responding it is breaking the specification, and this causes the disconnect after 60 seconds. So it is not a bug, it is expected behavior. The solution is to make the central respond, either with accept or reject. You are ending up in variant #3 in &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v3.0.0%2Fgroup___b_l_e___g_a_p___c_p_u___m_s_c.html&amp;amp;cp=2_3_0_1_1_2_1_3_7"&gt;this&lt;/a&gt; MSC, but it is incorrect, because you don&amp;#39;t get BLE_GAP_EVT_CONN_PARAM_UPDATE. Instead the SoftDevice disconnects, and you receive BLE_GAP_EVT_DISCONNECTED. I have reported this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106381?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 14:28:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:166b7654-872d-4e39-b5d4-eb1944a461d3</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Fantastic - thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106380?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 14:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66740c59-77a4-4248-addb-7dd82d19d648</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I missed that. I investigated some more, and was able to reproduce. This seems like a bug, but I will have to talk with the developers, will add a comment here as soon as I know more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106390?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 09:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5beb940c-2867-4dc0-a15d-69aa72bac607</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;&lt;code&gt;on_conn_params_evt&lt;/code&gt; is empty and &lt;code&gt;disconnect_on_fail&lt;/code&gt; was set to false - so I&amp;#39;m really struggling to see how it managed to disconnect. Also, when disconnected it gave BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION, but I assume that if ble_conn_params were the thing that disconnected it should have reported BLE_HCI_CONN_INTERVAL_UNACCEPTABLE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106389?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 09:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79a466ef-7d44-4a76-ac9c-0a182c6296f8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;The new sniffer trace makes much more sense :) Your suggested solutions should be sufficient. If you set disconnect_on_fail to false the connection negotiation module shouldn&amp;#39;t automatically disconnect, are you sure the disconnection isn&amp;#39;t done from on_conn_params_evt()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106377?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 16:02:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e5eed4c-a4cb-4199-9a7c-88496914f771</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;I&amp;#39;m happy to provide hex images and instructions if it helps at all?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106376?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 16:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fb800fd-29da-4e84-a35e-c7db193575a7</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ok, adding a BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST handler seems to have fixed the central mode issue... I&amp;#39;m still a bit worried that a connection by something that doesn&amp;#39;t support it seems to cause a disconnect even though &lt;code&gt;disconnect_on_fail&lt;/code&gt; is false&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106375?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 15:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1758cd0-e1d4-426f-a2e3-fff55448aaff</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;I&amp;#39;ve just added more traces - I think the original trace might have broken somehow. This time there&amp;#39;s an obvious disconnection from the peripheral and the Empty PDUs keep coming until the end (which makes sense as the DK is responsive via BLE right until the end).&lt;/p&gt;
&lt;p&gt;So ideally I guess there are 2 fixes needed: Make the central mode negotiate connection parameters if asked, but also stop the peripheral mode auto-disconnecting if it fails? If it helps this is the ble_conn_params code that seems to be causing the issue for the peripheral: &lt;a href="https://github.com/espruino/Espruino/commit/d006094b20e4598633abb6822131ab5bb2e901e1"&gt;github.com/.../d006094b20e4598633abb6822131ab5bb2e901e1&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106388?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2017 10:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ebf99b9-0deb-42fb-9ec1-2ffdb380972c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t know why you get disconnected. Could you do a new sniffer trace with Android? And another one with the DK as a central? Maybe you can try to change the connection parameters? What happens if you increase the minimum connection interval? To say, 30 ms?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106387?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2017 16:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd7cbd8d-e256-46e6-9c6b-c3c823e7b8df</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Actually this isn&amp;#39;t usable at the moment - removing &amp;#39;ble_conn_params&amp;#39; has stopped the PC lowering the connection interval, so now the communication speed is significantly slower. So how can I have &amp;#39;ble_conn_params&amp;#39;, but make it so there aren&amp;#39;t disconnects if the central isn&amp;#39;t responding? I think I have this problem on iOS too where the connection just drops out after 60 seconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106386?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2017 16:20:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:813ae62d-f3fc-4690-aa4e-55bc5e58bd5e</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ahh, thanks! That explains a lot (like why the interval was much less than I was expecting). So do we have any idea how it could have been disconnecting? Or was it somehow updating the parameters such that the interval for transmissions was far too high?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106385?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2017 15:57:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:839d8d70-93eb-499e-be67-d8f6b3b9206c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Not really negotiated, the central decides what connection parameters to use upon connection. Then the central can do a connection parameter update (with or without the peripheral sending a connection parameter update request first).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106384?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2017 10:25:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddbe6ebd-672d-4c79-8212-270b65034b25</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ok - but those are negotiated at the start? It&amp;#39;s only if I wanted to be able to change them &amp;#39;on the fly&amp;#39;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106383?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2017 10:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a8cb915-db3f-45b7-8262-62694a168833</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Difficult to say if it is important for your application or not, without it the peripheral will not send connection parameter update requests, it will not request to update the connection parameters (connection interval, slave latency, connection supervision timeout).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106379?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 15:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bb04768-6826-47a4-bf18-6902ba7040d7</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Odd - actually I didn&amp;#39;t notice the gap. I assumed it went straight from the PDUs to advertising. But yes, advertising starts again immediately on disconnection. I had been using &lt;code&gt;ble-conn-params&lt;/code&gt; because that&amp;#39;s what was used in one of the other examples - but have just removed that and it now works (even though &lt;code&gt;disconnect_on_fail&lt;/code&gt; was &lt;code&gt;false&lt;/code&gt; before). Just before I set this to answered - what am I missing by not having &lt;code&gt;ble-conn-params&lt;/code&gt; - is it anything important?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106374?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 15:15:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e86ef9b9-27f1-4666-a969-35dc564b9708</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Thx. I&amp;#39;m not sure what is happening here, but from the sniffer trace it doesn&amp;#39;t seem like the peripheral is disconnecting. From the trace it seems like there is no communication after 30.5s, and then 35s later the peripheral starts to advertise again? Do you start advertising again when you get the disconnection event? It also seems like the peripheral is sending a Connection Parameter Update request, are you calling sd_ble_gap_conn_param_update() somewhere? If you are, could you try not doing that? Please add the new sniffer trace as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106373?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 14:33:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:955ccc7c-b120-4b9d-9dc8-80f351afa683</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Just edited to add a sniffer trace&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106372?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 13:25:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa43869c-63ee-4b40-85ab-e3914dd7e63c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Not exactly, but it might give some clues on what is happening.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106371?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 13:24:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85e8b6d5-0ebf-434d-a474-4703dda6e9a0</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;I don&amp;#39;t - but could probably get one. Any idea what I&amp;#39;d be looking for? I mean, &lt;code&gt;BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION&lt;/code&gt; implies that it might be a software issue on the peripheral&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106370?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 13:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:849478a1-3a19-4475-9329-6351f03b535c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Thanks for checking. I had to ask ;) Do you have a sniffer trace?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106369?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 11:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ba31fbc-6109-43f7-a430-3a5fe92f1e12</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ok, now I&amp;#39;m certain. I renamed the function in &lt;code&gt;ble_gap.h&lt;/code&gt; and added a stub that printed if it was called. &lt;code&gt;sd_ble_gap_disconnect&lt;/code&gt; is never called - by anything outside the softdevice - in my code or Nordic&amp;#39;s.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106368?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 11:12:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1630959-ea3c-41e0-a4fe-b3bdfbe4b58b</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Yes, pretty sure. I guess it could be called from one of Nordic&amp;#39;s libs - eg ble-conn-params - but I&amp;#39;d expected that if it did, I&amp;#39;d get a different reason than &lt;code&gt;BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION&lt;/code&gt;, since it sends &lt;code&gt;BLE_HCI_CONN_INTERVAL_UNACCEPTABLE&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central disconnect after exactly 65.5 sec</title><link>https://devzone.nordicsemi.com/thread/106367?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2017 10:55:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f6c9529-400b-478e-96c5-61b4c042e4d8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t think you will get BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION without calling sd_ble_gap_disconnect(), but I&amp;#39;m not 100%. Are you absolutely sure you are not calling sd_ble_gap_disconnect()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>