<?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>Timeout disconnection during sending  a large amount of data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30837/timeout-disconnection-during-sending-a-large-amount-of-data</link><description>Our Nrf51822 will disconnect the connection with timeout reason when it is sending a large amount of data (about 20-70 KB) to our central device which is TI cc2540 . This disconnection problem occurs occasionally and it is really fatal for our system</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Feb 2018 08:58:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30837/timeout-disconnection-during-sending-a-large-amount-of-data" /><item><title>RE: Timeout disconnection during sending  a large amount of data</title><link>https://devzone.nordicsemi.com/thread/122236?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 08:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98fcdabe-7b96-40e9-a0f1-152f06fccb1f</guid><dc:creator>Rune Holmgren</dc:creator><description>[quote user=""]Our Nrf51822 will disconnect the connection&amp;nbsp;with timeout reason when it is sending a large amount of data (about 20-70 KB) to our central device which is &lt;strong&gt;TI cc2540&lt;/strong&gt;. This disconnection problem occurs occasionally and it is really fatal for our system. How can we avoid this?[/quote]
&lt;p&gt;I recommend running a sniffer like the &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF-Sniffer/nRF-Sniffer-v2/65225"&gt;nRF&amp;nbsp;Sniffer 2 beta&lt;/a&gt;&amp;nbsp;or a dedicated hardware sniffer to get a log showing what happens when the link breaks down. Most likely one of the devices can&amp;#39;t handle the sending or receiving of the data at the rate you are doing it. A sniffer log will let you know which device to debug. Another alternative is to add some logging or debugging with breakpoints in fault handlers to see which device and when the connection is broken.&lt;/p&gt;
&lt;p&gt;As I understand the issue only happens occasionally, so you are most likely not far away from a stable system. If you can figure out what operations are getting queued too fast to handle you may be able to increase the size of the buffers used in the queueing. If the issue is that data is just sent/received too fast you need to actually reduce the speed at which you are transmitting or find ways to perform the operations faster.&amp;nbsp;&lt;/p&gt;
[quote user=""]Another problem is in this case, the&amp;nbsp;&lt;strong&gt;TI cc2540&amp;nbsp;&lt;/strong&gt;will be aware of disconnection after 1 minute. I don&amp;#39;t know why?&amp;nbsp;Actually, this time is ~&amp;nbsp;10 seconds when I removed the battery from &lt;strong&gt;Nrf51822.&amp;nbsp;I&lt;/strong&gt;&amp;nbsp;mean I see two different values of timeout (~10s and 60s) on&amp;nbsp;&lt;strong&gt;TI cc2540&lt;/strong&gt;&amp;nbsp;while in both cases the reason of disconnection is &amp;#39;Timeout&amp;#39;?[/quote]
&lt;p&gt;We do not have enough experienced with the TI cc series to give you much help specific to that device. I find it strange that the disconnect is so delayed so long and that you see two different timeouts. With the supervisor timeout set to 1000ms, the connection is to be considered broken after 1000ms and the devices should start scanning/advertising.&lt;/p&gt;
[quote user=""]Here are the connection parameters I have on Nrf51822.[/quote]
&lt;p&gt;These look fine for a high throughput system. Be aware that setting the min and max interval to the same number you may get into trouble if you want to connect it to something else in the future which for some reason doesn&amp;#39;t like 25ms.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Rune Holmgren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>