<?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>LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70865/ll_connection_update_ind-before-response-to-connection-parameters-update-request-causes-disconnect</link><description>Our peripheral application sends an L2CAP Connection Parameters Update Request to change the connection interval 30 seconds after connecting. For most hosts, it works fine. But with an Android 6 tablet it disconnects right after the switch to the new</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Jan 2021 04:17:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70865/ll_connection_update_ind-before-response-to-connection-parameters-update-request-causes-disconnect" /><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/291636?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 04:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87bdf590-a9da-4544-bcdf-a50588fd5dce</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;You can also take control of the&amp;nbsp;&amp;nbsp;&amp;nbsp;sd_ble_gap_data_length_update procedure, and see if the resulting update event does not arrive and the link disconnects with a reason code as below and fall back to a new connection without Data Length extensions.&lt;/p&gt;
&lt;p&gt;Check the error code that BLE_GAP_EVT_DISCONNECTED would provide, I hope it would be a 0x22 (LL Response timeout) instead of a generic Connection Timeout (0x08).&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You are correct that it appears to be at a 4.1 or 4.0 based on the LL_FEATURE_REQ from the master and it actually does not support the data length extension as the feature bit for that seems to be set to false.&lt;/p&gt;
&lt;p&gt;As you have surmised you may be able to better control the procedure from the Android and maybe use a handshake to signal the nRF that is ok to start the DLE or not do so at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/291597?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 17:59:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96b1e6f4-aa17-4c2b-b2f1-b31a36e1ba70</guid><dc:creator>Saxman58</dc:creator><description>&lt;p&gt;The tablet is a Samsung 8&amp;quot; Galaxy Tab E, model SM-T377V running Android 6.0.1 (we have many like this in the field, so I didn&amp;#39;t upgrade for testing).&amp;nbsp; The hardware version is T377V.01, but I don&amp;#39;t know how to find the Bluetooth IC used.&amp;nbsp; At least some Samsung Galaxy models use Broadcom chips.&amp;nbsp; Websites say this model is Bluetooth 4.1 in the US and 4.0 elsewhere, but I can&amp;#39;t confirm that and don&amp;#39;t know if that is up to date.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/291463?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 10:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4213e0a2-5691-4656-aabb-cc003d952fbc</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;Good to hear that. &lt;br /&gt;The bug of sending a PING_RSP instead of a&amp;nbsp;&lt;span&gt;LL_LENGTH_RSP is usually a controller level issue as well so checking just on android OS version may be a bit tricky.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;Can you let me know the phone/tablet and the specific OS version including minor numbers that you are using&amp;nbsp; and the Bluetooth IC in it if possible.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please accept my answer and give it an upvote.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/291408?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 04:13:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2228814-7009-46fa-8f1e-3f7681fb6885</guid><dc:creator>Saxman58</dc:creator><description>&lt;p&gt;Thanks David!&amp;nbsp; I changed the max packet length to 27 and that cleaned up the strange initial communications, and the connection is no longer lost later.&amp;nbsp; Removing the LL_LENGTH_REQ also caused the Android master to no longer send the unsolicited LL_PING_RSP.&amp;nbsp; Perhaps the old Android stack was misinterpreting the length request as a ping request???&amp;nbsp; Here is the new trace if you&amp;#39;d like to see it:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/LS-with-Android-6-tablet-_2D00_-max-packet-size-27-makes-it-work.pcapng"&gt;devzone.nordicsemi.com/.../LS-with-Android-6-tablet-_2D00_-max-packet-size-27-makes-it-work.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Most of the time, the legacy packet limit is ok, but we had hoped to use the longer length to optimize the speed for some infrequent large file transfers.&amp;nbsp; Perhaps when our Android app is further along we can try changing the length from that side where we&amp;#39;ll know the Android version and whether it can handle it properly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/291173?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 07:16:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c6cb2a9-522b-45ef-b596-77fdf40a1641</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;We can list the weirdness in this trace first which can trigger a stop on the slave radio and then examine the timing as a later step.&lt;/p&gt;
&lt;p&gt;1. LL_LENGTH_REQ from the slave does not seem to get the required LL_LENGTH_RSP response from the master. This can trigger a disconnect where the radio will stop. I see this in both traces so its seems something is broken on the master.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;The master is sending a LL_PING_RSP as the packet starting the PING procedure instead of sending the LL_PING_REQ, the slave responds with LL_UNKNOWN_RSP. This should not trigger a radio stop but the LL code on the master seems to be buggy.&lt;/p&gt;
&lt;p&gt;Lets try to stop the slave from sending the LL_LENGTH_REQ, can you set the max packet length to the 27 byte legacy limit ?&lt;/p&gt;
&lt;p&gt;If that is stopped, then we can try to stop the PING_RSP by sending a PING_REQ as soon as the link is connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/291130?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 17:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fc2fca6-7a19-4a61-a8e3-bf2a0425c72e</guid><dc:creator>Saxman58</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4606.LS-drop-connection-with-Android-6-tablet-on-Conn-Interval-change.pcapng"&gt;devzone.nordicsemi.com/.../4606.LS-drop-connection-with-Android-6-tablet-on-Conn-Interval-change.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hi David.&amp;nbsp; Here is the pcap file from when it fails.&amp;nbsp; It was captured with the nRF Sniffer profile in Wireshark.&amp;nbsp; The connection starts on line 92 and the timing change and disconnect starts at 1486, 30 seconds later.&amp;nbsp; I&amp;#39;ve marked relevant packets.&lt;br /&gt;&lt;br /&gt;My first thought was that the slave lost sync as well, but when the master switches from 38.75 msec connection intervals to the new 397.5 msec timing, the slave responds one last time.&lt;/p&gt;
&lt;p&gt;Here is some additional information.&amp;nbsp; The connection is always lost immediately after the connection interval change which happens 30 seconds after connecting.&amp;nbsp; So I changed the&amp;nbsp;FIRST_CONN_PARAMS_UPDATE_DELAY to 60 seconds to verify that it was related to the parameter change.&amp;nbsp; Now it disconnects (but still just from the Android 6 master, not others) after 37 seconds consistently, long before the parameter update would have happened.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve attached a 2nd pcap file with the conn_params update delayed until 60 seconds after connect.&amp;nbsp; The connection is at line 92, 6.85 seconds.&amp;nbsp; After the GATT scan the connection just idles and then the slave stops responding and disconnects at line 2034, 44.33 seconds, or about 37.5 seconds after connection.&amp;nbsp; So this leads me to believe that the disconnection right after the 30 second update was just a coincidence and that something else is going on here.&amp;nbsp; Does it makes sense that the Android tablet&amp;#39;s clock might be so far off that the timing of the two sides drifts apart quickly enough to get out of sync that fast?&amp;nbsp; Doesn&amp;#39;t the timing get resynced with each communication somehow?&amp;nbsp; (Unfortunately, I don&amp;#39;t have any other Android tablets handy to test that theory.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/LS-drop-connection-with-Android-6-tablet-with-NO-Interval-change.pcapng"&gt;devzone.nordicsemi.com/.../LS-drop-connection-with-Android-6-tablet-with-NO-Interval-change.pcapng&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Finally, just to be sure it wasn&amp;#39;t an issue with the RTC crystal or something on the Nordic board, I tried another one and got the same results, with the connection being dropped after 37 seconds.&amp;nbsp; (Our prototypes use our circuits on a daughterboard on top of the nRF52833 Dev Kit boards.)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LL_CONNECTION_UPDATE_IND before response to Connection Parameters Update Request causes disconnect</title><link>https://devzone.nordicsemi.com/thread/290972?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 10:11:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e003d1e8-941a-4efd-8456-e78ef413faed</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;Can you post the wireshark pcap file for the failed connection, you should be able to save the capture file and post it here. Additionally apply the profile that has been shipped with the nRF Sniffer so you will get a better view in wireshark. See section 2.3 &amp;quot;Add a Wireshark profile to nRF Sniffer&amp;quot; in the &lt;a href="https://infocenter.nordicsemi.com/pdf/nRF_Sniffer_BLE_UG_v3.2.pdf"&gt;nRF Sniffer v3.2 User guide&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It looks as if the slave radio stopped or lost the sync with the master at the instant the connection parameters were updated. It does not appear to be a normal Disconnect.&lt;/p&gt;
&lt;p&gt;Please post the pcap file and it will be easier to help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>