4

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)?

7
  • Have you tried the -raw command line option?
    – DavidPostill
    Commented Jul 28, 2015 at 20:17
  • 1
    How do I use that? Commented Jul 28, 2015 at 20:18
  • Read the manual? the.earth.li/~sgtatham/putty/0.63/htmldoc/…
    – DavidPostill
    Commented Jul 28, 2015 at 20:19
  • These options allow you to bypass the configuration window and launch straight into a session. To start a connection to a server called host: putty.exe [-ssh | -telnet | -rlogin | -raw] [user@]host
    – DavidPostill
    Commented Jul 28, 2015 at 20:20
  • 1
    Enable logging and ‘All session output’. In this mode, everything sent by the server into your terminal session is logged. If you view the log file in a text editor, therefore, you may well find it full of strange control characters. This is a particularly useful mode if you are experiencing problems with PuTTY's terminal handling: you can record everything that went to the terminal, so that someone else can replay the session later in slow motion and watch to see what went wrong.
    – DavidPostill
    Commented Jul 28, 2015 at 20:45

2 Answers 2

4

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.

1
  • TeraTerm 4.64 and later, has two debug modes that display control characters as ^A, ^B, etc. or every character as their Hex values. You can also type all control characters using the ctrl+a, ctrl+b, etc. scheme
    – Eph
    Commented Jan 28, 2022 at 14:34
0

Go to "Change Settings -> Window -> Translation"

Now choose "ISO-8859-1:1998 (Latin-1, West Europe) from the 'Remote character set' drop-down box"

Click the Apply button.

Problem solved!

2
  • 1
    This is not a fix for the issue
    – Ali Padida
    Commented Jun 1, 2021 at 13:50
  • For me ISO-8859-1 does not fix the problem. However UTF8 does fix the problem! thanks for helping me find what to try Commented Feb 6 at 21:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .