<?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>52842 acting as peripheral, connected to another 52840 acting as central both very closed to each other, transferring data, is disconnecting occasionally. What can be the reason?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40258/52842-acting-as-peripheral-connected-to-another-52840-acting-as-central-both-very-closed-to-each-other-transferring-data-is-disconnecting-occasionally-what-can-be-the-reason</link><description>Disconnection of the peripheral is done without enabling another connection, the only way is to reset the module. 
 It happens sometimes after 5 min up to 1-2 hours. 
 If there is an internal error due to data transfer, how can it recover without reset</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Nov 2018 16:09:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40258/52842-acting-as-peripheral-connected-to-another-52840-acting-as-central-both-very-closed-to-each-other-transferring-data-is-disconnecting-occasionally-what-can-be-the-reason" /><item><title>RE: 52842 acting as peripheral, connected to another 52840 acting as central both very closed to each other, transferring data, is disconnecting occasionally. What can be the reason?</title><link>https://devzone.nordicsemi.com/thread/156717?ContentTypeID=1</link><pubDate>Fri, 09 Nov 2018 16:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:711e1961-53e4-4b6f-898d-6442482a9640</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you print the disconnect reason?&lt;/p&gt;
&lt;p&gt;In ble_evt_handler, you could do something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
        case BLE_GAP_EVT_DISCONNECTED:

       

            NRF_LOG_INFO(&amp;quot;Disconnected reason: %d.&amp;quot;,p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also note that a reset indicates that you are running into the error handler, where the default behavior is to do a reset. You should then debug in order to find the reason for the reset. See this post about debugging: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you are using SES IDE, then make sure to use the Debug configuration and not the Release configuration.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>