<?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>nrf51822 random disconnection problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35957/nrf51822-random-disconnection-problem</link><description>Hi to all, 
 i am working on a project that in it i want use nrf51822 as a peripheral device. i implemented a code but i have a problem, central(cc2540) and peripheral(nrf51822) randomly disconnect sometime and i do not have any idea to why this problem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Jul 2018 13:33:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35957/nrf51822-random-disconnection-problem" /><item><title>RE: nrf51822 random disconnection problem</title><link>https://devzone.nordicsemi.com/thread/140071?ContentTypeID=1</link><pubDate>Fri, 13 Jul 2018 13:33:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:933b93cd-5797-4903-90a8-04d6e7c069b9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Alireza,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth is on vacation so I will take over the case. From your trace, it looked like the central (CC2540) didn&amp;#39;t receive the packets from the peripheral after the ATT_ERROR_RESPONSE. I suspect there could be an assert on the central, causing the stack to crash or unable to process more packet, as it kept sending pacets with NESN = 0 , SN = 0 until a timeout.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may need to check the TI chip&amp;#39;s code, maybe do some debug or get some more logging from the device.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 random disconnection problem</title><link>https://devzone.nordicsemi.com/thread/139303?ContentTypeID=1</link><pubDate>Fri, 06 Jul 2018 16:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c55334ab-9caa-475a-825e-f278ac2b47ee</guid><dc:creator>alireza sadeghpour</dc:creator><description>&lt;p&gt;thanks&amp;nbsp;for your response, i disabled the encryption to see the packets in the cc2540 based sniffer, see the below screen shot:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/time_5F00_out.png" /&gt;&lt;/p&gt;
&lt;p&gt;as you can see in the above picture the slave(nrf51822 as peripheral) try to send some thing on the notification char, but the master(cc2540 as central) did not ack the packets and this loop continue for 9sec (configured supervision timeout) and after that both central and peripheral report a disconnection event. the reason could not be signal power and crc check problem because after&amp;nbsp;that disconnection happen peripheral start to advertise and then tow device reconnect to each other.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i do not have any idea about this disconnection reason, may be it was because timing problem. can you give me a advice to solve this timeout problem??&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i also attached the ble dump between central and peripheral(you can open it with ti sniffer app)&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Decrypted_5F00_1.psd"&gt;devzone.nordicsemi.com/.../Decrypted_5F00_1.psd&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for your response&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 random disconnection problem</title><link>https://devzone.nordicsemi.com/thread/138555?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 14:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:232dbacd-41ba-495c-84f2-c1bfbd20f05f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Typically you should be able to define DEBUG in your project, and you may be able to set a breakpoint in the assert handler to find if there is any assert. Have you checked if that occurs here?&lt;/p&gt;
&lt;p&gt;What is the disconnect reason? Typically you can find that by checking&amp;nbsp;p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason on&amp;nbsp;BLE_GAP_EVT_DISCONNECTED (see ble_hci.h for various codes).&lt;/p&gt;
&lt;p&gt;1. You may try to increase&amp;nbsp;xtal_accuracy to 250ppm in case there is a timing issue on the central side.&lt;/p&gt;
&lt;p&gt;2. Using NULL should not be a problem.&lt;/p&gt;
&lt;p&gt;3. The softdevice does not use heap to allocate memory, I don&amp;#39;t think this is the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>