<?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>Console Echo</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110880/console-echo</link><description>I&amp;#39;m doing a project for adding a Bluetooth capability to an embedded Linux device. The Linux master talks to the nRF52840-based Bluetooth module via a dedicated serial (UART) link. I&amp;#39;ve got a console feature on the BT module such that the Linux master</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 May 2024 09:48:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110880/console-echo" /><item><title>RE: Console Echo</title><link>https://devzone.nordicsemi.com/thread/482230?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 09:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcf9e336-71b5-4ac6-b86a-b65d9b4e1f6b</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can confirm I see the same as you, I must admit I have not used the console. I did try to dig around a bit, but I could not really find how this actually &amp;quot;works&amp;quot; either, I did at the end ask chatgpt if it could provide any insight, and it kind of confirmed what we already see: &amp;quot;When using `console_getline()` in Zephyr, characters are displayed as you type because this function is designed to provide real-time input feedback. It&amp;#39;s particularly useful for interactive command-line interfaces where users need immediate feedback as they type their input. This behavior allows users to see what they are typing and correct any mistakes before submitting the input.&amp;quot;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Console Echo</title><link>https://devzone.nordicsemi.com/thread/482109?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 16:15:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55bc7e9c-e765-487c-b4d6-11bfbba412c3</guid><dc:creator>David Ormand</dc:creator><description>&lt;p&gt;I took the hello_world sample and modified it to use console_getline():&lt;/p&gt;
&lt;p&gt;prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETLINE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(I don&amp;#39;t know that the first two lines are necessary; the program works identically without them).&lt;/p&gt;
&lt;p&gt;main.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/sys/printk.h&amp;gt;
#include &amp;lt;zephyr/console/console.h&amp;gt;

int main(void)
{
        char *p;
        console_getline_init();
        printf(&amp;quot;Hello World! %s\n&amp;quot;, CONFIG_BOARD);
        while(1) {
                p = console_getline();
                printf(&amp;quot;orig: &amp;gt;%s&amp;lt;\n&amp;quot;, p);
        }
        return 0;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When I flash the program and attach a terminal, I get output and can enter text and get it back.&lt;/p&gt;
&lt;p&gt;&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/hello_5F00_world.png" /&gt;&lt;/p&gt;
&lt;p&gt;But if I set the terminal for &amp;quot;local echo&amp;quot;, I get:&lt;/p&gt;
&lt;p&gt;&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/hello_5F00_world_5F00_local_5F00_echo.png" /&gt;&lt;/p&gt;
&lt;p&gt;So it&amp;#39;s clear that Console, or at least console_getline(), is doing remote echo.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Console Echo</title><link>https://devzone.nordicsemi.com/thread/482100?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 15:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8fab369-6449-45eb-ad3c-b2b7785be696</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Do you have an example project I can try to recreate this? Looking at the code (as you do) I can&amp;#39;t seem to find any either, it seems it&amp;#39;s for instance through&amp;nbsp;console_putchar(), so can&amp;#39;t imagine what else may be doing this.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>