PortDock

RS-232 DB9 pinout and null-modem (crossover) cable wiring

PC COM port DB9 pins 1–9 (TxD 3, RxD 2, GND 5), straight vs null-modem cables, 3-wire and full RTS/CTS/DTR wiring, and what to check when nothing arrives.

Tools for this guideSerial Windows program · freePort Inspector Windows program · freeASCII Table & Control Characters web · no installUART Baud Rate Error Calculator web · no install

When an RS-232 device does not answer, the most common cause is that transmit and receive are not crossed — or crossed twice. PC COM ports and USB-RS232 adapters use a fixed 9-pin (DB9) pinout, so putting it next to the device manual's pin table tells you which cable you need.

PC (DTE) DB9 pinout

DB9 pinSignalAt the PCDB25 pin
1DCD (Carrier Detect)in8
2RxD (Receive Data)in3
3TxD (Transmit Data)out2
4DTR (Data Terminal Ready)out20
5SG (Signal Ground)—7
6DSR (Data Set Ready)in6
7RTS (Request To Send)out4
8CTS (Clear To Send)in5
9RI (Ring Indicator)in22

The table follows the Linux Documentation Project's Serial-HOWTO. Pins 2 and 3 have opposite meanings on 9-pin and 25-pin connectors (TxD is pin 3 on DB9 and pin 2 on DB25), and ground is pin 5 on DB9 and pin 7 on DB25 — which is why a DB9-to-DB25 adapter connects signal to signal, not pin 1 to pin 1.

Straight-through vs null modem

Null-modem wiring between two DB9s: pin 3 TxD crossed to pin 2 RxD, pin 5 GND to GND, RTS 7 crossed to CTS 8, DTR 4 to the other side's DSR 6 and DCD 1
DB9 ↔ DB9 null-modem (crossover) wiring. The three solid wires are the minimum; dashed lines are flow control and modem control.

Null-modem wiring (DB9 ↔ DB9)

This endOther endPurpose
3 TxD→2 RxDdata
2 RxD←3 TxDdata
5 GND—5 GNDsignal ground
7 RTS→8 CTShardware flow control
8 CTS←7 RTShardware flow control
4 DTR→6 DSR · 1 DCDmodem control
6 DSR · 1 DCD←4 DTRmodem control
9 RInot connected

This is the «standard null modem cable» from the Text-Terminal-HOWTO. Some cables on the market are wired differently, so check the cable's diagram when you use flow control.

Are three wires enough?

If neither side uses flow control (flow control «none» in the terminal program), crossing TxD and RxD and joining GND is enough. If a device only transmits when an input such as CTS or DSR is on and the cable lacks that wire, the same document describes the old trick of looping RTS to CTS and DTR to DSR and DCD inside each connector so each side «permits itself». Follow the device manual's flow control setting to decide.

When nothing arrives

In PortDock

Published 2026-10-23