Re: Default behavior of cu

2023-03-13 Thread Tomek CEDRO
On Mon, Mar 13, 2023 at 8:18 AM Huang Qi wrote:
> I see some implementation of cu (like BSD) will disable the echo and CR/LF 
> convertion and let remote machine to handle them.
>
> I prefer to follow the BSD way, is there any side effect for you? Or do you 
> have any suggetions?

I prefer this approach too, thanks Qi :-)

Driver should be as simple as possible, provide raw data, and perform
no "silent" transformation of data. The rest is up to the application
and/or explicit driver configuration :-)

On FreeBSD there is a `stty` utility [1] to display and change
terminal driver setup (i.e. parity, bits, speed, rtscts and rtsdtr
flow, etc), so you can setup your local terminal to a client needs
(i.e. setup usb-uart port to use / do not use rtscts flow used by some
esp32 boards to select bootloader mode), and/or setup the terminal to
a known state that client needs to adhere (most terminal clients can
do this easily).

Also I see stty man page relates to termios man page [2]. Cu [3] is
the most common utility for serial console, but I also use Minicom
with curses interface and lots of useful functions on a client machine
:-)

[1] https://man.freebsd.org/cgi/man.cgi?query=stty=1=html
[2] 
https://man.freebsd.org/cgi/man.cgi?query=termios=4=0=FreeBSD+13.1-RELEASE
[3] 
https://man.freebsd.org/cgi/man.cgi?query=cu=0=0=FreeBSD+13.1-RELEASE=default=html

Best regads :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


Default behavior of cu

2023-03-13 Thread Huang Qi
Hi all,

There excatly are some issues after echo input in driver 
(https://github.com/apache/nuttx/pull/8691), the default behavior of cu is one 
of them should be discussed.
[https://opengraph.githubassets.com/d9287525ac4414548917840a0f06e871d6208b7ef78597353c79478a6ee0199f/apache/nuttx/pull/8691]<https://github.com/apache/nuttx/pull/8691>
drivers/serial: Echo input in driver layer by no1wudi · Pull Request #8691 · 
apache/nuttx<https://github.com/apache/nuttx/pull/8691>
Summary Works with apache/nuttx-apps#1608 Impact nsh Testing nsh and telnet
github.com

In current master, cu will let local machine handle the echo and CR/LF 
convertion by default, a major usage of cu (for me) is to connect to a AMP core 
(running another NuttX ) over uart_rpmsg, now the uart_rpmsg driver disabled 
its echo to avoid double the input (from the local core and AMP core).

I see some implementation of cu (like BSD) will disable the echo and CR/LF 
convertion and let remote machine to handle them.

I prefer to follow the BSD way, is there any side effect for you? Or do you 
have any suggetions?

BR,
Qi