ANSI Escape sequence unexpected output

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


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 have Expect eat or delete this output 
before handing control to my terminal emulator.
Once Expect hands control I see:
;88R

I have also tried modifying settings in my terminal emulator to see if 
the ANSI sequence would be eaten by the terminal emulator. This has also 
been ineffective.

So once my Expect script has handed control to me, I have to manually 
press CR to clear the excess bytes.
This gives me an error message from Bash:
-sh: syntax error near unexpected token `;'

So I know the characters are in the Bash input stream.
Like you, I have no idea where they are coming from, and all my 
mitigation attempts have failed.

None of my compatriots have the issue, so far as I know. When I brought 
this to the attention of some of my team members, none claimed to have 
the same issue. As my toolset is the outlier in the group, I just 
resigned myself to suffering with the issue.

On 2/17/21 11:11 PM, David Wang (王振宇) wrote:
> Hi all,
>      when I use the host console via uart to log in to os, sometimes some unexpected output is print to stdout, such as:
>
> login: root
> Password:
> Last Login:  Thu   Jan   7  06:52:18  UTC  2021  on ttyS0
> root at intel-corei7-64:~#  ;153R     <-------  This is the unexpected output
>
> It also happen when using obmc-console-client or ipmitool sol activate.
> It looks like an ANSI Escape sequence
> "EscLine;ColumnR	Response: cursor is at v,h	CPR"
> ref: http://ascii-table.com/ansi-escape-sequences-vt-100.php
> ref: https://stackoverflow.com/questions/16026858/reading-the-device-status-report-ansi-escape-sequence-reply
>
> My question is,
> how to prevent this escape sequence from printing to the stdout?
> Which package in openbmc is doing this?
> Has anyone had a similar problem?
> Please leave any comments.
> Thanks
>
> David
>

-- 
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/6dedb8ad/attachment-0001.sig>


More information about the openbmc mailing list