'''Data Terminal Ready''', abbreviated as ('''DTR''',) is a [[control signal]] present inside anin [[RS-232]] serial communications, cabletransmitted that goes betweenfrom a computerdata andterminal another device(DTE), such as a modem.computer, This isto a one-waydata "high-low"communications signaldevice going(DCE), fromfor theexample computera [[modem]], to indicate that the modemterminal (or,is inready RS-232for terminology,communications "fromand DTEthe tomodem DCE")may initiate a communications session.
The DTR signal is present on pin 20 of the 25-wire RS-232 interface using a [[DB-25]] connector, and on pin 4 of a newer [[DE-9]] serial port. The signal is asserted by raising the voltage of the pin from low to high. Dropping the signal back to its low state indicates to the modem that the communications session shall be terminated.
It is present on pin 4 of a [[DE-9]] serial port, or pin 20 of a [[DB-25]] port.
==AsSignaling used onfor modems==
The DTR signal is one of the mostan important call control signals onfor a data modem. ItDropping isDTR thefrom mosthigh reliableto methodlow byfor whichat aleast computertwo seconds tells the modem to disconnect (end) a call. or Dropping the DTR from high to low for at least 2 seconds accomplishesdata thisconnection.
===Software signaling===
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 and Data modes (modem)|command mode]] using an ''escape code'' (typically "+++"), and then issue the hangup command ("ATH" per the [[Hayes command set]]). 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]]).
A call may also be disconnected by in-band signaling in software with ''escape codes'' to activate the modem's [[Command and Data modes (modem)|command mode]], typically "+++", followed by other modem commands to disconnect, e.g., the hangup command ("ATH" per the [[Hayes command set]]).
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 willdo not answer a callcalls if the DTR signal is low, even if auto -answer mode is enabled.
When a computer wants to place a call, it raises the DTR signal before sending commands. If the DTR signal is not highasserted 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 dependentdepends on the modem firmware)software. Such behavior can be manually overridden or configured on most newer modems.
===DTR configurability on modems===
{{Merge to| Modem| discuss=Wikipedia:Articles for deletion/Data Terminal Ready |date=November 2009}}
Virtually all modems new enough to support error correction and data compression (all modems 9600 bit/s and above, and some 2400 bit/s ones as well) have a built-inthe capability of modifying whattheir theyuse do withof RS-232 signals, depending on the application.{{Citation needed|date=November 2009}} The [[AT command]] for manipulating DTR is typically <code>AT&D</code> followed by a single digit.<ref>{{Citation |title=The Extended Hayes Command Set | publisher=[[KDE]] |url=http://docs.kde.org/stable/en/kdenetwork/kppp/hayes-extended-commands.html |accessdate=2009-11-23 }}</ref> AT&D0 and AT&D2 are mandatory under V.250, and AT&D1 is optional.<ref name="V250_6_2_9" >{{Citation |title=V.250 : Serial asynchronous automatic dialling and control (05/99, 07/03) |chapter=6.2.9 Circuit 108 (data terminal ready) behaviour |publisher=[[ITU-T]]/Telecommunication Standardization Bureau |url=http://www.itu.int/rec/T-REC-V.250/en |format=PDF}}</ref> AT&D3 is non-standard but widely implemented,<ref name="USR_Courier_Ch8">{{Citation |title=Courier V-Everything Command Reference |publisher=[[U.S. Robotics]] |url=http://www.usr.com/support/3453b/3453b-crg/chap%208-controlling%20EIA-232.htm |chapter=8. Controlling EIA-232 Signaling |accessdate=2009-11-23 }}</ref><ref name="MS_PnP_1995" >{{Citation |title=PnP for COM Devices, rev 0.92 |format=RTF |publisher=[[Microsoft]] and [[Hayes]] |url=http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/pnpcom.rtf |date=February 28, 1995 |chapter=A.4 AT&D3 Implementation Issues }}</ref> and higher values are used by some vendors.<ref>{{Citation |title=Alpha Micro GPRS Modem Functional Overview 1.0|url=http://www.alphamicro.net/resources/GPRS_functional_overview.pdf |accessdate=2009-11-23 |year=2003 |author=Nick Robins |publisher=Alpha Micro Components |format=PDF}}</ref>
* '''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.
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 nullNull modem connectionsoperation==
When a serial connection is made between two computers using a [[null modem]] adapter, the DTR and DCDthe ([[Data Carrier Detect]] (DCD) 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.
==AsUse usedfor onflow serial printerscontrol==
On some printers with serial printersinterfaces, the DTR line is used for hardware [[flow control (data)|flow control]], similar to howthe use of RTS and CTS are used onfor modems. This practice is not consistent -; other printers define RTS for this same purpose.
When DTR is used for flow control, thisit ismanages tothe manageflow of 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.
==UsedUse as a power pin==
On some hardware the DTR line (along with RTS) ismay typicallybe 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 dedicated power pinssource. The mouse driver holds the DTR and RTS lines high at all times so that the mousedevice mayhas steala powersource forof its own usepower.
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]].
==See also==
* [[Data Carrier Detect]]
* [[Ring Indicator]]
[[Category:RS-232 signals]]
|