<?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>Data loss while sending data over UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51636/data-loss-while-sending-data-over-uart</link><description>I am using nRF52832 with SDK 15.2.0 for my application. The application is created taking ble_app_uart example as the base. I have modified the example to suit my requirements. The application uses only one characteristics for sending and receiving data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Sep 2019 08:37:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51636/data-loss-while-sending-data-over-uart" /><item><title>RE: Data loss while sending data over UART</title><link>https://devzone.nordicsemi.com/thread/208603?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 08:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aac25bbc-e852-4755-827e-0476f8c32d8c</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If the UART buffers fill up you don&amp;#39;t really have any other options than to buffer the data externally, and wait for the UART buffers to clear before you can send more.&amp;nbsp;&lt;/p&gt;
[quote user="Bhushan P"]This is a slower method but works for me right now.[/quote]
&lt;p&gt;In what way is it slower? Are you not able to maximize the UART throughput?&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><item><title>RE: Data loss while sending data over UART</title><link>https://devzone.nordicsemi.com/thread/208515?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 15:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5405f1b-ffb3-423e-9df8-08b80222debe</guid><dc:creator>Bhushan P</dc:creator><description>&lt;p&gt;I am now storing the data received over BLE into a buffer and then transmitting it over UART.&lt;/p&gt;
&lt;p&gt;My application receives data in fixed data size. The peer waits for an acknowledgement before sending the next set of data. I am using this to add delay by sending the acknowledgement after first set of data has been transmitted over UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a slower method but works for me right now.&lt;/p&gt;
&lt;p&gt;Is there a better or faster way to ensure data is sent successfully over UART?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data loss while sending data over UART</title><link>https://devzone.nordicsemi.com/thread/208395?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 07:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a218751-d892-4a0c-b027-532e5c4e1ce3</guid><dc:creator>Bhushan P</dc:creator><description>&lt;p&gt;Thanks for the response.&lt;/p&gt;
&lt;p&gt;At 9600 baud rate, it will take around ~17 msec to send 20 bytes over UART, which is as you have pointed out is much slower than the BLE link.&lt;/p&gt;
&lt;p&gt;While transmitting data over UART it is first stored in a FIFO before it is sent out, so I assumed that the mismatch in data rate between UART and BLE link would be taken care of.&lt;/p&gt;
&lt;p&gt;Any suggestions on how to delay the BLE link would be helpful&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards,&lt;/p&gt;
&lt;p&gt;Bhushan P&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data loss while sending data over UART</title><link>https://devzone.nordicsemi.com/thread/207379?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 11:43:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:922473bc-56f5-453b-946e-c07db313e7d1</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you calculated the approximate throughput of the data&amp;nbsp;being sent to the device to make sure that you are not sending data quicker than the UART can handle?&lt;/p&gt;
&lt;p&gt;At 9600 bps the UART will be much slower than the BLE link, even when sending only 20 byte payloads. When sending notifications the BLE stack can buffer multiple payloads, and send them quickly back-to-back on a single connection event, increasing the throughput beyond one packet per connection event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ideally you need to be able to delay the data transmission over BLE once the UART buffers start filling up, to make sure that you are not overflowing the UART.&amp;nbsp;&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>