<?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>nRF52840 device ERROR 12290 when device out of range</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73860/nrf52840-device-error-12290-when-device-out-of-range</link><description>Hi, 
 for my system implementation with nRF52840, I use the Nordic Uart Service based on the nrf_ble_uart example. 
 I transfer sensor data every 10msec, or so, to BLE uart app of my smartphone and I want to reconnect 
 to the peripheral (nRF52840) after</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Apr 2021 07:25:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73860/nrf52840-device-error-12290-when-device-out-of-range" /><item><title>RE: nRF52840 device ERROR 12290 when device out of range</title><link>https://devzone.nordicsemi.com/thread/304712?ContentTypeID=1</link><pubDate>Wed, 14 Apr 2021 07:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dcb679b-3cce-4e53-b8d6-25b7ed217d0a</guid><dc:creator>masterLee</dc:creator><description>&lt;p&gt;Hi Amanda, &lt;/p&gt;
&lt;p&gt;I will try your suggestion. By the way, in case someone finds it helpful I found an other &amp;quot;solution&amp;quot; with this issue.&lt;/p&gt;
&lt;p&gt;Before I transmit a new packet I read the rssi value and if it is for example &amp;lt; -95 dBm I don&amp;#39;t&amp;nbsp; transmit to the central.&lt;/p&gt;
&lt;p&gt;So, no data are sent when the connection signal strength is very weak (and probably about to be lost). I know that this solution is not the best because it limits the range of transmission but it works for now.&lt;/p&gt;
&lt;p&gt;Thank you for your time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 device ERROR 12290 when device out of range</title><link>https://devzone.nordicsemi.com/thread/304533?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 12:32:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41b68039-0f76-4a1c-ac38-32d9dc257feb</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Kostoulas,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ERROR 12290 is 0x3002 in hex, which corresponds to&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group__ble__err.html#gabdc27cbc2ffac4a50640a0ce992c03af"&gt;BLE_ERROR_INVALID_CONN_HANDLE&lt;/a&gt;&lt;span&gt;. It seems that you&lt;/span&gt;&amp;nbsp;got into the function that tries to send the data before the disconnect happened and invalidated the connection handle with a faster sample rate, while with a slow sample rate you have not yet seen the issue as it is less likely to happen.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should anyway handle the error in a better way than passing it to the error handler, i.e.,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(err_code != BLE_ERROR_INVALID_CONN_HANDLE)
{
  APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>