| |

RS232 to Ethernet Cable Pinout: Two Common Wiring Diagrams

RJ45 Ethernet connector pinout and color code chart using T568B standard for RS232 extension

The โ€œTX/RX Crossโ€ Mystery: Null Modem vs. Straight-Through

The most common reason for a “silent” connection is getting the TX and RX lines backward.

Three wires are all you need for basic communication:

SignalPurpose
TX (Transmit)Sends data out
RX (Receive)Receives data in
GND (Ground)Reference for both signals

The Rule: TX on one end connects to RX on the other. Data needs a path, and ground gives it a reference. Why cross them? Because one deviceโ€™s โ€œtransmitโ€ must go to the other deviceโ€™s “receive.” If you connect TX to TX, nothing happensโ€”they are both trying to talk, and nobody is listening.

Identifying Your Device: DTE vs. DCE

To get the wiring right, you must identify your device type:

  • DTE (Data Terminal Equipment): Like your PC or a PLC.
  • DCE (Data Communication Equipment): Like a modem or some Ethernet converters.

When to cross: If you connect two DTE devices (like a PC to a PLC), you must use a Null-Modem cable to cross pins 2 and 3. It is essential to keep these roles seperate to avoid damage or communication silence.

Diagram showing RS232 TX and RX cross wiring rule for industrial serial communication

Core Connector Pinouts: DB9 and RJ45

DB9 Connectors (The Traditional Standard)

Most RS232 devices use a DB9 connector. DB9 pins are numbered, and for standard communication, you only care about three:

PinSignal
2RX
3TX
5GND

If both ends are DB9: You need a null-modem cable that crosses pins 2 and 3.

  • Converter pin 3 โ†’ Device pin 2
  • Converter pin 2 โ†’ Device pin 3
  • Pin 5 โ†’ Pin 5
DB9 to DB9 null modem crossover cable pinout diagram showing pins 2 and 3 swapped

RJ45 Pinout (T568B Standard)

Ethernet cable uses 8 wires with standard colors. The T568B wiring is most common:

PinColorTypical Ethernet Use
1White/OrangeTX+
2OrangeTX-
3White/GreenRX+
4BlueUnused
5White/BlueUnused
6GreenRX-
7White/BrownUnused
8BrownUnused

For RS232, we only need a few of these wires. You can assign colors yourselfโ€”just write down what you used.

RJ45 Ethernet connector pinout and color code chart using T568B standard for RS232 extension

RS232 (DB9) to RJ45 Pinout Visualizer

Select an industrial preset or configure custom mapping to generate your wiring diagram.

DB9 Connector RJ45 Ethernet

*Standard EIA-561 mapping. Handshake pins omitted for 3-wire operational clarity.

๐Ÿšจ

CRITICAL BURN HAZARD

This is a passive pinout. NEVER plug this RJ45 end into an active PoE switch. 48V PoE power will instantly bypass the DB9 shell and fry your PLC/device motherboard.

โš ๏ธ

15-Meter Distance Limit

Passive cables longer than 50ft will suffer severe packet drop and ground loop interference.

Need safe network access? Use an Isolated Serial-to-Ethernet Gateway →
RS232/RS485 Field Cheat Sheet
A3 Printable

๐Ÿ› ๏ธ RS232/RS485 Field Cheat Sheet (PDF)

The complete physical layer reference guide. Formatted for high-res A3 printing. Download it directly for your toolboxโ€”no email required.

Download High-Res PDF

Feel free to print it out and pin it on your server rack.

Three Common Industrial Scenarios

Scenario 1: DB9 to RJ45 (The Console Standard)

Many devices, such as PLCs, door controllers, and network switches, use RJ45 jacks for their serial ports. To connect these to your computer, you need a cable going from the RJ45 port on the device to the DB9 port on your computer.

Standard DB9 to RJ45 Pinout:

RJ45 PinDB9 PinSignal
12RX
23TX
35GND
4-8Not connected

This wiring follows the standard DTE (Data Terminal Equipment) configuration, which is the case for almost all modern computers.

DB9 female to RJ45 male serial console cable wiring diagram for PLC and switch connection

If your device is DCE (Modems or specific converters):

RJ45 PinDB9 PinSignal
13TX
22RX
35GND

Always check the manual of your specific equipment. Manufacturers like Cisco, Digi, and Siemens often have their own pinout standards.

Scenario 2: Terminal Blocks

Common in industrial converters, these feature three screws labeled TX, RX, and GND:

TerminalConnect To
TXDevice’s RX
RXDevice’s TX
GNDDevice’s GND
Industrial RS232 3-wire terminal block connection showing TX, RX, and Ground wiring

Scenario 3: Using Ethernet Cable as RS232 Extension

The RS232 standard technically limits communication to 15 meters (roughly 50 feet). Beyond that, signal degradation and noise become significant issues. Ethernet cable (Cat5e or better) is an excellent option for extending this range because its twisted pairs help negate interference.

For Longer Runs: If you must go further using Cat5 or Cat6, you need to lower the baud rate (e.g., from 115200 to 9600) to compensate for signal loss and capacitance.

If both ends are DTE (computer to computer, or computer to most equipment):

RJ45 End ARJ45 End BSignal
12TX โ†’ RX
21RX โ†’ TX
33GND โ†’ GND
All othersNot connected

This is a null modem crossover cable. TX on one end goes to RX on the other.

RJ45 to RJ45 null modem crossover wiring diagram for extending RS232 over Cat5e cable

If one end is DTE and the other is DCE (rare):

RJ45 End ARJ45 End BSignal
11TX โ†’ TX
22RX โ†’ RX
33GND โ†’ GND

What About Flow Control (RTS/CTS)?

The setups above use only three wires, which is sufficient for most applications as many devices don’t require hardware flow control. However, if your device requires RTS/CTS:

SignalRJ45 PinDB9 Pin
RTS47
CTS58

Use the same color scheme throughout and document it. You’ll thank yourself later when troubleshooting.

The $5,000 Grounding Mistake

You have to connect ground every time. Without it, the signals have no reference. Data will be garbled or completely missing. But hereโ€™s the nuance: shield ground is not the same as signal ground.

  • Signal ground (pin 5 on DB9) carries the reference voltage for the data. It must be connected.
  • Connecting the shield at both ends creates ground loopsโ€”current flows through the shield, inducing noise on your data lines. This is a common but costly mistake.
RS232 serial cable shield grounding diagram illustrating how to prevent ground loops and EMI noise

Systematic Troubleshooting: The Loopback Test

When your wiring seems okay but nothing is working, do not guess. Test it. The Loopback Test is a way to isolate the problem on your own without special tools.

  1. Disconnect the cable at the device end.
  2. Jumper TX to RX: Use a small wire to connect the Transmit pin to the Receive pin on the connector.
  3. Send Data: Use a terminal program (like Putty). If what you type appears on the screen, your converter and cable are perfect. If not, the link is broken.

Decision Flowchart: When It Doesnโ€™t Work

Step-by-step troubleshooting flowchart for industrial RS232 to Ethernet communication failures
SymptomLikely CauseFix
No dataTX/RX swappedSwap pins 1 and 2
Garbled dataWrong baud rate, or ground missingCheck settings, verify GND connected
Intermittent connectionBad crimp or solderRe-do the connector
Nothing worksUsing Ethernet switch in betweenYou cannot put RS232 through a switch. It’s point-to-point only.

A Note on Voltages and Isolation

One important note before you connect your custom cable: Standard RS232 signals swing between+12V and -12V. If your receiving end expects 0-5V TTL (like many microcontrollers), or if someone accidentally patches this RJ45 into an active PoE port (48V), hardware damage is almost guaranteed.

When to Move Beyond Passive Cables

Passive DIY cables are great for local, temporary troubleshooting. But for permanent factory floor deployments, the industry standard has shifted away from running long serial lines. The risks of ground loops (like the $5,000 mistake mentioned earlier) and EMI noise are just too high.

Instead, the reliable approach is to use Active Serial Servers at the edge. This provides optical/magnetic isolation to protect the PLC motherboards, and encapsulates the serial data into TCP/IP packets so it can route safely across your existing Ethernet LAN.

If your project requires true network encapsulation rather than physical wiring extensions, you will need to actively route your data. Read our step-by-step technical guide on how to convert RS232 to Ethernet using active gateways to learn about TCP/UDP modes and Virtual COM setups.

Looking for hardware? Review our isolated Serial-to-Ethernet server specs โ†’


Frequently Ask Questions

Will plugging my DIY RS232-to-RJ45 cable into a PoE switch damage my equipment?
Yes, it is highly likely. Standard RS232 chips are designed to handle ยฑ15V maximum. Power over Ethernet (PoE) switches can send between 48V and 54V DC through the line.

โš ๏ธ Overvoltage Warning: If you plug your serial device into a live PoE port by mistake, the 48V surge will instantly bypass the transceiver and destroy the equipment’s motherboard. Always label your serial-over-Cat5 ports clearly.
Can I use a standard “Cisco Console Cable” (light blue) for any industrial RJ45 serial port?
No. There is no standard for RS232 over RJ45 . Cisco uses a proprietary pinout in a cable called a โ€œrollover.โ€ If you’re using this cable on other devices ( say an APC UPS or a standard PLC ) it can short out the wrong pins and damage your hardware . Always check the manufacturerโ€™s pinout before connecting.
How can I safely verify my custom RJ45 to DB9 cable works before connecting my PLC?
The safest method is a Local Loopback Test using your PC. Disconnect the cable from your industrial equipment. Use a small wire or paperclip to temporarily short the TX and RX pins on your newly crimped connector. Open a terminal program like PuTTY on your PC and type. If the characters you type echo back on the screen, your cable’s wiring and pinout are mathematically correct.
My cable passes the continuity test, but data becomes garbled when factory motors turn on. Why?
If the pinout is correct, the issue is almost certainly Electromagnetic Interference (EMI) or a ground loop. RS232 signals are unbalanced and highly susceptible to electrical noise over long runs. Ensure the signal ground (Pin 5 on DB9) is connected. If using shielded Cat5e cable, ensure the shield is grounded at one end only to prevent inducing current loops on your data lines.
I extended RS232 over the network, but legacy CNC software only accepts COM1/COM2. How do I input an IP?
Legacy software cannot natively route traffic to IP addresses. You must bridge this gap by installing a Virtual COM (VCOM) driver on your PC. This software intercepts your legacy application’s local COM port requests and transparently encapsulates/redirects them over the Ethernet network to your Serial Device Server.
My physical wiring to the serial server is perfect, but my SCADA system still cannot read the sensor data.
Physical wiring only establishes the hardware layer. If your main SCADA system uses Modbus TCP (over Ethernet) and your end-device uses Modbus RTU (over Serial), the data formats are completely incompatible. You must log into your serial server’s web interface and configure it as a Modbus Gateway to actively translate RTU payloads into TCP packets.

โ€œAt Valtoris, we design and manufacture active industrial networking gear (like LTE routers and IP serial servers). So why provide a DIY passive wiring guide? Because our engineers started in the field, too. We know what itโ€™s like to be stuck on a factory floor at 2 AM, desperately needing to splice a CAT5 cable to a DB9 port just to get a legacy PLC talking again. We provide these diagrams to help you get out of a jam today. Because we understand the value of knowing the physical layer inside and out. When your topology outgrows passive cabling and requires active TCP/IP routing, you’ll know exactly why.โ€

Still Getting Garbage Data?

Passive DIY cables are fine for 5-meter desk tests, but they fail on the factory floor due to voltage drops, ground loops, and EMI noise. Stop stripping wires and hoping for the best.

Bypass physical distance limits entirely by upgrading to an active Serial-to-Ethernet Converter. Isolate your PLC and tunnel RS232 safely over your existing IP network.

Explore Industrial Serial Servers โ†’