<?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>NUS example UART RX can&amp;#39;t receive all data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115312/nus-example-uart-rx-can-t-receive-all-data</link><description>NCS v2.7.0 
 peripheral_uart (nRF52832-DK) 
 central_uart (nRF52840-DK) 
 
 PC console -&amp;gt; JLink VCOM -&amp;gt; BLE peripheral(nRF52832-DK) -&amp;gt; BLE central (nRF52840-DK) -&amp;gt; JLink VCOM -&amp;gt; PC console 
 1) send 240 bytes (repeat &amp;quot;0123456789&amp;quot; to form one 240 bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2024 07:46:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115312/nus-example-uart-rx-can-t-receive-all-data" /><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/509799?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 07:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6396ed0-4081-493c-8ba6-af2e7842f0ad</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Felix,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, I do not have that project anymore as we test a lot of stuff in the same sdk we have.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Central and peripheral UART using NUS has been tested and very mature samples on the DK.&amp;nbsp;Enable HWFC should not cause any such issues like you are seeing. Please enable HWFC in your overlay file like I mentioned in my comment &lt;a href="https://devzone.nordicsemi.com/support-private/support/334174#permalink=1010799"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/509218?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 10:33:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5d20791-db9d-48ca-9d10-fc797ec6e85e</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;1) I know the NUS samples UART default setting is 115200 bps.&lt;/p&gt;
&lt;p&gt;2) &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&amp;nbsp;say add hw-flow-control can fix my UART stress test issue, but I can not get the same success result, so I want to get the &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&amp;nbsp;&amp;#39;s&amp;nbsp;projects to compare with my owns and do this test on my own environment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/509210?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 10:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d61a2b4-5230-4631-a6de-8e874ad23406</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Any of the samples in the nRF Connect SDK uses 115200 bps by default, so you can refer to I.E. the Nordic UART service samples here&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/central_uart/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/central_uart/README.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/peripheral_uart/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/peripheral_uart/README.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/508748?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2024 07:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d2d966a-1182-43c8-a93f-c5f9b8ad2170</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;It seems our 115200 bps tests are different.&lt;/p&gt;
&lt;p&gt;Can you attach your two 115200 bps projects including BLE peripheral and central for me to test on my own environment? I will try your projects on my own and close this ticket.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/508632?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 09:33:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4803f9ba-9d27-40e4-8294-710e4d8c5f40</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;we use 115200bps all the time with larger data chunks and it works fine and the URAT on 52840 is very mature peripheral.&lt;/p&gt;
&lt;p&gt;I do not think this is an issue with the hardware. I tried to send chunk data in loop of 100 and it is working fine at my end, no garbled or missing data at my end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/508321?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 10:27:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:355c8a97-2548-478b-b785-228bce16c05a</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Using baudrate with 115200bps, Rx still lost data. I think the original UART flow can&amp;#39;t handle the stress test like this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/507954?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 13:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88799bea-1b0c-49b2-8bc8-f9e7760a26ac</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Can you lower the baudrate to 115200 and see if that works, to test if this is caused by some bottlenecks at those high speed. I think there are some bottlenecks either in the application of the in uart library or driver that show up at those high speeds you are using. At those high speeds, there is a need to consider the pre and post processing latencies per serial transactions.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/507843?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 03:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff3da97f-828f-4cd2-a05a-d7ba84934512</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Hi, thanks for your test.&lt;/p&gt;
&lt;p&gt;1)&amp;nbsp;To send just once mostly ok, but I need to send the bitmap file from peripheral to central about 2MB, so the usage is like the stress test.&lt;br /&gt;To send the 2MB from BLE peripheral to central in the maximum throughput, I use 100ms interval for test, although it is still too slow to transfer the 2MB bitmap file. I also use wireshark to sniffer the BLE packets and they are send without loss, the loss is in UART RX.&lt;/p&gt;
&lt;p&gt;2) For example, I send 21600 bytes, but RX receive 21580 bytes only from UART terminal.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1729826468003v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;3) I attached uart assist tool, if you want to use it for test.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/uartassist5.0.3.7z"&gt;devzone.nordicsemi.com/.../uartassist5.0.3.7z&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/507558?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2024 11:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b2dcfdf-0e39-4d01-a0b7-fa4628c8bb65</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Tested peripheral on nrf52832 and central on nrf52840 dk. Not sure how you are sending the bytes from central to peripheral but I tried to do it manually from terminal and the reception looked ok&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:48px;max-width:640px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1280x96/__key/communityserver-discussions-components-files/4/pastedimage1729681630101v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Did not see any missing bytes&lt;/p&gt;
&lt;p&gt;I did not use adruino in the overlap file but instead had this in app.overlay&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;1000000&amp;gt;;
	hw-flow-control;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/507042?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 05:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1400ab3-8576-4fe7-a359-521b1acde172</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Felix, I will try to test it later today with your project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/506612?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 06:44:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e3241e8-156a-438e-bebe-f45044228955</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;HWFC improves the loss for UART RX, but it still lost data sometimes, especially for transmitting longer time.&lt;/p&gt;
&lt;p&gt;It can&amp;#39;t guarantee the 100% data received.&lt;/p&gt;
&lt;p&gt;Can you try it?&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/506085?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2024 11:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91df8421-cfb3-415d-bf95-465aefeb6c7a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You can still enable HWFC on USB virtual COM port, this can be done using the serial emulator that you use. On Windows, I use TeraTerm and the configuration can look something like this&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728905992731v1.png" alt=" " /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/506062?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2024 10:26:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:129ae36e-e5a1-4400-ac38-317c43f8e7ad</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Can USB virtual COM port enable hardware flow control for UART? Or I need to use the real UART pins, not JLink VCOM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS example UART RX can't receive all data</title><link>https://devzone.nordicsemi.com/thread/505817?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2024 07:13:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a87fbb55-b86d-4ce1-877e-911167427aa9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You&amp;nbsp;did not seem to enable hardware flowcontrol (HWFC) enabled in the uart?&lt;/p&gt;
&lt;p&gt;It looks like one side of the uart connection is unable to handle the speed with which data comes in and there might be an overflow error in the hardware which is ignored.&lt;/p&gt;
&lt;p&gt;enable the hardware flow control by adding it in your .overlay file &amp;amp;uart0 node like&amp;nbsp; below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	hw-flow-control;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You need to do this for both central and peripheral and make sure that the pins are properly assigned for CTS and RTS pins for the UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>