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&sektion=1&format=html
[2] 
https://man.freebsd.org/cgi/man.cgi?query=termios&sektion=4&apropos=0&manpath=FreeBSD+13.1-RELEASE
[3] 
https://man.freebsd.org/cgi/man.cgi?query=cu&apropos=0&sektion=0&manpath=FreeBSD+13.1-RELEASE&arch=default&format=html

Best regads :-)
Tomek

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

Reply via email to