<?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>How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102175/how-to-view-the-data-in-the-cli-interface</link><description>Hello, 
 we have a nRF52840DK (SDK 17). The nRF52840DK is communicating via CLI with our software on the pc. 
 We registered some CLI commands on the nRF52840DK. Unfortunately, it looks like that we have some errors in our the CLI communication, as not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Jul 2023 14:17:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102175/how-to-view-the-data-in-the-cli-interface" /><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438785?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2023 14:17:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38437eda-24f7-4efb-ac19-4b5a206a7dc9</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Instead of printing those, can you try to use debugging and create a breakpoint at the same place.&lt;br /&gt;Then add a watch to p_cli and inspect it to see if it have the data you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438759?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2023 13:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68945575-f397-4700-9b11-f458e740f898</guid><dc:creator>Michael111</dc:creator><description>&lt;p&gt;Hello Sigurd,&lt;/p&gt;
&lt;p&gt;I added the following logging:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/3364.Logging.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I added this part of code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    NRF_LOG_INFO(&amp;quot;p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff:&amp;quot;);
    NRF_LOG_INFO(p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff);
    NRF_LOG_INFO(&amp;quot;p_cli-&amp;gt;p_log_backend:&amp;quot;);
    NRF_LOG_INFO(p_cli-&amp;gt;p_log_backend);
    NRF_LOG_INFO(&amp;quot;p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:&amp;quot;);
    NRF_LOG_INFO(p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My debug terminal looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff:
&amp;lt;info&amp;gt; app: &#x12;&amp;quot;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_log_backend:
&amp;lt;info&amp;gt; app: &amp;#204;?&#x3;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: &amp;#190;&amp;#179;O&amp;#240;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff:
&amp;lt;info&amp;gt; app: &#x12;&amp;quot;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_log_backend:
&amp;lt;info&amp;gt; app: &amp;#204;?&#x3;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: &amp;#190;&amp;#179;O&amp;#240;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff:
&amp;lt;info&amp;gt; app: &#x12;&amp;quot;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_log_backend:
&amp;lt;info&amp;gt; app: &amp;#204;?&#x3;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: &amp;#190;&amp;#179;O&amp;#240;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff:
&amp;lt;info&amp;gt; app: &#x12;&amp;quot;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_log_backend:
&amp;lt;info&amp;gt; app: &amp;#204;?&#x3;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: &amp;#190;&amp;#179;O&amp;#240;
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&amp;lt;info&amp;gt; app: p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff:
&#x1B;[1;31mLogs dropped (1)&#x1B;[0m
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;There is no usable information for me.&lt;/p&gt;
&lt;p&gt;By implementing my logging like this, I will not be able to catch, if there is a command received, as there is so many data with no information to me.&lt;/p&gt;
&lt;p&gt;Can you suggest some positions to log only the communication with the received ascii characters from my pc?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438743?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2023 12:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00be183e-1041-47c4-aa01-b6fbb935d1fb</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Michael111"]But there is no useful information for me.[/quote]
&lt;p&gt;Does it log anything at all?&lt;br /&gt;If so, what does it log?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438450?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 08:36:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f87aa19-b1f1-44c1-b5f2-80ec70a07cd1</guid><dc:creator>Michael111</dc:creator><description>&lt;p&gt;Hello Sigurd,&lt;/p&gt;
&lt;p&gt;I tried to log something in the nrf_cli.c file in the nrf_cli_process(...) function:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_LOG_INFO(p_cli-&amp;gt;p_ctx-&amp;gt;cmd_buff);
NRF_LOG_INFO(p_cli-&amp;gt;p_log_backend);
NRF_LOG_INFO(p_cli-&amp;gt;p_ctx-&amp;gt;temp_buff);&lt;/pre&gt;&lt;br /&gt;But there is no useful information for me.&lt;br /&gt;Can you provide me some suggestions what to log?&lt;/p&gt;
&lt;p&gt;Thanks and best regards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438431?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 07:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6605b2c9-36f2-444b-8789-8db84d718895</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;In that case, I would start at the function nrf_cli_process, described in nrf_cli.h as:&lt;/p&gt;
&lt;p&gt;&amp;quot;Process function, which should be executed when data is ready in the transport interface.&amp;quot;&lt;/p&gt;
&lt;p&gt;Note: I did not test this myself, but seems logical. If it does not work, let me know and I will try to find something better&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438326?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 14:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04c29086-b8f4-4298-ae46-283ded216bbe</guid><dc:creator>Michael111</dc:creator><description>&lt;p&gt;Hello Sigurd,&lt;br /&gt;thanks for the reply.&lt;br /&gt;We want to take a look at the ascii stream of the cli interface which is received by the nRF52840DK.&lt;br /&gt;We have some commands registered, but sometimes they were not triggered on the nRF52840DK. So we want to take a look at the full ascii stream which the nRF52840DK receives to check if maybe the command is not received correctly or if the command is not even in the cli interface at all.&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438283?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 12:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa713de4-62db-40da-9e8b-95a5b7a13ee7</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I can try to do so.&lt;/p&gt;
&lt;p&gt;Can you specify a bit more which CLI data you want to have a look at?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438054?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2023 11:29:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:919bf3c8-8f1d-4fb9-8702-1f276b4fa055</guid><dc:creator>Michael111</dc:creator><description>&lt;p&gt;Hello Sigurd Hellesvik,&lt;/p&gt;
&lt;p&gt;thanks for your reply.&lt;/p&gt;
&lt;p&gt;Can you please provide a more specific place to set a checkpoint or to do some logging? As the nrf_cli.c for example is pretty huge.&lt;/p&gt;
&lt;p&gt;Thanks and best regards,&lt;/p&gt;
&lt;p&gt;Michael&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to view the data in the CLI interface?</title><link>https://devzone.nordicsemi.com/thread/438043?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2023 10:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e1f9372-fbc3-4311-b823-eafd699cb5fa</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can see our cli libraries at components/libraries/cli/.&lt;/p&gt;
&lt;p&gt;Here, you can either use checkpoints from a debugger&lt;br /&gt;Or you can add logging to the source code&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>