<?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 connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35918/ble-connection-to-ios-device-disconnects-consistently-after-40-seconds</link><description>We are consistently seeing a BLE disconnection after being connected to an iOS device for 40 seconds. On the iOS side, the log output at the time of disconnection says: &amp;quot;[System]Error disconnect from peripheral &amp;lt;DeviceName&amp;gt; Unknown Error.&amp;quot; We are handling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Jul 2020 06:34:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35918/ble-connection-to-ios-device-disconnects-consistently-after-40-seconds" /><item><title>RE: BLE connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/thread/259793?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 06:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b5e9b26-121d-4638-bc2f-229028e1af31</guid><dc:creator>rongzhiwu</dc:creator><description>&lt;p&gt;Hi Erik,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;I had a similar problem, but it took a long time (nearly 20 hours) to disconnect. Did you finally find the root cause?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/thread/139190?ContentTypeID=1</link><pubDate>Fri, 06 Jul 2018 07:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee78afa8-29cc-4846-8546-456639027e4a</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Erik,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I would recommend you to try to use the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_ble_gatt.html&amp;amp;cp=4_0_1_3_2_10" target="_blank" rel="noopener noreferrer"&gt;GATT module&lt;/a&gt;, to ensure that the parameter exchanges is handled correctly.&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Since it looks like there are some things in your application that doesn&amp;#39;t get handled correctly)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Do you use peer manager?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can investigate further, but then I would need you to send me your code. (&lt;em&gt;we can make this case private if this is sensitive information)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;//Martin L.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/thread/138609?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 20:16:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d511b32-8a5a-4fe3-82f1-923fdbaaf384</guid><dc:creator>erik_fw</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_ble_5F00_packets.pcap"&gt;devzone.nordicsemi.com/.../nrf_5F00_ble_5F00_packets.pcap&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached the ble trace, we can see the connection occurring at t=0, then regular correspondence between peripheral(nRF) and central(iPhone) up until t=39.5, at which point the central&amp;nbsp;does not respond to the final packet from the peripheral.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I had previously looked through the thread you linked and tried the suggestions. Our xtal clock accuracy is set to 20ppm, but changing this value did not eliminate the issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It may be important to note that I&amp;#39;ve tried this same connection on iPad with iOS 11 and an iPhone on iOS 9 and both of those held a consistent connection without seeing this issue occur. I&amp;#39;ve also gotten the Heart Rate Service nrf example running on my board with a consistent connection to the iPhone as well, so somehow this issue is only occurring on the iOS11 iPhone7 with our specific program. Currently trying to see where our program and the HRS demo differ, since it does not exhibit this failure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/thread/138533?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 13:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00c42bba-0da5-43a3-b6d2-c61df6fcb55c</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Erik,&lt;/p&gt;
&lt;p&gt;Please check the &amp;quot;&lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer#Downloads" target="_blank" rel="noopener noreferrer"&gt;download&lt;/a&gt;&amp;quot; tab to see the Sniffer user guide as well as the software. (v2)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-df4614297be247848729025fa62e8d77/pastedimage1530538077077v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;it has support for OSx&amp;nbsp; and nRF52 DK)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I would like you to take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/29786/ble_hci_connection_timeout-and-nrf_clock_lf_xtal_accuracy_xx_ppm" target="_blank" rel="noopener noreferrer"&gt;this thread&lt;/a&gt;&amp;nbsp;regarding your error message. What is you chosen&amp;nbsp;accuracy in your system?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/thread/138339?ContentTypeID=1</link><pubDate>Fri, 29 Jun 2018 16:28:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bf12231-2372-4d31-84ba-9986d0337733</guid><dc:creator>erik_fw</dc:creator><description>&lt;p&gt;Having access to a BLE sniffer would be great, but it looks like there&amp;#39;s no supported version for OSx as well as no hardware support for nRF52 dev boards (I&amp;#39;m seeing nRF51 but not 52).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here are our connection parameter definitions:&lt;/p&gt;
&lt;p&gt;/**&amp;lt; Minimum acceptable connection interval (0.015 seconds). */&lt;br /&gt;#define MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_1_25_MS)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;/**&amp;lt; Maximum acceptable connection interval (0.65 second). */ &lt;br /&gt;#define MAX_CONN_INTERVAL MSEC_TO_UNITS(650, UNIT_1_25_MS)&lt;/p&gt;
&lt;p&gt;/**&amp;lt; Slave latency. */ &lt;br /&gt;#define SLAVE_LATENCY 0&lt;/p&gt;
&lt;p&gt;/**&amp;lt; Connection supervisory timeout (4 seconds). */ &lt;br /&gt;#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;These parameters are being initialized with a call to&amp;nbsp;sd_ble_gap_ppcp_set() with a pointer to a ble_gap_conn_params_t structure whose respective members are assigned to the constants defined above.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT for additional info: the BLE_GAP_EVT_DISCONNECTED event gives a reason of 0x08 (BLE_HCI_CONNECTION_TIMEOUT)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection to iOS device disconnects consistently after 40 seconds</title><link>https://devzone.nordicsemi.com/thread/138275?ContentTypeID=1</link><pubDate>Fri, 29 Jun 2018 12:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e21d2f9-3f56-43b2-99e9-19097248380a</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Erik,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to provide a &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer" target="_blank" rel="noopener noreferrer"&gt;sniffer log&lt;/a&gt;&amp;nbsp;to actually see what is happening over the air?&lt;/p&gt;
&lt;p&gt;Could you also provide a snippet of the actual defines for the connection parameters?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;//Martin L.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>