ANSI Escape sequence unexpected output

David Wang (王振宇) DavidWang at quantatw.com
Tue Feb 23 19:12:28 AEDT 2021


I don't think this is a problem of dropping charecters.
The error seems to occur only at the first time after boot.

> This motivated me to mess with this again.
> FWIW, The DSR command is present when I run Kermit from within a TMux frame.
> This code, [[40;162R, is present when I run without TMux, and just use 
> Konsole.
> Both sequences are emitted AFTER the password has been input, and accepted.

> Password:
> Last login: Thu Feb 18 19:45:28 UTC 2021 on ttyS4
> ^[[39;81Rroot at intel-obmc

> Using "set terminal type dumb" did not impact the emission of the ESC 
> sequence.
> I haven't found the "turn responding off" control yet.

I think this is not like a terminal problem, but the escape charecter is not read correctly and the remaining string is output to stdout. Please correct me if there is an error.
I have found similar codes under linux:
https://github.com/openbmc/linux/blob/599d7f997930829f13e05d332e3e7fccd89d340d/drivers/tty/vt/vt.c#L1829
But I tried to insert the debug code to verify but found that they don’t seem to be the culprit.


More information about the openbmc mailing list