2.3 Troubleshooting RS-232 Connections
Basics
Problems with RS-232 connections can typically be separated into two groups:
Those that are caused by hardware or physical hook-up conflicts.
Those that are caused by software conflicts.
When RS-232 control of a device doesn’t work, it typically means that somewhere along the path of sending a command to the equipment and receiving a response from the equipment, something is broken or misconfigured. In this module, you’ll learn how to figure it out.
Terms to Know
You should know the following terms:
- Loopback Test
- RS-232
- Terminal Block
- Voltmeter
Information
Tips for Troubleshooting RS-232 Connections
If your system has been working fine for a while but then stops working, for example, after moving equipment or changing something else in the rack, check that an RS-232 cable has not become unplugged or that the serial cable’s terminations haven’t been compromised. For example, if not properly terminated, a wire can easily get pulled out of a terminal block.
Do a visual inspection of the cable and the port to be sure none of the pins are bent or missing.
Confirm that RS-232 has been enabled on the equipment to control. For example, some displays require navigating their user interface to explicitly enable RS-232 communication.
Confirm the RS-232 baud rates are the same on the two devices connected over RS-232.
Confirm that the serial cable connects the transmit (TXD) pin on one device to receive (RXD) pin on the other device, and that it also provides a signal ground connection. If you’ve ever heard the phrase “you only need pins 2, 3, and 5,” this refers to only needing to connect three pins on each end of the cable: the transmit (TXD), receive (RXD), and signal ground (GND) pins.
Optionally, use a terminal program to test whether a device will respond to commands that you send to it. If it does respond, it may indicate an issue with the control system.
Check your device’s documentation for information about RS-232.
Resolving Hardware Issues by Checking the Wiring
Many times, hardware issues are due to improper wiring.
(images below from: https://www.com-port-monitoring.com/serial-port-troubleshooting/)
Follow these steps to check the wiring:
Check to see if the cable pinout is correct.
Test the Connection. Try these steps if you are using a terminal block to test a connection:
Use a voltmeter to test the connection between the wire connecting the terminal block and the connector. Set the voltmeter to DC
Test the voltage between the RxV pin and the GND pin on the terminal block connector. The reading should be between _12V and _6V. The XMT line should have the same reading
Checking the RS32 Port
To test the connections, you do not need fancy tools. You can create a loop with a paperclip or screwdriver. By looping the transmit and receive pins, you can test serial cable port communication by checking if the serial ports connections transmit and receive valid information. This is called a loopback test and can be used to test RS-232 connections.
Follow these steps to complete a loopback test:
Remove the cable from the near-end port of the problem connection. Take a paper clip or screwdriver and loop the port's TX pin (typically Pin 2 on RS-232 ports) to its RX pin (typically Pin 3 on RS-232 ports).
Perform a loopback test: Type any character. You should see the character echoed on the screen. Now remove the paper clip from the port and type a character. Without the loopback, you should not see the character echoed.
If the result of the loopback test is exactly as described above, the port is physically OK. If the result of the loopback test is different, the port may be defective.
The next step is to test the problem port's cable. Start with a cable that you know works.
Unplug the cable at the far end and loop the TX pin to the RX pin.
Make a Telnet or proxy connection to the near-end device and perform a loopback test.
If the cable fails the loopback test, consider replacing the cable.
But before you replace the cable, double-check your pinouts. The near-end and far-end ports may have identical pinouts, so using a straight-through cable will result in one TXD pin being connected to another TXD pin. A null-modem adapter may be needed, which reverses the TXD and RXD signal.
If the cable is OK, the problem might be on the far-end port. To make sure, loop the far-end port's TX pin to its RX pin, make a Telnet connection to the far-end device and perform a loopback test there.
When should I use a screwdriver vs. a paper clip?
A screwdriver is the right tool when you have an open connector with pins on two sides. A slot/flat screwdriver head will usually be the right width to bridge pins. You can even achieve a slight diagonal if you need to connect 2 pins that are not directly across from one another.
A paper clip takes more time than a screwdriver, but it has much more versatility because it can be bent. You can use a screwdriver to short two female pin sockets on a DB9 serial port. You can connect virtually any two pins on a 50-pin Amphenol connector. You'll simply need to shape the paper clip into an appropriate shape and insulate it from your hands with a napkin or some other insulator.
Content Credit: https://www.dpstele.com/rtu/support/troubleshoot/screwdriver-test.php#:~:text=By%20looping%20the%20transmit%20and,to%20loop%20pins%20for%20testing
Additional Resources
Here are additional resources you may find useful:
- Video: Troubleshooting a Serial COM Port Connection
- Video: Troubleshooting USB to Serial Port Connections
- Video: Soldering DB9 Connectors
If you are confused with terminology, there is an excellent explanation for serial programming and the terminology needed to understand the process at wikibooks.
Task/Self-Assessment
Complete the following task or self-assessment:
Practice conducting loopback tests with a screwdriver, paper clip, or both. Even if your tests show no issues with the connection, the practice will make you feel more comfortable when having to conduct a loopback test in the field.