Skip to main content

Null modem connection

Short answer

Without handshaking, only TXD, RXD, and GND are crossed, and local loops emulate ready signals; flow control relies on software. With handshaking, RTS/CTS and DTR/DSR lines are cross-connected to allow hardware flow control, preventing overrun.

Explain how communication takes place between two data terminal equipment (DTE) in a null modem connection, with and without handshaking.

A null modem connection joins two DTEs (e.g. two PCs) directly by a cable (or adapter) that crosses the transmit/receive and handshake lines, so each DTE sees the other as a DCE. No modem is needed.

1. Null modem without handshaking (three-wire)

Only TXD, RXD and ground are used. TXD of each is connected to RXD of the other; the handshake pins at each connector are shorted locally, so the software always sees "ready". In the sketches, the number after each arrow is the pin on DTE B.

 DTE A                               DTE B
 TXD  2 ---------------------------> 3  RXD
 RXD  3 <--------------------------- 2  TXD
 GND  7 --------------------------- 7  GND
 (local loops at each end:  RTS 4 - CTS 5 ;  DTR 20 - DSR 6 - DCD 8)

Communication: A sends on TXD and B receives on RXD; B sends on its TXD and A receives. Both directions work together (full duplex). The sender cannot know whether the receiver is ready, so software flow control (XON/XOFF) or a low speed is required, otherwise data may be lost when the receiver is slow.

2. Null modem with handshaking (full handshake)

Control lines are cross-connected so the hardware tells each side when the other is ready.

 DTE A                               DTE B
 TXD  2 ---------------------------> 3  RXD
 RXD  3 <--------------------------- 2  TXD
 RTS  4 ---------------------------> 5  CTS
 CTS  5 <--------------------------- 4  RTS
 DTR 20 -------------------------+-> 6  DSR
                                 +-> 8  DCD
 DSR  6 <-+------------------------- 20 DTR
 DCD  8 <-+
 GND  7 --------------------------- 7  GND

Sequence: A raises DTR, so B sees DSR and DCD high (A is on-line). When A is ready to receive, it raises RTS; B sees this on its CTS input and may send. If A's buffer becomes full, A drops RTS, B's CTS goes low and B stops sending until A is ready again. The same happens in the other direction (B's RTS to A's CTS). In this way hardware flow control prevents overflow.

PointWithout handshakingWith handshaking
Wires37 or more
Flow controlSoftware (XON/XOFF)Hardware (RTS/CTS, DTR/DSR)
Reliability at high speedLowerHigher
UseSimple, short linksFile transfer, fast links

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 3 questions →