How to Make a Null Modem Cable: A Complete DIY Guide

Learn to wire a null modem cable for direct RS-232 PC-to-PC communication. This step-by-step guide covers pinouts, required tools, testing, and safety tips to build a reliable, hand-made cable.

Modem Answers
Modem Answers Team
·5 min read
Null Modem Cable DIY - Modem Answers
Photo by Felix-Mittermeiervia Pixabay
Quick AnswerSteps

According to Modem Answers, you can build a null modem cable by crossing the TX and RX wires between two DB9 connectors and wiring ground and optional handshaking lines as needed. This direct serial link enables PC-to-PC communication without a modem, using basic hand tools and careful testing.

What is a null modem cable, and when you need one?

A null modem cable is a direct RS-232 serial link that connects two DTE devices like computers, routers, or equipment with DB9 serial ports. It removes the need for a modem in the path by crossing the transmit and receive lines and managing handshake signals. Home labs and field service techs often use a null modem cable to quickly transfer data between devices, debug serial consoles, or perform firmware updates on equipment that still speaks RS-232.

In practice, a null modem cable is two DB9 connectors wired so that the TX from one end goes to the RX of the other end, and vice versa. Common variants also swap RTS and CTS and, in some cases, DTR/DSR lines to enable hardware flow control. The key is to follow a consistent pinout on both ends so devices can interpret the signals correctly. When you see a DB9 port labeled DTE on one device and DCE on the other, you’ll be in good shape, because this arrangement is designed for direct host-to-host communication.

For people troubleshooting serial equipment, having a Null modem cable on hand saves time and avoids the complexity of a USB-to-serial adapter in some setups. Modem Answers emphasizes starting with a simple, documented pinout and only adding handshake wires if the devices you connect actually require them. This approach keeps your wiring manageable and reduces chances of miswiring. If you’re new to RS-232, take a moment to review the pin functions before you start wiring. It’s easy to mix up TX and RX or mislabel a ground wire, and those mistakes can lead to no communication or, in rare cases, device damage. As you’ll see in the next sections, a small amount of planning pays off in reliable results.

Tools & Materials

  • Two DB9 connectors (female and male or two of the same gender for adapters)(One end will attach to each device; ensure compatibility with the devices you plan to connect.)
  • 22-24 AWG stranded wire (2-3 color-coded pairs)(Use shielded wire if possible to reduce EMI.)
  • Crimping tool with DB9 contacts(Essential for secure, repeatable terminations.)
  • Wire stripper and knife(Strip insulation cleanly without nicking conductors.)
  • Soldering iron and solder (optional but recommended)(Use for extra-secure joints or if you prefer soldering over crimping.)
  • Heat shrink tubing or electrical tape(Seal joints and provide strain relief.)
  • Multimeter or continuity tester (optional)(Verify pin-to-pin connections before final assembly.)
  • Labeling supplies (marker or heat-shrink with tags)(Label ends to avoid cross-wiring in the field.)

Steps

Estimated time: 60-120 minutes

  1. 1

    Plan length and end configuration

    Decide how long the cable needs to be and confirm the connector gender on each end (one DTE, one DCE is typical). This planning helps avoid under- or over-length wiring, which can affect signal integrity and ease of routing.

    Tip: Plan extra slack for testing and future movement of devices.
  2. 2

    Identify RS-232 pinouts for each connector

    Refer to the standard DB9 RS-232 pinout: know which pins are TXD, RXD, ground, and the handshake lines. Pin numbers differ between DTE and DCE; ensure you know which end you’re wiring as you begin.

    Tip: Keep a reference diagram handy to prevent miswiring.
  3. 3

    Cut and prepare the wires

    Cut enough wire for each conductor with a little extra length. Strip about 5-7 mm of insulation from each end, being careful not to nick the copper.

    Tip: Use color-coded wires consistently to avoid confusion later.
  4. 4

    Terminate the ends (crimp or solder)

    Attach each conductor to the correct pin on its DB9 connector per your chosen pinout. Use crimp pins for a quick build or tin the wire and solder for a more permanent connection.

    Tip: Test-fit before final sealing to confirm a solid fit.
  5. 5

    Cross TX and RX wires between ends

    Connect TX on end A to RX on end B and RX on end A to TX on end B. This cross-wiring is essential for two DTE devices to communicate.

    Tip: Double-check the cross for both data lines before continuing.
  6. 6

    Wire ground and optional handshakes

    Connect ground pins straight through (usually pin 5). If you need hardware flow control, cross RTS/CTS (and optionally DTR/DSR) as required by your devices.

    Tip: Only use handshake lines if the devices require them to avoid noise.
  7. 7

    Insulate, secure, and label

    Seal each joint with heat shrink or electrical tape. Group cables neatly and label both ends to prevent mix-ups in the field.

    Tip: Heat-shrink provides durable protection and strain relief.
  8. 8

    Test with loopback and verify

    Before connecting to terminal hardware, perform a loopback test (TX to RX on one end) to confirm basic electrical connectivity. Then test with actual devices at a low baud rate.

    Tip: If the loopback fails, re-check wiring and joint quality.
Pro Tip: Use shielded twisted pair to minimize interference on longer runs.
Warning: Never connect power or shield conductors to unrelated circuits; RS-232 is a signal-level interface and miswiring can damage devices.
Note: Label both ends clearly and keep the pinout consistent across the cable to simplify future maintenance.
Pro Tip: Choose the simplest handshaking option that your devices require; add CTS/RTS only if you observe contention or garbled data.
Pro Tip: Keep wire length practical—shorter is generally more reliable for RS-232 in non-industrial environments.

FAQ

What is a null modem cable and when should I use one?

A null modem cable is a direct RS-232 serial link that connects two DTE devices by crossing TX and RX lines and wiring ground and optional handshakes. Use it for PC-to-PC communication, serial console access, or when you need a quick data link without a modem.

A null modem cable lets two serial devices talk directly by crossing the data lines and linking grounds.

Do I always need RTS/CTS handshaking for a null modem cable?

No. For simple data transfer, you can omit RTS/CTS. Enable hardware flow control only if both devices support it and you’ve verified it improves reliability in your setup.

Only use RTS/CTS if both devices require it; otherwise, you can skip it.

Can I use standard USB-to-serial adapters with a null modem cable?

You can use a USB-to-serial adapter on one or both ends, but the null modem cable itself remains a straight pin-to-pin cross. Ensure the adapters are compatible with RS-232 signaling and baud rates you intend to use.

A USB-to-serial adapter can work with a null modem cable if it supports RS-232 and matches the baud rate.

What if my devices still don’t communicate after building the cable?

Double-check the pinout on both ends for TX/RX and ground. Re-test the cable with a loopback, verify handshake wiring, and ensure devices are configured to the same baud rate and settings.

If there’s no communication, re-check wiring and device settings step by step.

Is there a danger of damaging equipment when wiring a null modem cable?

Incorrect pinouts or mixed grounds can cause communication errors or potential device damage. Use careful testing, verify pinouts, and avoid powering devices during initial wiring checks.

Be careful with wiring—verify pins before powering devices.

How can I test a completed null modem cable quickly?

Use a loopback test on one end and a terminal program to send and receive data. Confirm that what you type is echoed back and that characters are transmitted reliably.

Test with a loopback and a simple terminal program to confirm data flow.

Watch Video

Key Takeaways

  • Cross TX and RX pins on both ends
  • Connect grounds to share a common reference
  • Test wiring with a loopback before real use
  • Document and label pinouts for future repairs
Tailwind infographic showing the wiring process for a null modem cable
Process diagram: null modem cable wiring steps

Related Articles