Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

RS-232 Troubleshooting Reference

A practical reference for diagnosing RS-232 communication problems in legacy software, industrial equipment and undocumented serial devices.

This guide focuses on a common real-world situation:

The software, device or documentation may be old or incomplete — but the system still needs to work.

Quick troubleshooting checklist

When an RS-232 connection does not work, check these first:

  1. Confirm that both sides are actually using RS-232 electrical levels.
  2. Verify the correct COM port.
  3. Check baud rate.
  4. Check data bits.
  5. Check parity.
  6. Check stop bits.
  7. Verify hardware/software flow control.
  8. Determine whether the cable should be straight-through or null-modem.
  9. Verify TX, RX and GND wiring.
  10. Check whether the application expects specific modem-control signals.
  11. Capture the serial traffic if communication still fails.

A typical configuration is 9600 baud, 8 data bits, no parity, 1 stop bit, no flow control, usually written as 9600 8N1.


1. Physical layer

Do not assume that a DB9 connector automatically means RS-232.

Equipment using similar connectors may implement:

  • RS-232
  • RS-422
  • RS-485
  • TTL serial
  • proprietary electrical interfaces

Connecting incompatible electrical interfaces can cause communication failure and may damage hardware.

Minimum RS-232 signals

For many simple connections only three signals are required:

  • TX — Transmit Data
  • RX — Receive Data
  • GND — Signal Ground

Other systems may also require RTS, CTS, DTR, DSR, DCD or RI.


2. Straight-through vs null-modem

One of the most common RS-232 problems is using the wrong cable.

A straight-through cable connects corresponding signals.

A null-modem connection crosses the transmit and receive paths:

Device A TX → Device B RX
Device A RX ← Device B TX
Device A GND — Device B GND

Do not determine the required cable from connector gender alone.

The important question is whether each endpoint behaves as DTE or DCE and how its pins are actually assigned.


3. Communication parameters

Both endpoints normally need matching serial parameters.

Baud rate

Common values include:

300, 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200 baud.

A wrong baud rate often produces unreadable or apparently random characters.

Data bits, parity and stop bits

Common configurations include:

  • 8N1
  • 8E1
  • 8O1
  • 7E1

For example, 8N1 means 8 data bits, no parity and 1 stop bit.


4. Flow control

A system may use:

No flow control

Only the data lines are relevant.

Hardware flow control

Usually RTS/CTS.

Software flow control

Usually XON/XOFF control characters.

A mismatch can produce a connection that appears to start correctly and then stops transmitting.


5. COM port problems

Modern Windows systems often assign USB-to-serial adapters dynamically.

Check:

  • which COM port Windows assigned;
  • whether the legacy application supports that COM number;
  • whether another application already opened the port;
  • whether the USB-to-serial driver loaded correctly;
  • whether reconnecting the adapter changed the COM number.

Some old applications only support low-numbered ports such as COM1–COM4, even though Windows itself supports higher numbers.


6. USB-to-serial adapters

Not all USB-to-serial adapters behave identically with legacy equipment.

Differences may include:

  • driver behavior;
  • timing;
  • modem-control signal handling;
  • buffering;
  • unsupported or counterfeit chipsets;
  • behavior after Windows updates.

When troubleshooting a previously working system, always record:

  • adapter chipset;
  • driver version;
  • Windows version;
  • assigned COM port;
  • serial parameters.

Changing several of these simultaneously makes diagnosis much harder.


7. Capture the traffic

When the physical connection appears correct but the protocol is unknown, capture the communication between the original working software and the device.

Useful information includes:

  • direction;
  • timestamp;
  • raw bytes;
  • ASCII representation;
  • message boundaries;
  • response time.

For example:

PC → DEVICE: 02 53 54 41 54 55 53 03
DEVICE → PC: 02 4F 4B 03

Do not immediately assume that captured bytes represent printable text.

Legacy protocols may contain:

  • binary fields;
  • control characters;
  • checksums;
  • length fields;
  • sequence numbers;
  • BCD values;
  • little-endian integers;
  • fixed-width records.

8. Unknown baud rate or protocol

If documentation is unavailable, avoid changing random settings until something appears to work.

Use a controlled process:

  1. Preserve the original system if it still works.
  2. Record its serial configuration.
  3. Identify the electrical interface.
  4. Determine the pinout.
  5. Capture known-good communication.
  6. Identify message boundaries.
  7. Compare repeated transactions.
  8. Change one input or action at a time.
  9. Observe which bytes change.
  10. Determine checksums and field encoding only after the basic structure is understood.

This turns protocol discovery into a repeatable engineering process rather than guesswork.


9. Common symptoms

No data in either direction

Check:

  • wrong COM port;
  • TX/RX wiring;
  • missing ground;
  • wrong electrical interface;
  • required handshake signals;
  • device power/state.

Garbage characters

Check:

  • baud rate;
  • data bits;
  • parity;
  • stop bits;
  • electrical noise or incorrect signal levels.

Data works only in one direction

Check:

  • TX/RX wiring;
  • handshake signals;
  • application protocol expectations.

Communication stops after several bytes

Check:

  • RTS/CTS;
  • XON/XOFF;
  • buffer handling;
  • protocol acknowledgement requirements.

Original PC works, replacement PC does not

Compare:

  • COM port assignment;
  • serial adapter;
  • driver;
  • Windows version;
  • application configuration;
  • cable;
  • timing behavior;
  • handshake lines.

Do not assume the software itself is the problem.


10. Preserve a working legacy system before changing it

If an old PC still communicates successfully with important equipment, treat it as a reference system.

Before modifying it, preserve:

  • application files;
  • configuration files;
  • database files;
  • DLL/OCX dependencies;
  • registry settings;
  • serial configuration;
  • driver versions;
  • screenshots;
  • cable pinouts;
  • captured protocol traffic.

A working old installation may be the best documentation available.


Further technical guides

More detailed material on legacy serial systems and software recovery:

About

Maintained by Gabor Boglar, legacy software engineer working with VB6, Delphi, serial communication, legacy databases and undocumented systems.

BOGLAR.NET — Legacy Software Engineering

About

Practical RS-232 troubleshooting reference for legacy software, serial devices and undocumented communication systems.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors