Re: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Tomek CEDRO
ACK! :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info On Sat, Mar 11, 2023, 23:53 Xiang Xiao wrote: > On Sun, Mar 12, 2023 at 2:09 AM Tomek CEDRO wrote: > > > Please consult Unix manual and source code (for instance any of the BSD). > > Linux was never a reference in Unix world, it was

Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Nathan Hartman
Generally I like to lean towards low flash footprint. However I accept the arguments in favor of POSIX compliance. How to find a balance? I think Xiang Xiao's idea makes sense: always enable the parts that have a minimal impact on flash footprint, while leaving the heavier parts conditional on a

Re: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Xiang Xiao
On Sun, Mar 12, 2023 at 2:09 AM Tomek CEDRO wrote: > Please consult Unix manual and source code (for instance any of the BSD). > Linux was never a reference in Unix world, it was about to mimic Unix, but > was not even self-compatible. Not a good reference point. See how big mess > it introduced

Re: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Gregory Nutt
It is true that Linux is not fully POSIX compliant (e.g., https://linuxhint.com/is_linux_posix_compliant/).  But Linux folk have gone to a lot of work to clean up a Linux specification with the LSB: https://refspecs.linuxfoundation.org/lsb.shtml and that generally adopts POSIX standards.

Re: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Tomek CEDRO
Please consult Unix manual and source code (for instance any of the BSD). Linux was never a reference in Unix world, it was about to mimic Unix, but was not even self-compatible. Not a good reference point. See how big mess it introduced in current drivers implementation (i.e. drm kms) and their

Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Tomek CEDRO
+1 :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info On Sat, Mar 11, 2023, 12:54 Alin Jerpelea: > Hi, > > In my opinion we should keep the memory usage as low as possible > +1 for menu config > > Best Regards > Alin >

Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Alan C. Assis
Agree! +1 On 3/11/23, Alin Jerpelea wrote: > Hi, > > In my opinion we should keep the memory usage as low as possible > +1 for menu config > > Best Regards > Alin > > On Sat, 11 Mar 2023, 05:13 Xiang Xiao, wrote: > >> On Sat, Mar 11, 2023 at 9:51 AM Gregory Nutt wrote: >> >> > >> > On

Re: [Breaking change] Echo character by serial driver

2023-03-11 Thread Alin Jerpelea
Hi, In my opinion we should keep the memory usage as low as possible +1 for menu config Best Regards Alin On Sat, 11 Mar 2023, 05:13 Xiang Xiao, wrote: > On Sat, Mar 11, 2023 at 9:51 AM Gregory Nutt wrote: > > > > > On 3/10/2023 7:44 PM, Huang Qi wrote: > > > >> The ECHO behavior can be

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Xiang Xiao
On Sat, Mar 11, 2023 at 9:51 AM Gregory Nutt wrote: > > On 3/10/2023 7:44 PM, Huang Qi wrote: > > >> The ECHO behavior can be disabled ONLY if TERMIOS are enabled. > > >> TERIMIOS is now required by POSIX and, further, if TERMIOS is not > > >> system, many features are now broken. Like

RE: [Breaking change] Echo character by serial driver

2023-03-10 Thread Huang Qi
> That 1Kb number seems large to me. Most of that is in the lower-half, > UART driver, right? If so then the size would vary dramatically from > chip-to-chip. I prefer to select it by Kconfig, most morden platforms doesn't make sense for 1Kb but still many chips in source tree with very small

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
On 3/10/2023 7:44 PM, Huang Qi wrote: >> The ECHO behavior can be disabled ONLY if TERMIOS are enabled. >> TERIMIOS is now required by POSIX and, further, if TERMIOS is not >> system, many features are now broken.  Like hiding the password when >> logging into NSH. > Yes maybe we should

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
On 3/10/2023 7:44 PM, Huang Qi wrote: >> The ECHO behavior can be disabled ONLY if TERMIOS are enabled. >> TERIMIOS is now required by POSIX and, further, if TERMIOS is not >> system, many features are now broken.  Like hiding the password when >> logging into NSH. > Yes maybe we should

RE: [Breaking change] Echo character by serial driver

2023-03-10 Thread Huang Qi
a extra 1KB overhead for all target. 发件人: Gregory Nutt 发送时间: 2023年3月11日 09:33 收件人: Qi Huang 主题: Re: [Breaking change] Echo character by serial driver >> The ECHO behavior can be disabled ONLY if TERMIOS are enabled. >> TERIMIOS is now required by POSIX and, further, if T

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread 黄 齐
I'm Qi Huang, changed to a new mailbox to avoid messing massge in mail titile. > If isconsole is set and TERMIOS is not, then it will always echo the > input. The CR-LF behavior only depends on isconsole and can't be > changed even if TERMIOS is enabled. If TERMIOS enabled, the CR-LF

Re: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
On 3/10/2023 5:30 PM, Qi3 Huang 黄齐 wrote: I have to agree that the code is looking better all of the time. Many of the obvious problems that I saw just a couple of days ago have been addressed.  Many of the things I have complained about in this thread have been fixed.  But there are probably

答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Qi3 Huang 黄齐
tX. 发件人: Qi3 Huang 黄齐 发送时间: 2023年3月11日 0:05:41 收件人: dev@nuttx.apache.org 主题: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver Thanks for point that, so my change will affect them by serial.c since it's in common logic (excat

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
I think my biggest concern with the solution is that it effectively makes it impossible to received any out-of-band data: Any encoded, context-dependent, escaped data will be echoed back to the host unconditionally making it impossible to receive cleanly. We have already seen this in escape

Re: 答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
On 3/10/2023 10:05 AM, Qi3 Huang 黄齐 wrote: Thanks for point that, so my change will affect them by serial.c since it's in common logic (excatly, is in uart_read()). You are right.  But that is not true of telnet, is it?

答复: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Qi3 Huang 黄齐
Thanks for point that, so my change will affect them by serial.c since it's in common logic (excatly, is in uart_read()). 发件人: Gregory Nutt 发送时间: 2023年3月10日 23:58:29 收件人: dev@nuttx.apache.org 主题: Re: 答复: 答复: [External Mail]Re: [Breaking change] Echo character

Re: 答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
Emm, I confirmed that one of my test platform (esp32c3), its cdcacm driver implement the uart_ops, but rp2040 seems not. CLE should works since it will override the content from driver ECHO if over serial driver, but readline shouldn't echo input. I'll test more to confirm it. cdcacm.c

答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Qi3 Huang 黄齐
s before. 发件人: Gregory Nutt 发送时间: 2023年3月10日 23:47:52 收件人: dev@nuttx.apache.org 主题: Re: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给mi...@xiaomi.com进行反馈 > >> nsh over usb works with readline/cle now

Re: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
nsh over usb works with readline/cle now. In face, isconsole in current implementation is more like a very tiny `line driver` inside the serial driver. That is very interesting.  The serial driver (drivers/usbdev/cdcacm.c).  Does not include any of your change. It does not use

答复: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Qi3 Huang 黄齐
it. 发件人: Gregory Nutt 发送时间: 2023年3月10日 23:22:45 收件人: dev@nuttx.apache.org 主题: Re: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给mi...@xiaomi.com进行反馈 > nsh over usb works with readline/cle now. > >

Re: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
nsh over usb works with readline/cle now. In face, isconsole in current implementation is more like a very tiny `line driver` inside the serial driver. That is very interesting.  The serial driver (drivers/usbdev/cdcacm.c).  Does not include any of your change. It does not use serial.c . 

Re: 答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
On 3/10/2023 9:08 AM, Qi3 Huang 黄齐 wrote: I think I should give a simple brief of questions mentioned: 1. How to handle so many vt100 commands ? There aren't many vt100 commands actually used, current implementation can meet nearly all requirment in apps (only pdcurse need test, I'll have

答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Qi3 Huang 黄齐
change] Echo character by serial driver [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给mi...@xiaomi.com进行反馈 >>> Isn't the default setting of ECHO disabled? My understanding is the >>> ECHO is always /disabled /unless it is specifically /enabled /in the >>> TERMIOS sett

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
Isn't the default setting of ECHO disabled? My understanding is the ECHO is always /disabled /unless it is specifically /enabled /in the TERMIOS settings. No, it depends on isconsole: https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1303-L1308

答复: [External Mail]Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Qi3 Huang 黄齐
for armv7m (other platform should close to it), so we can select it for these library by Kconfig. 发件人: Xiang Xiao 发送时间: 2023年3月10日 22:45:58 收件人: dev@nuttx.apache.org 主题: [External Mail]Re: [Breaking change] Echo character by serial driver [外部邮件] 此邮件来源于小米公司外部,请谨慎处理

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
Isn't the default setting of ECHO disabled? My understanding is the ECHO is always /disabled /unless it is specifically /enabled /in the TERMIOS settings. No, it depends on isconsole: https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1303-L1308

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Xiang Xiao
On Fri, Mar 10, 2023 at 10:39 PM Gregory Nutt wrote: > > On 3/10/2023 8:12 AM, Xiang Xiao wrote: > > The only problem is that terminal is optional: > > > https://github.com/apache/nuttx/blob/master/drivers/serial/Kconfig#L167-L174 > > So, if the user doesn't enable CONFIG_SERIAL_TERMIOS in

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
On 3/10/2023 8:12 AM, Xiang Xiao wrote: The only problem is that terminal is optional: https://github.com/apache/nuttx/blob/master/drivers/serial/Kconfig#L167-L174 So, if the user doesn't enable CONFIG_SERIAL_TERMIOS in defconfig, readline will stop working due to failure to disable ECHO.

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Sebastien Lorquet
Definitely a good thing we get the opportunity to talk about these changes on this list, then. We need technical overview from several people to determine the best way to do things. Sebastien Le 10/03/2023 à 14:49, Gregory Nutt a écrit : Thank you for this good change for better posix

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Xiang Xiao
The only problem is that terminal is optional: https://github.com/apache/nuttx/blob/master/drivers/serial/Kconfig#L167-L174 So, if the user doesn't enable CONFIG_SERIAL_TERMIOS in defconfig, readline will stop working due to failure to disable ECHO. Three option here: 1. Remove SERIAL_TERMIOS

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
Thank you for this good change for better posix compliance. The TERMIOS changes are basically good and does help with POSIX compliance, but the console ECHO behavior is not and has nothing to do with POSIX compliance.  POSIX does not deal with implementation.  We can look at standard

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Gregory Nutt
How do you plan to handle incoming vt100 escape sequences.  I see you kludged around one, but there are hundreds.  TheY are used in BAS, pdcurses and other apps extensively. You are ruining that critical vt100 capability and breaking a lot of things Has anyone done any serious CLE

RE: [Breaking change] Echo character by serial driver

2023-03-10 Thread spudaneco
How do you plan to handle incoming vt100 escape sequences.  I see you kludged around one, but there are hundreds.  TheY are used in BAS, pdcurses and other apps extensively.You are ruinking that critical vt100 capability and breaking a lot of thingsSent from my Galaxy Original message

Re: [Breaking change] Echo character by serial driver

2023-03-10 Thread Sebastien Lorquet
Hello, Thank you for this good change for better posix compliance. In my setup nsh is used via a stm32h7 serial port. I have my updated custom apps with your changes and everything works as expected. I am using readline. For better coverage I also tested CLE (with history) with NSH and did