<?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>Sniff UART traffic while shell is enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113314/sniff-uart-traffic-while-shell-is-enabled</link><description>Hi, 
 
 I am hoping to send/receive binary data (a protocol) on the same UART that has logging/shell enabled. Is there a way to access the UART RX traffic that the shell gets? I would like to pass it on to a function of my own for processing.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Aug 2024 07:51:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113314/sniff-uart-traffic-while-shell-is-enabled" /><item><title>RE: Sniff UART traffic while shell is enabled</title><link>https://devzone.nordicsemi.com/thread/497276?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2024 07:51:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e92114ef-8ba9-4247-a38b-e8f78b35f247</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;have you tried enabling it in the echo bot that has the callback?&lt;/p&gt;
&lt;p&gt;do you get any issues with that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sniff UART traffic while shell is enabled</title><link>https://devzone.nordicsemi.com/thread/495887?ContentTypeID=1</link><pubDate>Sat, 27 Jul 2024 19:58:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a948675-8e1f-4cb8-ac77-63bc62ad0293</guid><dc:creator>Terence Kim</dc:creator><description>&lt;p&gt;Yes, that&amp;#39;s what I&amp;#39;m looking for. However, when the shell is enabled (CONFIG_SHELL=y), I&amp;#39;m not sure where this serial_callback is. Can someone point me in the right direction?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sniff UART traffic while shell is enabled</title><link>https://devzone.nordicsemi.com/thread/495843?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 15:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f57975eb-1774-4d78-8fbf-d52540b80880</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;In the echo bot for example, the &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/36940db938a8f4a1e919496793ed439850a221c2/samples/drivers/uart/echo_bot/src/main.c#L64"&gt;print_uart&lt;/a&gt; function is kind of custom implementation you are looking for, ain&amp;#39;t it?&lt;/p&gt;
&lt;p&gt;In the serial callback, the received data is put in uart message queue and then processed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sniff UART traffic while shell is enabled</title><link>https://devzone.nordicsemi.com/thread/495515?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 21:48:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac2e417f-bd93-4272-a13a-b99ae76bfcba</guid><dc:creator>Terence Kim</dc:creator><description>&lt;p&gt;Thank you. Basically, I want to do something like the following:&lt;/p&gt;
&lt;pre&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void uart_rx(uint8_t *data, uint16_t length)
{
  // In the Shell UART example, the shell is already churning over incoming bytes
  shell_rx_processing(data, length);

  // I want my own custom protocol engine to churn over the same incoming bytes
  // in parallel to the shell&amp;#39;s processing
  my_custom_protocol_rx_processing(data, length);
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Could you point me to where in the code I would need to add this additional processing?&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sniff UART traffic while shell is enabled</title><link>https://devzone.nordicsemi.com/thread/495386?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 10:13:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03b174c0-5732-4bf8-8be6-5456c127d607</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Terence,&lt;/p&gt;
&lt;p&gt;I am not sure what you want to do and what is the use case, and also if I fully understand the requirements/needs.&lt;/p&gt;
&lt;p&gt;Nonetheless:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-4-serial-communication-uart/topic/exercise-1-5/"&gt;UART Exercise&lt;/a&gt; talks about accessing the uart tx and rx buffers.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/samples/drivers/uart/echo_bot/README.html"&gt;UART Echo&lt;/a&gt;&amp;nbsp;sample demonstrates how to use the UART serial driver. It reads data from the console and echos back.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/samples/drivers/uart/passthrough/README.html"&gt;UART Passthrough&lt;/a&gt; sample virtually connects two UART instances. It reads data from console and transmits to the other interface.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/apidoc/latest/shell__uart_8h.html"&gt;Shell UART&lt;/a&gt; API might also be of interest to you&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;/br,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>