Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

DTR Meaning: Data Terminal Ready & What to Check

· 6 min read · Home Tech

In this article
  1. Background: Where DTR Comes From
  2. How DTR Works in Practice
  3. What to Check When DTR Isn't Working
  4. Common Problems and Misconceptions
  5. DTR vs. Other Control Lines
  6. How to Use DTR in Your Projects
  7. Safety and Accuracy Notes
  8. Frequently Asked Questions

Data Terminal Ready (DTR) is a control signal in RS-232 serial communication that tells the connected device (like a modem or another computer) that your equipment is powered on and ready to exchange data. If you're troubleshooting a serial connection that won't establish, checking DTR is one of the first things to do—here's what it means and exactly what to verify.

Background: Where DTR Comes From

DTR is part of the original RS-232 standard, developed in the 1960s to standardize how computers and telecommunication equipment talk to each other. In a typical setup, a DTE (Data Terminal Equipment, like a computer or terminal) connects to a DCE (Data Circuit-terminating Equipment, like a modem) using a cable with multiple pins. The DTE sends DTR on pin 4 of a DB-9 connector (pin 20 on DB-25). The DCE monitors this line to know if the terminal is alive and ready.

When DTR is high (positive voltage, typically +3 to +15V), it signals "I'm here and ready." When low (negative voltage), it signals "I'm busy or powered off." This simple on/off signal became the foundation for many handshaking protocols.

How DTR Works in Practice

DTR is one of several control lines in RS-232. It's often paired with DSR (Data Set Ready), which the DCE sends back to confirm it's ready. The typical sequence is:

  1. The DTE asserts DTR when it's powered on and its software is ready.
  2. The DCE sees DTR and responds by raising DSR.
  3. Once both are high, data can flow.

In modern systems, DTR is also used for other purposes. For example, some devices use DTR to reset a microcontroller or to switch between data and command modes. In RS-232 to USB adapters, the USB chip often emulates DTR to maintain compatibility with software that expects it.

What to Check When DTR Isn't Working

If your serial device isn't communicating, here's a systematic way to check DTR:

  • Verify the pinout: Ensure you're using the correct cable. A null-modem cable swaps transmit and receive lines, but DTR is usually straight-through. Check if your cable is wired for DTE-to-DCE (straight) or DTE-to-DTE (null modem).
  • Check the terminal software settings: In programs like PuTTY, minicom, or HyperTerminal, look for a "DTR" option. Some software lets you set DTR on/off or toggle it manually. Make sure it's set to "on" or "auto."
  • Measure the voltage: Using a multimeter, probe pin 4 (DTR) relative to pin 5 (ground) on the DTE side. You should see a positive voltage (typically +5V to +12V) when DTR is active. If it's 0V or negative, the DTR signal isn't being asserted.
  • Test with a loopback: Connect pins 4 and 6 (DTR and DSR) together on the DTE side. If the software reports DSR as active, then the DTR line is working at the hardware level.
  • Check the cable and connectors: A broken wire or cold solder joint can kill DTR. Try a known-good cable if possible.
  • Inspect the USB adapter (if used): USB-to-serial adapters sometimes have drivers that don't handle DTR correctly. Update the driver or try a different adapter.

Common Problems and Misconceptions

One common misconception is that DTR must be high for any serial communication to work. In reality, many simple serial connections (like a GPS receiver sending NMEA sentences) don't use DTR at all—they just send data without handshaking. DTR becomes critical when the device expects it to switch modes or when hardware flow control is used.

Another issue is confusing DTR with RTS (Request to Send). RTS is used for flow control (to pause data when the buffer is full), while DTR is a general readiness signal. They serve different purposes, and mixing them up leads to confusing troubleshooting.

Also, some devices use DTR as a power control: they go into sleep mode when DTR is low and wake up when it goes high. If your device seems unresponsive, check if DTR is being toggled unexpectedly by your software.

DTR vs. Other Control Lines

To fully understand DTR, it helps to see it in context with other RS-232 lines:

  • DTR (Data Terminal Ready): DTE to DCE, indicates terminal readiness.
  • DSR (Data Set Ready): DCE to DTE, indicates modem readiness.
  • RTS (Request to Send): DTE to DCE, asks permission to send data.
  • CTS (Clear to Send): DCE to DTE, grants permission to send.
  • DCD (Data Carrier Detect): DCE to DTE, indicates a carrier signal is present (e.g., on a phone line).
  • RI (Ring Indicator): DCE to DTE, indicates an incoming call.

In a typical modem connection, DTR must be high before the modem will dial or answer. If DTR drops, the modem hangs up. This is why some modems have a "DTR dialing" feature—they dial when DTR goes high.

How to Use DTR in Your Projects

If you're building your own serial interface, you can use DTR creatively. For example, many Arduino boards use DTR to auto-reset when you open a serial monitor. The USB-to-serial chip toggles DTR low briefly, which resets the microcontroller. If you're having trouble uploading code, check if DTR is causing unwanted resets.

For debugging, you can intentionally control DTR from software. In Python, the pyserial library allows you to set ser.dtr = True or False. This is useful for testing how a device responds to DTR changes.

Safety and Accuracy Notes

When measuring DTR voltages, be careful not to short pins. RS-232 voltages are low (typically ±12V), but they can still damage sensitive components if miswired. Always power off equipment before connecting or disconnecting cables.

Also, note that RS-232 levels are not TTL levels. A high DTR is a negative voltage (like -12V) on the wire, but when you read it with a microcontroller, you'll see the inverted logic. Many USB adapters handle this conversion internally, but if you're building your own interface, you need a level shifter like a MAX232 chip.

Frequently Asked Questions

Does DTR need to be high for serial communication?

Not always. Many devices ignore DTR entirely and just send data. However, if a device is designed to wait for DTR before transmitting (like some modems), then yes, it must be high. Check your device's datasheet to see if DTR is required.

What happens if DTR is low?

If DTR is low, the DCE (modem or other device) may assume the terminal is off or busy. It might refuse to answer calls, hang up an active call, or switch to a low-power state. In some cases, the device may still send data, but it's not guaranteed.

How do I test if DTR is working?

Use a multimeter to measure voltage between pin 4 (DTR) and pin 5 (ground) on the DTE side. When the software asserts DTR, you should see a positive voltage (typically +5V to +12V). Alternatively, use a loopback plug that connects DTR to DSR and check if the software reports DSR active.

Can I use DTR to power a circuit?

DTR can supply a small amount of current (typically a few milliamps) at RS-232 voltage levels. Some low-power devices (like simple LED indicators) can be powered from DTR, but it's not a reliable power source for anything substantial. Always check the current rating of your RS-232 driver.

Why does my USB-to-serial adapter not show DTR?

Some cheap USB adapters don't expose all RS-232 pins. Check the product specifications—if it only lists TX, RX, and GND, it likely doesn't support DTR. You may need a more complete adapter or a different driver that emulates DTR.

What's the difference between DTR and DSR?

DTR is sent from the terminal (DTE) to the modem (DCE), indicating the terminal is ready. DSR is sent from the modem to the terminal, indicating the modem is ready. They are complementary signals in the handshake process.