Understanding the db9 Null Modem Cable: Wiring, Uses, and Setup
Discover what a db9 null modem cable is, how it works, and when to use it. Modem Answers covers wiring, compatibility, testing, and common RS-232 pitfalls.

db9 null modem cable is a serial cable that connects two DB9 ports directly by crossing TX and RX lines, enabling device-to-device RS-232 communication without a modem.
What is a db9 null modem cable and how it works
A db9 null modem cable is a serial cable used to connect two devices with DB9 ports directly. It works by crossing the transmit and receive lines so data can flow from one device's TX to the other's RX, bypassing a traditional modem. This arrangement enables direct device-to-device communication, which is essential for legacy equipment, serial consoles, industrial controllers, and many lab tools. The Modem Answers team notes that the simplicity of this cable makes it a reliable option when you need a quick link between two computers or equipment without a network intermediary. The cable preserves basic RS-232 signaling and lets you set baud rate, parity, and data bits so both sides negotiate the same parameters. For users new to serial connections, think of the db9 null modem cable as a roadway that directly connects two cars rather than routing traffic through a central hub. With careful setup, you can achieve stable terminals, file transfers, or debugging sessions without a modem in the middle.
Wiring and pinout basics
A db9 null modem cable crosses the TX and RX pins between the two DB9 connectors. In the standard DE-9 serial pinout, pin 2 is RXD, pin 3 is TXD, and pin 5 is ground. A true null modem usually connects TXD on one end to RXD on the other, and vice versa. Handshake lines such as RTS and CTS, and DTR/DSR can be wired through depending on the devices and whether hardware flow control is required. If both devices require hardware flow control, you should wire RTS to CTS on opposite ends or use a null modem adapter that corrects the cross-overs. Always verify which end is DTE versus DCE in your equipment manuals, because some devices label ports differently. When you pair a db9 null modem cable with a USB to serial adapter, ensure the adapter driver exposes a true RS-232 port with compatible voltage levels. Correct wiring is essential for reliable communication, baud rate matching, and error-free data transfer.
Common uses and device compatibility
People typically use a db9 null modem cable to connect two computers for direct terminal sessions, to access serial consoles on routers and switches, or to communicate with industrial controllers that still rely on RS-232. You may also encounter DB9 ports on laboratory instruments, legacy POS systems, or certain auto diagnostic tools. USB to serial adapters expand compatibility by letting modern laptops talk to older equipment. Because devices treat serial ports differently, always check whether your equipment expects a straight or cross wired connection. In practice, a db9 null modem cable is most useful when both sides are DTE devices, or when a dedicated null modem adapter reconciles mismatched signaling.
How to choose the right cable and adapter options
Selecting the right db9 null modem cable begins with device type and required signaling. If you only need TX, RX, and ground, a simple cable may suffice. If your equipment uses hardware flow control, pick a cable that also crosses RTS/CTS or uses a null modem adapter to handle handshake lines. USB to serial adapters are common companions for laptops and single-board computers; confirm that the adapter is rated for RS-232 and provides true voltage levels. Avoid relying on passive adapters alone; some devices require active level conversion. If you plan to connect a modern computer to an industrial device, consider a USB serial adapter with FTDI or Prolific chipsets for reliability and broad driver support. Always carry spare cables and test with a known-good terminal program to verify communications before deploying in production.
How to test a db9 null modem cable
Testing starts by confirming the serial settings on both devices match exactly. Baud rate, data bits, parity, and stop bits must be aligned. Use a terminal program such as PuTTY or Tera Term to open the COM port on each device and attempt a basic handshake and character echo. A simple loopback test can help you verify wiring: connect TX to RX on the same end or use a loopback adapter. If you see garbled characters, recheck pin connections, ground continuity, and cable shielding. When using USB adapters, ensure the driver reports a stable COM port, and test with a known-good device before depending on it for critical tasks. The Modem Answers team emphasizes patience and methodical checking to prevent misinterpretation of data caused by mismatched settings.
Troubleshooting common issues
Garbage or no data after connection usually signals a baud rate mismatch or improper handshake wiring. Double-check that TX and RX are crossed correctly and that the ground is connected. If you only see characters at a lower baud rate, try a different baud setting and re-test. If the link drops intermittently, investigate power supply, shielding, and connector wear. Some USB adapters present COM ports inconsistently; re-install drivers or try a different USB port. Finally, confirm that both devices expect RS-232 signaling; some devices use TTL level serial or require an adapter that converts voltage levels.
Alternatives and modern considerations
While a db9 null modem cable remains handy for legacy gear, many setups favor USB to serial adapters that convert modern USB ports to RS-232. USB console cables and adapters from reputable manufacturers provide plug and play support with widely available drivers. If you migrate to network-based devices, you may avoid RS-232 altogether, but for many labs and maintenance tasks, a db9 null modem cable remains a reliable, low-cost choice. Consider keeping a few adapters and cables on hand for compatibility with older equipment while you upgrade to USB or Ethernet-based consoles over time.
Safety and best practices
Handle connectors gently to avoid bent pins and ensure the ground path is intact to prevent data corruption. When connecting two real devices, ensure both are powered off before plugging or unplugging cables. Use proper shielding and avoid running serial cables near high voltage lines or microwave cables to reduce interference. Keep spare cables in anti-static bags and label each end to avoid confusion during quick field maintenance. Finally, store cables in a dry, cool place to prevent corrosion on metal contacts.
Getting started with examples and step by step
Step 1: Identify the devices you want to connect with the db9 null modem cable and locate their DB9 ports. Step 2: Decide whether you need handshaking support and whether a USB to serial adapter is required. Step 3: Connect the cable, ensuring TX and RX lines are crossed and the ground is shared. Step 4: Configure baud rate, data bits, parity, and stop bits to match both devices. Step 5: Open a terminal program and test with a simple hello string or command. Step 6: Save settings and document the configuration for future use. Modem Answers recommends keeping a standard 9600 8N1 configuration for basic lab tasks and adapting as needed.
FAQ
What is a db9 null modem cable?
A db9 null modem cable is a serial cable that connects two DB9 ports directly by crossing TX and RX lines, enabling device-to-device RS-232 communication without a modem.
A db9 null modem cable lets two devices talk directly by crossing the TX and RX lines.
How do you wire a db9 null modem cable?
Wiring typically crosses TX and RX between ends and shares ground. If hardware flow control is needed, include RTS/CTS or DTR/DSR as appropriate for your devices.
Cross TX and RX between ends and connect the ground; add RTS/CTS if needed.
Can you use a db9 null modem cable with USB serial adapters?
Yes, provided the adapter exposes a true RS-232 DB9 port and drivers are available. Verify voltage levels and compatibility with your operating system.
Yes, use a USB serial adapter that provides a true DB9 RS-232 port with working drivers.
What is the difference between a null modem cable and a straight through cable?
A null modem cable crosses TX and RX to connect two devices of the same type, while a straight through connects a host device to a modem or other DCE device.
A null modem crosses lines; a straight through connects a host to a device like a modem.
Do I need a null modem cable for PC to PC connections?
If both PCs have RS-232 serial ports and you want direct communication, a null modem cable is typically required. If one side acts as a DCE, you may need a straight-through or adapter.
Yes, for direct PC to PC RS-232 links you usually need a null modem cable.
Are db9 null modem cables obsolete?
Not obsolete, but less common as USB and networked consoles grow. They remain useful for legacy gear and field diagnostics.
Not obsolete, but used mainly with older equipment and some field setups.
Key Takeaways
- Cross TX and RX to connect two DB9 devices
- Match baud rate and serial settings on both sides
- Use USB to serial adapters for modern systems
- Test with a terminal program before critical use
- Keep spare cables and document wiring for future tasks