ANSI Escape sequence unexpected output

Johnathan Mantey johnathanx.mantey at intel.com
Fri Feb 19 06:52:00 AEDT 2021


On 2/18/21 9:37 AM, Michael Richardson wrote:
> Johnathan Mantey <johnathanx.mantey at intel.com> wrote:
>      > David, I see a garbage sequence like this all the time.
>
>      > I run an Expect script that controls my terminal emulator (kermit), and
>      > I see a sequence like this: [[39;88R I have tried multiple times to
>
> That's the result of a Device-Status Report.
> https://en.wikipedia.org/wiki/ANSI_escape_code#CSIsection, see "DSR" or "CSI 6n"
> 39 88 is the size of your terminal, or the one that Kermit is emulating for you.
> (I seem to recall think that kermit has a full-screen mode. So many different
> versions of it over the decades)
> You may be able to turn kermit responding off, or change it's terminal type
> to dumb.
>
> The shell is emitting ESC [ 6n to set the stty size of the terminal.
> "resize" does this, but I think gnureadline does too.
Thanks for the information.

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.

> --
> ]               Never tell me the odds!                 | ipv6 mesh networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> ]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [
>
>

-- 
Johnathan Mantey
Senior Software Engineer
*azad te**chnology partners*
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: johnathanx.mantey at intel.com <mailto:johnathanx.mantey at intel.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210218/6a7731b5/attachment.sig>


More information about the openbmc mailing list