| |

RS232 to Ethernet Cable Pinout: Two Common Wiring Diagrams

RJ45 connector with pins 01 48 24

๐Ÿ” Technical Review & Standards Reviewed by the Valtoris Industrial Networking Team. > The wiring diagrams provided in this guide strictly adhere to EIA/TIA-232-F serial communication standards and TIA/EIA-568-B Ethernet cabling specifications to ensure safe signal transmission.

If you looked up “rs232 to ethernet cable pinout” you are probably thinking of two things.

  • You have a device with an RS232 port that uses an RJ45 connector (common on industrial PLCs, network gear, and access control systems). You need to connect it to your computer’s DB9 serial port.
  • You want to use cheap Ethernet cable to extend an RS232 connection beyond the standard 15-meter limit, because official RS232 cables are expensive.

Either way you need to know which wire goes where.

Lets be clear: RS232 and Ethernet are different. You can’t plug an RS232 device into an Ethernet port. Don’t expect it to work just by plugging it in. However, you can use the internal wires of an Ethernet cable to carry RS232 signals. The trick is getting the RS232 to ethernet pinout right.

โš ๏ธ Crucial Note Before You Wire: A DIY RS232-to-RJ45 cable is a passive connection. It simply uses Ethernet wires to carry serial signals up to 15 meters. It will NOT put your RS232 device onto your local IP network (LAN). > If you need to access your serial device via an IP address, or want to connect it to an Ethernet switch, a passive cable will fail (and may burn your board if plugged into PoE). True network access requires an active conversion architecture to encapsulate serial payloads into TCP/IP packets.

Hereโ€™s a number that might surprise you: RS232 is still used in 30โ€“40% of industrial equipment โ€”PLCs, scales, CNC machines, medical devices, and test equipment. Itโ€™s been around since 1969, and itโ€™s not going away anytime soon.

But hereโ€™s the frustrating part: 25โ€“30% of communication failures in serial networks come from simple wiring errors. Another 15โ€“20% come from grounding mistakes. If youโ€™ve ever connected everything โ€œcorrectlyโ€ and gotten nothing but garbage data or dead silence, youโ€™re not alone. This guide covers not just what connects where, but why it works that way, andโ€”most importantlyโ€”what to check when it doesnโ€™t.

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 crossover connection to swap pins 2 and 3. Understanding the exact null modem cable pinout is essential to keep these TX/RX roles separate and avoid communication silence.

Null Modem Crossover Diagram

โš ๏ธ Stuck on RX/TX Swap? Check your Frame with our Modbus CRC Calculator

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
5 3 2 DB9 NULL-MODEM (CROSSOVER) SERIAL WIRING Standard DTE to DTE connection using 3 wires DEVICE 1 (DTE) Pin 3 (TX) Pin 2 (RX) Pin 5 (GND) DEVICE 2 (DTE) Pin 3 (TX) Pin 2 (RX) Pin 5 (GND) TX โ†’ RX RX โ† TX SIGNAL GROUND

RJ45 Pinout (T568B Standard)

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

RJ45 Pinout (T568B Standard)

1
White/Orange (TX+)
2
Orange (TX-)
3
White/Green (RX+)
4
Blue (Unused for RS232)
5
White/Blue (Unused for RS232)
6
Green (RX-)
7
White/Brown (Unused)
8
Brown (Unused)

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

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 โ†’

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 RJ45 to DB9 Wiring Diagram & Pinout:
(Note: While RJ45 serial pinouts vary by manufacturer, the following uses the common EIA/TIA-561 standard mapping.)

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.

STANDARD CONSOLE CABLE WIRING

EIA/TIA-561 Mapping (DB9 Female to RJ45)

DB9 (Female) PC / Server Side 5 4 3 2 1 9 8 7 6 RJ45 (Male) Device Port 1 2 3 4 5 6 7 8 RX Data TX Data Ground

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
Terminal Block 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. When running RS232 over Cat5 (or Cat5e/Cat6) cables, the twisted pairs act as an excellent extension option to help negate electromagnetic 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.

๐Ÿ’ก Pro Tip for Distances Over 15m: Extending RS232 passively over long Cat5e runs introduces severe voltage drops and electromagnetic interference (EMI). In these scenarios, standard practice shifts from physical wiring extension to network encapsulation. By moving the RS232 signal onto the LAN at the edge, distance-based voltage drop is completely eliminated.

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 NULL MODEM CROSSOVER CABLE

For extending RS232 over Cat5e (DTE to DTE Configuration)

RJ45 (End A) Local Device 1 2 3 4 5 6 7 8 RJ45 (End B) Remote Device 1 2 3 4 5 6 7 8 TX โ†’ RX (Pin 1 to Pin 2) RX โ† TX (Pin 2 to Pin 1) Ground (Pin 3 to Pin 3)

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

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

Professional Tip: To maximize the anti-interference benefits of Cat5/6 cable, never put TX and RX on the same twisted pair. Instead, pair TX with a Ground wire and RX with another Ground wire. This gives the signal better protection and it is more stable when it has to travel a long way which is really important in noisy industrial environments.

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.

A $5,000 Lesson: A factory once put in a long RS232 cable that was connected to the ground at both ends. Every time a nearby machine started, the computer screen would flicker and crash. They lost over five thousand dollars in downtime while trying to find the error. When they removed the ground from one end of the RS232 cable the problem with the RS232 cable went away.

PROPER SHIELD GROUNDING

Eliminating Ground Loops in Industrial Environments

RS232 Converter DTE Equipment Shield Grounded Shield Unconnected Ground the shield at ONE end only to prevent ground loops.

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

SERIAL COMMUNICATION TROUBLESHOOTING

Follow this workflow to isolate wiring vs. configuration problems.

START Step 1 & 2: Physical Layer Verify cable continuity & power Pass? NO Fix Wiring or Power YES Step 3 & 4: Serial Settings Match Baud, Parity, IP & Modbus ID Match? NO Correct Software Config YES Step 5: Loopback Test Short TX to RX locally Echoes? NO Local Hardware Defect YES Check Remote End
  • Step 1: Verify Continuity Use a multimeter to confirm that TX on one end connects to RX on the other (not to itself), RX connects to TX, and GND connects to GND.
  • Step 2: Check Power Confirm both the converter and the end device are powered. If they are not, nothing works.
  • Step 3: Verify Serial Settings Baud rate, parity, data bits, and stop bits must match perfectly. A common mistake is a device at 9600 baud while the converter is at 19200.
  • Step 4: Check Software & Addresses If using Modbus, is the device ID correct? Ensure your software points to the correct COM port or IP address.
  • Step 5: Local Loopback Perform a loopback test directly on the device ports. If the device cannot read its own transmission, the problem lies within the device hardware, not the cable.
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.


Frequently Asked 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.

๐Ÿ›ก๏ธ Why Valtoris Shares This Pinout Guide

โ€œ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.โ€

๐Ÿ“š Related Industrial Connectivity Guides

If you are redesigning your serial network topology, these guides cover advanced methods to bypass physical cabling limitations:

End Physical Distance Limits

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.

Upgrade to an active Serial-to-Ethernet Converter to isolate your PLC and tunnel RS232 safely over your existing IP network:

Single Device Gateway

Perfect for networking one standalone CNC, scale, or legacy PLC.
๐Ÿ’ก Best for: Replacing broken legacy gateways 1-for-1.

View 1-Port Series โ†’

High Density Servers

Connecting multiple devices in a central server rack or control panel.
๐Ÿ’ก Best for: Control panel upgrades and saving switch ports.

View 4/8-Port Series โ†’
Explore All Industrial Serial Servers