<?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>How to set BLE min and max connection interval to avoid ATT Timeout error ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69437/how-to-set-ble-min-and-max-connection-interval-to-avoid-att-timeout-error</link><description>I did the multilink central function when I used zephyr OS Connecting the five peripherals is stable at first, but after a while the error of &amp;lt;err&amp;gt; bt_att: ATT Timeout will appear Since Zephyr only provides one-to-one examples, there is no clear way of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Dec 2020 20:07:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69437/how-to-set-ble-min-and-max-connection-interval-to-avoid-att-timeout-error" /><item><title>RE: How to set BLE min and max connection interval to avoid ATT Timeout error ?</title><link>https://devzone.nordicsemi.com/thread/285456?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 20:07:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d159dd6d-ed65-474c-b03f-2e57aeaaee36</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="hmw"]You mean I can download the code of the sniffer from this web :&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE/Download#infotabs"&gt; the nRF Sniffer tool&lt;/a&gt;[/quote]
&lt;p&gt;Correct, you can download the firmware and guide to use the sniffer tool at that link.&lt;/p&gt;
[quote user="hmw"]So can this allow my nrf52840dk to track the communication status of one central to multiple peripherals?[/quote]
&lt;p&gt;No, the sniffer may only follow into a single connection at the time. But, it seems that your issue happens every time the 5th device is connected, is it not so?&lt;br /&gt;In that case, it would be good to capture a sniffer trace of the communication happening between the 5th device and the central.&lt;/p&gt;
[quote user="hmw"]I will try it&amp;nbsp;[/quote]
&lt;p&gt;Great, I look forward to hearing the results of your test!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set BLE min and max connection interval to avoid ATT Timeout error ?</title><link>https://devzone.nordicsemi.com/thread/285369?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 14:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f455a6c-ed32-4448-9873-f431302632dd</guid><dc:creator>hmw</dc:creator><description>&lt;p&gt;You mean I can download the code of the sniffer from this web :&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE/Download#infotabs"&gt; the nRF Sniffer tool&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So can this allow my nrf52840dk to track the communication status of one central to multiple peripherals?&lt;/p&gt;
&lt;p&gt;I will try it&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Poyi&lt;/p&gt;
&lt;div style="left:-22px;position:absolute;top:6px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set BLE min and max connection interval to avoid ATT Timeout error ?</title><link>https://devzone.nordicsemi.com/thread/285362?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 14:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:507cf096-845c-40b0-a9a4-da221e8f85b1</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Poyi,&lt;/p&gt;
[quote user="hmw"]So I will target one central to 15 peripherals on Zephyr[/quote]
&lt;p&gt;Great!&lt;/p&gt;
[quote user="hmw"]It feels more like my att request did not receive a reply within the specified time&lt;br /&gt;Is there any way to pass this situation to avoid my central being stuck in this timeout error[/quote]
&lt;p&gt;Are you familiar with &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;the nRF Sniffer tool&lt;/a&gt;?&lt;br /&gt;If you could share with me a sniffer trace of the on-air communication when this happens, that would be very helpful.&lt;br /&gt;If you are not familiar with the sniffer tool already I highly recommend that you do so now, since it is one of the most powerful tools to wield when working with BLE development.&lt;br /&gt;&lt;br /&gt;In the sniffer trace we will be able to see exactly what is happening with the 5th device.&lt;br /&gt;Please make sure to select the 5th device in the device-dropdown-menu before entering into the connection with the central, in order to have the sniffer follow into the connection and see what is happening.&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8420.wiresharkSourceDevice.PNG" /&gt;&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set BLE min and max connection interval to avoid ATT Timeout error ?</title><link>https://devzone.nordicsemi.com/thread/284940?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2020 07:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27577706-b7c4-42c9-9184-c9926879275d</guid><dc:creator>hmw</dc:creator><description>&lt;p&gt;Thanks for your reply&lt;br /&gt;So I will target one central to 15 peripherals on Zephyr&lt;br /&gt;I set these settings in prj.conf&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_BT_DEBUG_ATT=y
CONFIG_ASSERT=y&lt;/pre&gt;&lt;br /&gt;After connecting 5 more devices, the following picture will appear&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1608018482358v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It feels more like my att request did not receive a reply within the specified time&lt;br /&gt;Is there any way to pass this situation to avoid my central being stuck in this timeout error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Poyi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set BLE min and max connection interval to avoid ATT Timeout error ?</title><link>https://devzone.nordicsemi.com/thread/284839?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 15:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:718342dd-8e58-4e54-9b65-740e0961d97b</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Poyi,&lt;/p&gt;
[quote user=""]If my goal is to connect 30 peripherals[/quote]
&lt;p&gt;Please be advised that our SoftDevices only support up to 20 connects, as per their specification. You can read more about this in the &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/s140.html"&gt;S140 specification&lt;/a&gt;, for example.&lt;/p&gt;
[quote user=""]I know the formula that is&lt;br /&gt;&lt;strong&gt;Supervision Timeout &amp;gt; (1 +slaveLatency)* (connectionInterval)&lt;/strong&gt;&lt;br /&gt;But I don’t know what the value of &lt;strong&gt;connectionInterval&lt;/strong&gt; is&lt;br /&gt;Is connectionInterval = MAX_CONNECTION_INTERVAL - MIN_CONNECTION_INTERVAL?&lt;br /&gt;Is there any formula basis for setting connection parameters?[/quote]
&lt;p&gt;The acceptable connection interval for a device is specified as a range, to allow some leeway in choosing the interval.&lt;br /&gt;The actually used connection interval is always determined by the Central, but the peripheral device may have a certain preference ( given as a range between connection interval MIN and MAX ) and if this preference is not met then the peripheral device may be programmed to disconnect from the central. The peripheral may also stay connected to a central with a connection interval outside of what is specified, but then you will have to account for all possible intervals in your peripheral&amp;#39;s program.&lt;br /&gt;&lt;br /&gt;If you would like to force a certain interval, you may set MIN = MAX. This will leave no leeway for negotiations, and thus the connections interval will either be the specified number, or the connection will be broken.&lt;/p&gt;
[quote user=""]In addition, why setting the connection parameter affects the speed of the ATT Timeout error occur?[/quote]
&lt;p&gt;Timeout happens when the connection events are not met by the peer device for a specified duration. This duration should be long enough to allow for unexpected packet loss or corruption in addition to the expected slave latency and interval ( as per the formula you shared ).&lt;br /&gt;Are you seeing the Timeouts reported on your central side? If so, is there any reason to suspect that few of the packets makes it all the way to the central each connection interval? Factors that play into this is packet length, line of sight, interference from environment, etc.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>