Data Terminal Ready
Encyclopedia
Data Terminal Ready, abbreviated as DTR, is a control signal present inside an RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...

 serial communications cable that goes between a computer and another device, such as a modem. This is a one-way "high-low" signal going from the computer to the modem (or, in RS-232 terminology, "from DTE to DCE").

It is present on pin 4 of a DE-9 serial port, or pin 20 of a DB-25 port.

As used on modems

The DTR signal is one of the most important call control signals on a data modem. It is the most reliable method by which a computer tells the modem to disconnect (end) a call. Dropping the DTR from high to low for at least 2 seconds accomplishes this.

Without the DTR signal, there is only one other way to ask a modem to disconnect a call, and that is to put the modem in command mode
Command and Data modes (modem)
Command and Data modes refer to the two modes in which a computer modem may operate. These modes are defined in the Hayes command set, which is the de-facto standard for all modems...

 using an escape code (typically "+++"), and then issue the hangup command ("ATH" per the Hayes command set
Hayes command set
The Hayes command set is a specific command-language originally developed for the Hayes Smartmodem 300 baud modem in 1981. The command set consists of a series of short text strings which combine together to produce complete commands for operations such as dialing, hanging up, and changing the...

). This method is problematic and undesirable for several reasons, because the best practice for the escape code is to disable it to prevent a denial of service vulnerability (see Time Independent Escape Sequence
Time Independent Escape Sequence
The Time Independent Escape Sequence, or TIES, was a short-lived modem standard invented to avoid a patent held by Hayes Microcomputer Products...

).

When a modem is being used for automatic answering (such as with the command ATS0=1), the DTR signal confirms to the modem that the computer is available to accept a call. In their default configuration, most modems will not answer a call if the DTR signal is low, even if auto answer is enabled.

When a computer wants to place a call, it raises the DTR signal before sending commands. If the DTR signal is not high and the modem receives a "dial" command, modems will either refuse to accept commands, place the call, or they will silently disable DTR support for the duration of that call (the actual behavior dependent on the modem firmware). Such behavior can be manually overridden or configured on most newer modems.

DTR configurability on modems

Virtually all modems new enough to support error correction and data compression (all modems 9600 bps and above, and some 2400 bps ones as well) have a built-in capability of modifying what they do with RS-232 signals, depending on the application. The AT command for manipulating DTR is typically AT&D followed by a single digit. AT&D0 and AT&D2 are mandatory under V.250, and AT&D1 is optional. AT&D3 is non-standard but widely implemented, and higher values are used by some vendors.
  • AT&D or AT&D0 - Ignore DTR signal. A call will continue regardless of the DTR line, and the only way to end the call is with the escape sequence, or if it gets terminated by the other side. This setting is only used if the computer equipment cannot provide or control DTR.
  • AT&D1 - Dropping the DTR signal puts the modem into Command Mode, without disconnecting the call. The computer may disconnect the call with the ATH command, or return to the call with ATO. This mode is useful if the computer wishes to change settings on the modem during the call (such as activating test modes).
  • AT&D2 (default on most modems) - Dropping the DTR signal will cause a disconnect. Following the disconnect, the modem returns to command mode.
  • AT&D3 (not supported by all modems) - Dropping the DTR signal will cause a disconnect, followed by a reset (similar to ATZ).


Many modems, especially older ones, have DIP switches that define the default DTR behavior when the modem is powered on or reset. Newer modems use nonvolatile memory to hold this behavior, which can be manipulated with the AT&W command.

Many external modems have LED indicators on the front, one of which is TR ("terminal ready"). This light follows the state of the DTR pin. The light is on when DTR is high, and off when it's low. Modems will typically keep the TR light illuminated when the AT&D0 command is used to force the modem to ignore the DTR signal, regardless of the pin's actual state.

As used on null modem connections

When a serial connection is made between two computers using a null modem
Null modem
Null modem is a communication method to connect two DTEs directly using an RS-232 serial cable. The name stems from the historical use of the RS-232 cable to connect two teleprinter devices to modems in order to communicate with one another; null modem communication was possible by instead using...

 adapter, the DTR and DCD (Data Carrier Detect
Data Carrier Detect
Data Carrier Detect, abbreviated as DCD, or alternately Carrier Detect abbreviated as CD, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem. This signal is a simple "high/low" status bit that is sent "from DCE...

) lines are typically paired. This allows both ends of the connection to sense when the connection is active.

On many operating systems including Windows, the DTR line is held low while the serial port is unused and not being controlled by any applications.

As used on serial printers

On some serial printers, the DTR line is used for hardware flow control
Flow control
In data communications, flow control is the process of managing the pacing of data transmission between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with...

, similar to how RTS and CTS are used on modems. This practice is not consistent - other printers define RTS for this same purpose.

When DTR is used for flow control, this is to manage data from the printer to the computer. However, because during printing, the bulk of the data is from the computer to the printer, the importance of flow control in the opposite direction is minimal.

Used as a power pin

On some hardware the DTR line (along with RTS) is typically used to provide power. The most notable example of this is a serial mouse. The DE-9 serial port on the PC does not provide any power pins. The mouse driver holds the DTR and RTS lines high at all times so that the mouse may steal power for its own use.

Another category of devices commonly powered by the DTR line includes converters between RS-232 and other serial standards such as RS-422 and RS-485.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK