How to configure PuTTY to show non-printing ASCII characters when using a serial connection

puttyserialserial port

I am trying to debug communication with a hardware device via serial port. The hardware device occasionally sends out information that is not an alphanumeric or whitespace character. While my Python program sees every non-printing character that the device sends, PuTTY doesn't show any non-alphanumerical and non-whitespace text, skipping over those characters as if it never received them.

I am trying to use PuTTY to read and write information that come in and out of the serial port, but since PuTTY only seems to display alphanumerical and whitespace characters, I am missing information the device is sending back to me.

Any idea what I could do to get PuTTY to show these characters (as they come in)?

Best Answer

Try to get them to update PuTTY. It seems very doable: just create a custom character set that defines most of 0x00-0x1F as printable characters. Or add options that control how it handles common control characters for which it has actions (CR, LF, BEL, BS, FF (clear), ^E (answerback), etc.) and uncommon control characters for which it has no actions. For each control character, it could display a symbol, take an action, or both.

Meanwhile, you can get very limited use from PuTTY, or use something else.

PuTTY 0.69 (20170424) does not show control characters, except if, under "Translation", "Remote character set", you select "VSCII". That makes PuTTY show six control characters onscreen, but only because VISCII defines those six as printing characters. Ctrl+BEFTY^ display as the hard-to-distinguish Vietnamese characters ẲẴẪỶỸỴ, and copy and paste as the same. With these characters onscreen, if you then change "Translation" to any other character set, the ẲẴẪỶỸỴ change to six other characters, which copy and paste as the actual control codes. However, newly received control characters go back to not displaying anything, and Ctrl+E triggers answerback (PuTTY acts as if you typed "PuTTY").

Ctrl+B displays as "Ẳ"; becomes " ┐", which copies and pastes as ␂[STX][0x02].
Ctrl+E displays as "Ẵ"; becomes "│", which copies and pastes as ␅[ENQ][0x05].
Ctrl+F displays as "Ẫ"; becomes "─", which copies and pastes as ␆[ACK][0x06].
Ctrl+T displays as "Ỷ"; becomes "¶", which copies and pastes as ␔[DC4][0x14]
Ctrl+Y displays as "Ỹ"; becomes "├", which copies and pastes as ␙[EM][0x19].
Ctrl+^ displays as "Ỵ"; becomes " " (whitespace), which copies and pastes as ␞[RS][0x1E].

(Typing Ctrl+^ doesn't work.) These match the VISCII code table in Wikipedia.

RealTerm 2.0.0.70 (20130828) shows all control characters, as 2-digit codes or as symbols like ␂[STX], using included custom fonts. It color codes local echo and incoming text (good). (Stark red and yellow.) Stark yet cluttered user interface. For local echo, click "half duplex". It has a unique interpretation of CR: it goes to home position but does not linefeed until a character comes in. The newest beta looks the same.

Tera Term 4.94 (20170228) does not show control characters. It does not even log control characters that it does not act on.

Related Question