<?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 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77575/nrf52840-interactive-command-uart-flushing</link><description>sdk17.0.2 
 
 so i am trying to flush rx/tx while the command execute 
 
 cannot find 
 app_fifo_flush() or 
 app_uart_flush() anyone know how to do it?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Sep 2021 11:51:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77575/nrf52840-interactive-command-uart-flushing" /><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/328378?ContentTypeID=1</link><pubDate>Tue, 07 Sep 2021 11:51:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3a6bc2a-4bf0-49de-921a-3bc84ac225f8</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the update. Do you mean to say you have gotten around this issue in another way?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If so I&amp;nbsp;can close this issue.&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><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/328279?ContentTypeID=1</link><pubDate>Tue, 07 Sep 2021 01:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70fcc532-b3ae-43b3-9840-b3f1d14d2863</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;thx&amp;nbsp; for the reply but even we do have the flow control the bug still happened.&lt;/p&gt;
&lt;p&gt;we do add uarte in it but sadly we did not fix the problem&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;however we find other path to fix the bug&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/328243?ContentTypeID=1</link><pubDate>Mon, 06 Sep 2021 14:14:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89464a67-7dd6-4bca-9266-00f23fbde59e</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;The reason for artifacts in the UART CLI is that it doesn&amp;#39;t use flow control so if you paste multple bytes some will get lost as receiver is being stopped and restarted after each byte. There are 2 options:&lt;/p&gt;
&lt;p&gt;- enable flow control&lt;/p&gt;
&lt;p&gt;- use different transport, namely UART which is using libuarte driver. Libuarte is a driver which allows continues reception on UART, receiver is never stopped and DMA buffers are seamlessly changed. For setting up libuarte transport see this example &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/cli_libuarte_example.html?cp=8_1_4_6_8"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/cli_libuarte_example.html?cp=8_1_4_6_8&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/322640?ContentTypeID=1</link><pubDate>Fri, 30 Jul 2021 10:49:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c09b481-74c3-410f-93a5-2fed1a4a2851</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will discuss the case with the CLI developer when he is back next week, and ask for some advice on how to proceed with this case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should mention this issue to your local Nordic sales representative also, and he can help give this case priority.&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><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/322332?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 02:01:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43887476-372e-430b-856c-5d79a3556b62</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;yea, after communicate with our project manager&amp;nbsp; they think that &lt;span&gt;using the ble_app_interactive example is the only option&amp;quot; , so what should I do next&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/322140?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 07:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f87cca2-2582-4433-97b5-99252ebc9ff7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I would strongly recommend considering another example if you are going to use this for a product.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For instance, you can either&amp;nbsp;run a standard Bluetooth HCI example on the nRF device, and run a standard Bluetooth host such as BlueZ on the Unix side. Then you will interface to the Bluetooth devices in a way that is common for other Unix applications.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively, you can develop a custom application for the nRF device that controls the N devices, and provides an application specific interface between the nRF and the Unix host.&amp;nbsp;&lt;br /&gt;The advantage of this method is that you can implement a more efficient, application specific command set between the nRF and the Unix host, but the drawback is that you need to do more application development on the nRF side. If you use the HCI example on the nRF you don&amp;#39;t really have to do much development at all.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you&amp;nbsp;think that using the ble_app_interactive example is the only option I can register an internal ticket to get help from the software team to improve the example, but I can not guarantee that this will be prioritized.&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><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321948?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 06:56:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6db7a832-3727-46b8-86f8-a072a08faad0</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;unfortunately I am using it as a product on a unix system base&lt;/p&gt;
&lt;p&gt;for this app Im trying to use this cli command to control N devices in ble&amp;nbsp;&lt;/p&gt;
&lt;p&gt;find out it might be a bug in it can you guys tell me how to fix it&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;actually we really need the cli command to control all of this&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I mean even I change the size of&lt;/p&gt;
&lt;p&gt;NRF_CLI_CMD_BUFF_SIZE&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the bug still happened&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321943?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 06:47:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31054a23-97e2-4bcf-b2fa-b90ed738648c</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you give me a bit more details on what you want to use this example for?&lt;/p&gt;
&lt;p&gt;This example is not designed to be used in a product.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is also in the experimental folder, which means we have only done limited testing on it.&amp;nbsp;&lt;br /&gt;Possibly there are other examples that are more suitable for what you are trying to accomplish.&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><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321696?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 06:41:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3879339-b288-40c7-9cd1-12d7c7de0719</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;yep First I use &amp;quot;putty&amp;quot; then I use &amp;quot;mobaXterm&amp;quot; Same problem still happened&lt;/p&gt;
&lt;p&gt;now I use &amp;quot;sscom&amp;quot; still the same thing happened&lt;/p&gt;
&lt;p&gt;I have tried three different terminal already&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I wonder if there is a way to clean up the RX/Tx or flow control at least&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;btw also I found out that if I send the message too fast the entire app will crash&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;If I press &amp;quot;tab&amp;quot; it will show all the commands which I can use&lt;/p&gt;
&lt;p&gt;but as if I hold the tab and &amp;nbsp;not release the &amp;quot;tab&amp;quot; button&lt;/p&gt;
&lt;p&gt;the uart will keep printing the commands which I can use&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;after n time printing the program will crash&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is this a bug??&lt;/p&gt;
&lt;p&gt;&lt;span&gt;or if there is a way to clean up the RX/Tx or flow control at least&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321695?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 06:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52a9e442-4904-4215-8c91-7614e8f39ac7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just had a quick chat with the developer of the interactive example. Apparently there is no way to flush the buffers in this example because the UART functions are blocking.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Whenever there is something to send the&amp;nbsp;&lt;strong&gt;nrf_cli_process() &lt;/strong&gt;function will run until the entire message is written to the UART, so you don&amp;#39;t need to separately flush the buffers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which terminal program are you using?&lt;/p&gt;
&lt;p&gt;Have you tried with another one to see if the issue is the same?&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: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321479?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 07:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cde7879-1c03-463b-9842-b8af3c94958a</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;you&amp;nbsp; mean I cannot clear the&amp;nbsp; uart_rx tx&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I mean I found a bug happened it randomly&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for example sometimes when I type on the keyboard &amp;quot;connect AF:BF:CF:DF:EF:FF&amp;quot; but when I type to con or connect when I press the next character it with output random character on the uart so I wonder why is this happening(Seldom happen)&lt;/p&gt;
&lt;p&gt;another thing is if I just copy-paste&amp;nbsp;&lt;span&gt;&amp;quot;connect AF:BF:CF:DF:EF:FF&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;sometimes&amp;nbsp; the output show up on uart wrong&amp;nbsp;&lt;/p&gt;
&lt;p&gt;it shows &lt;span&gt;&amp;quot;connect??? AF:???BF:C???F:DF:EF:FF&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I am 100% sure I copy the correct string&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for example&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[15:06:31.505]OUT↙⊙connect 5C:F3:70:38:AE:36 

↓
[15:06:31.508]IN↘↑connect 5C:F3:70connect 5C:F3:70:38:Act 5CE6 
&#x1B;[1;31mwrong parameter count 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;you can see the uart shows wrong what I copy on the uart&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I copy it correctly but the Uart shows wrong&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so I think if I can clean up the rx-tx in uart&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;or you know if there is any other problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321474?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 06:50:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2db43e5-0bdc-44f6-a870-9de70f3071d9</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think there is any way to flush the UART buffers when using CLI.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there a particular reason you need to do this?&lt;br /&gt;Do you just need to know when the command is finished?&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: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321245?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 07:40:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ac62cb0-9101-4eb5-a44a-1f7a318d1971</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&lt;/p&gt;
&lt;h1 class="name"&gt;nrf52840 interactive command&lt;/h1&gt;
&lt;p&gt;I am using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;ble_app_interactive&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321240?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 07:29:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e22875ad-0e8c-4da1-8695-182f1ec5bc7b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which example are you using?&lt;/p&gt;
&lt;p&gt;If you open the ble_app_uart example for instance both app_uart.h and app_uart_fifo.c should already be added to the project.&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><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/321012?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 02:00:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f43d1d51-42db-487d-8f51-7afa43d8a184</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;hello&amp;nbsp; I am using standard sdk but still cannot find both of those&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;app_uart.h&lt;/em&gt;, &lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;app_uart_fifo.c in interactice command&amp;nbsp;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;div class="content"&gt;
&lt;h1&gt;sdk17.0.2&lt;/h1&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/320605?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 07:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fb5f896-3b5a-48f4-a5d4-159d9d290438</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using one of the standard SDK examples?&lt;/p&gt;
&lt;p&gt;There is an &lt;em&gt;app_uart_flush()&lt;/em&gt; function for flushing the buffers when using the app_uart driver, but it will not do anything unless you make sure to use the &lt;em&gt;app_uart_fifo.c&lt;/em&gt; implementation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you say you cannot find this function, do you mean that the build fails if you try to call it?&lt;/p&gt;
&lt;p&gt;The function is declared on line 244 of &lt;em&gt;app_uart.h&lt;/em&gt;, and implemented on line 186 of &lt;em&gt;app_uart_fifo.c&lt;/em&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><item><title>RE: nrf52840 interactive command  uart flushing</title><link>https://devzone.nordicsemi.com/thread/320583?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 01:56:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e37e36e4-96f8-4c3a-9e6c-974050a9ad17</guid><dc:creator>yu1998</dc:creator><description>&lt;p&gt;anyone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>