3

I have a serial terminal that is not working. It's a VT525 using an external monitor (of course) and PS/2 PC keyboard. The self-test passes fine; setup works fine. I can echo characters when local echo is on. However I don't believe it is actually transmitting characters out of the serial port.

I started trying to get it working on a raspberry pi with a USA-19HS USB serial port according to several guides. Though the USB port was correctly recognised as ttyUSB0 the terminal does nothing.

So I tried the most basic test, loopback. Terminal is reset to factory settings and flow control (both hardware and software) is off. If you then use a loopback plug in the serial connector, simply bridging pins 2 and 3 (these are TD and RD on both DB25 and DB9, only reversed), shouldn't the terminal display any typed character just as if it had been sent and then echoed back bye a remote system? If you do this with local echo ON you should get duplicates of each character?

Terminal so far shows nothing when local echo is OFF.

Really looking forward to playing Nethack again with genuine scanlines...

  • 3
    I would bridge pins to simulate hardware flow control as well, just in case you haven't switched it off! See ni.com/tutorial/3450/en for the DB9 and DB25 pin connections. Also, can you transmit from the raspberry pi to the terminal? You didn't mention trying that in your post. It all else fails, even a cheap multimeter should "flick" the pointer if you are actually transmitting data. A breakout box is a better diagnostic tool - you can get "cheap and cheerful" ones ($25) from Amazon, Ebay, etc. – alephzero Sep 6 '18 at 0:29
  • good thoughts - I will wire the hardware control loopback and see what I get. This is when you kick yourself for ever throwing anything out as I used to have a breakout box and all that gear. – Adam Eberbach Sep 6 '18 at 1:57
  • I was going to suggest voltage levels on the USB-RS232 converter, but if even a loopback doesn't work then that's not it. You need one of these I probably have one around here somewhere...used to use them quite a bit a "few" years ago. – manassehkatz-Reinstate Monica Sep 6 '18 at 3:31
  • Another basic test is to measure voltages and see how well they are in the RS232 range. Some USB dongles are very close to the 3V "undefined" level, which can cause trouble with vintage equipment. – dirkt Sep 6 '18 at 5:42
  • 1
    @dirkt USB is out of the equation for now - trying to get characters echoed back to the terminal via a simple loopback. If I get past that hurdle will try USB to a pi again. – Adam Eberbach Sep 6 '18 at 5:55
4

As you surmised, a local loopback is your best diagnostic - and as you have mentioned, it avoids any interoperability issues with newer devices' "best effort" at RS-232 communication.

As also described though, to be sure you've got a good connection you also need to add hardware signals, which means looping back output signals into inputs. A complete local loopback plug needs the following:

      RS-232        |      DB-25     |     DE-9
 TX <-> RX          |  2 <-> 3       | 3 <-> 2
RTS <-> CTS         |  4 <-> 5       | 7 <-> 8
DTR <-> DSR <-> DCD | 20 <-> 6 <-> 8 | 4 <-> 6 <-> 1

You can safely ignore RI (22 | 9).

If the above does not echo what you type (or give two copies of the character if "local echo" is on), then you know there's a problem with the RS-232 interface.

The original RS-232 specification says that the valid voltage range of each signal is ± 3-25V (yes, 25V!), although most early interfaces used 12V. That means that you could probe each of the output pins for that voltage range, but testing the input pins is harder.

1

Get hold of a logic analyzer, e.g. one of the many low-cost Chinese products like this one. These can be used with the open source software Sigrok, which is able to decode serial protocols and show what is and isn't working.

  • 1
    It's maybe not a good idea to connect a logic analyzer built for 0-5V to a serial interface that emits -12V to +12V. – tofro Sep 6 '18 at 10:00
  • @tofro The device I linked to has overvoltage protection diodes rated at 20mA, which I believe is higher than most serial ports will supply, but adding a 100 ohm resistor in line with the connections would ensure it wasn't damaged. – Jules Sep 6 '18 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.