<?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 disable disconnection of Peripheral device from the central?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23222/how-to-disable-disconnection-of-peripheral-device-from-the-central</link><description>I am using ble_app_uart in one nRF52 EVK board(peripheral) and ble_app_uart_c in another nRF52 EVK(central) and sending data of Device under test through UART. When the data is more( continuous stream of data) the peripheral is getting disconnected from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jul 2017 09:06:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23222/how-to-disable-disconnection-of-peripheral-device-from-the-central" /><item><title>RE: How to disable disconnection of Peripheral device from the central?</title><link>https://devzone.nordicsemi.com/thread/91348?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 09:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b02616a-a631-4b6a-9218-a2d2689cd7ea</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What is happening is that you are most likely running out of available buffers, as described in the answer in your previous question &lt;a href="https://devzone.nordicsemi.com/question/154847/introducing-fifo-buffer-in-uart_data_handler-function/"&gt;here&lt;/a&gt;. You then get an error code when you are trying to send the data. This error code is passed into the error-handler (&lt;code&gt;APP_ERROR_CHECK(err_code)&lt;/code&gt;), where the default behavior is to do a reset. You will then disconnect. If you want to just ignore this error-message, and discard the data, you should not check for that particular error-message.&lt;/p&gt;
&lt;p&gt;Assuming that it&amp;#39;s the &lt;code&gt;ble_nus_string_send()&lt;/code&gt; function that is generating this error, and that you are using SDK 13, you could ignore the error-code like this by adding a check for &lt;code&gt;NRF_ERROR_RESOURCES&lt;/code&gt; :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = ble_nus_string_send(&amp;amp;m_nus, data_array, index);
if ((err_code != NRF_ERROR_INVALID_STATE) || (err_code != NRF_ERROR_RESOURCES))
{
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note: If you are using SDK 12, check for &lt;code&gt;BLE_ERROR_NO_TX_PACKETS&lt;/code&gt; instead of &lt;code&gt;NRF_ERROR_RESOURCES&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>