<?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>BLE APP UART central using NRF52840 eval kit and Fanstel BWG840 gateway gets disconnected using a 0x8 error code while trying to receive data from a peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76235/ble-app-uart-central-using-nrf52840-eval-kit-and-fanstel-bwg840-gateway-gets-disconnected-using-a-0x8-error-code-while-trying-to-receive-data-from-a-peripheral</link><description>NRF52840 eval kit is configured as ble_app_uart_central and for peripheral, we are using movesense sensor which is running our firmware. The central and peripheral get connected without issues. When I send commands for streaming data from the peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Jun 2021 14:40:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76235/ble-app-uart-central-using-nrf52840-eval-kit-and-fanstel-bwg840-gateway-gets-disconnected-using-a-0x8-error-code-while-trying-to-receive-data-from-a-peripheral" /><item><title>RE: BLE APP UART central using NRF52840 eval kit and Fanstel BWG840 gateway gets disconnected using a 0x8 error code while trying to receive data from a peripheral</title><link>https://devzone.nordicsemi.com/thread/315932?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2021 14:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bda33213-cf9a-4d88-9d57-29da3b7b509a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;That&amp;#39;s great news, I will consider the case closed then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE APP UART central using NRF52840 eval kit and Fanstel BWG840 gateway gets disconnected using a 0x8 error code while trying to receive data from a peripheral</title><link>https://devzone.nordicsemi.com/thread/315100?ContentTypeID=1</link><pubDate>Mon, 14 Jun 2021 11:31:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5139afc8-dca7-400e-a6b9-602662bf9829</guid><dc:creator>annamol</dc:creator><description>&lt;p&gt;Thanks for the support.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Found the issue. It was a minor mistake on my central side code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;switch (p_event-&amp;gt;evt_type)&lt;br /&gt; {&lt;br /&gt; /**@snippet [Handling data from UART] */&lt;br /&gt; case APP_UART_DATA_READY:&lt;br /&gt; UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index]));&lt;br /&gt; index++;&lt;/p&gt;
&lt;p&gt;if ((data_array[index - 1] == &amp;#39;\n&amp;#39;) ||&lt;br /&gt; (data_array[index - 1] == &amp;#39;\r&amp;#39;) ||&lt;br /&gt; (index &amp;gt;= (m_ble_nus_max_data_len)))&lt;br /&gt; {&lt;br /&gt; NRF_LOG_DEBUG(&amp;quot;Ready to send data over BLE NUS&amp;quot;);&lt;br /&gt; NRF_LOG_HEXDUMP_DEBUG(data_array, index);&lt;/p&gt;
&lt;p&gt;do&lt;br /&gt; {&lt;br /&gt; ret_val = ble_nus_c_string_send(&amp;amp;m_ble_nus_c, data_array, (index));&lt;br /&gt; if ( (ret_val != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp; (ret_val != NRF_ERROR_RESOURCES) )&lt;br /&gt; {&lt;br /&gt; APP_ERROR_CHECK(ret_val);&lt;br /&gt; }&lt;br /&gt; } while (ret_val == NRF_ERROR_RESOURCES);&lt;/p&gt;
&lt;p&gt;index = 0;&lt;br /&gt; }&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;While playing around with code, I was sending data of size( index-1 ) instead of index.&lt;/p&gt;
&lt;p&gt;With index-1&amp;nbsp;disconnection is present&amp;nbsp;and with size set as index there is no problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE APP UART central using NRF52840 eval kit and Fanstel BWG840 gateway gets disconnected using a 0x8 error code while trying to receive data from a peripheral</title><link>https://devzone.nordicsemi.com/thread/314943?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 14:04:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a5042ef-4f62-4d45-b044-cf5e73ddd547</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you tried to debug the application on the peripheral side to see what happens when the command to stream data is received?&lt;/p&gt;
&lt;p&gt;Are you able to share the code that you use to stream the data?&lt;/p&gt;
&lt;p&gt;Have you tried to sniff the Bluetooth communication when the problem occurs, to see what happens over the air?&lt;br /&gt;As you may know we provide a Bluetooth sniffer that is free of charge as long as you have a Nordic development kit to run it:&lt;br /&gt;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>