Next Previous Contents

11. Troubleshooting

See Modem-HOWTO for troubleshooting related to modems or getty for modems.

11.1 Serial Electrical Test Equipment

Breakout Gadgets, etc.

While a multimeter (used as a voltmeter) may be all that you need for just a few terminals, simple special test equipment has been made for testing serial port lines. Some are called "breakout ... " where breakout means to break out conductors from a cable. These gadgets have a couple of connectors on them and insert into the serial cable. Some have test points for connecting a voltmeter. Others have LED lamps which light when certain modem control lines are asserted (turned on). Still others have jumpers so that you can connect any wire to any wire. Some have switches.

Radio Shack sells (in 1998) a "RS-232 Troubleshooter" or "RS-232 Line Tester" which checks TD, RD, CD, RTS, CTS, DTR, and DSR. A green light means on (+12 v) while red means off (-12 v). They also sell a "RS-232 Serial Jumper Box" which permits connecting the pins anyway you choose.

Measuring Voltages

Any voltmeter or multimeter, even the cheapest that sells for about $10, should work fine. Trying to use other methods for checking voltage is tricky. Don't use a LED unless it has a series resistor to reduce the voltage across the LED. A 470 ohm resistor is used for a 20 ma LED (but not all LED's are 20 ma). The LED will only light for a certain polarity so you may test for + or - voltages. Does anyone make such a gadget for automotive circuit testing?? Logic probes may be damaged if you try to use them since the TTL voltages for which they are designed are only 5 volts. Trying to use a 12 V incandescent light bulb is not a good idea. It won't show polarity and due to limited output current of the UART it probably will not even light up.

To measure voltage on a female connector you may plug in a bent paper clip into the desired opening. The paper clip's diameter should be no larger than the pins so that it doesn't damage the contact. Clip an alligator clip (or the like) to the paper clip to connect up.

Taste Voltage

As a last resort, if you have no test equipment and are willing to risk getting shocked (or even electrocuted) you can always taste the voltage. Before touching one of the test leads with your tongue, test them to make sure that there is no high voltage on them. Touch both leads (at the same time) to one hand to see if they shock you. Then if no shock, wet the skin contact points by licking and repeat. If this test gives you a shock, you certainly don't want to use your tongue.

For the test for 12 V, Lick a finger and hold one test lead in it. Put the other test lead on your tongue. If the lead on your tongue is positive, there will be a noticeable taste. You might try this with flashlight batteries first so you will know what taste to expect.

11.2 Serial Monitoring/Diagnostics

A few Linux programs will monitor the modem control lines and indicate if they are positive (1) or negative (0). See section Serial Monitoring/Diagnostics

11.3 My Serial Port is Physically There but Can't be Found

For the PCI bus look at /proc/pci. Check the BIOS menus. If it's a PnP serial port, try "pnpdump --dumpregs" and/or see Plug-and-Play-HOWTO.

Here are some common mistakes people make:

You may probe for the serial port using "setserial" with the "autoconfig" argument at the I/O address you think the serial port is at. If it shows "unknown" for UART type there may be nothing there. See What is Setserial.

11.4 Slow: Text appears on the screen slowly after long delays

This may happen with a modem, terminal, or printer. In most cases only a few words appear and then there is a long wait of many seconds for the next batch of a few words. For obsolete serial ports, instead of a few words there is only a single character. You may type but what you type doesn't appear on the screen. After a delay of many seconds you may see what you typed (or part of it).

It's likely slow because interrupt are not working. This may be due to either an Interrupt Conflict or a Mis-set Interrupts. It's a conflict when two devices try to use the same IRQ. It's mis-set if the device driver listens for the wrong IRQ. In either case things will work very slowly (or seemingly not at all). You could get "input overrun" error messages (or find them in logs).

Make sure there are no IRQs being illegally shared. Check all your boards (serial, ethernet, SCSI, etc...). Make sure the jumper (or PnP) settings, and the setserial parameters are correct for all your serial devices. Also check /proc/ioports and /proc/interrupts and /proc/pci for conflicts.

11.5 The Startup Screen Show Wrong IRQs for the Serial Ports.

Linux does not do any IRQ detection on startup. It only does serial device detection. Thus, disregard what it says about the IRQ, because it's just assuming the standard IRQs. This is done, because IRQ detection is unreliable, and can be fooled. But when setserial changes the IRQ's, you should see this on the startup screen.

So, even though I have my ttyS2 set at IRQ 5, I still see

tty02 at 0x03e8 (irq = 4) is a 16550A
at first when Linux boots. You have to use setserial to tell Linux the IRQ you are using.


Next Previous Contents