Data Terminal Ready: Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m WP:CHECKWIKI error 22 fixes (category with space) + general fixes (BRFA 16) using AWB (7799)
m link radio modem
 
(27 intermediate revisions by 20 users not shown)
Line 1:
{{Short description|Control signal}}
'''Data Terminal Ready''', abbreviated as '''DTR''', 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 is a one-way "high-low" signal going from the computer to the modem (or, in RS-232 terminology, "from DTE to DCE").
'''Data Terminal Ready''' ('''DTR''') is a [[control signal]] in [[RS-232]] serial communications, transmitted from [[data terminal equipment]] (DTE), such as a computer, to [[data communications equipment]] (DCE), for example a [[modem]], to indicate that the terminal is ready for communications and the modem may initiate a communications channel.
 
The DTR signal is present on pin 20 of the 22-wire RS-232 interface using a [[DB-25]] connector, and on pin 4 of a newer [[DE-9]] serial port. The signal is asserted (logic "1") by raising the voltage of the pin from negative to positive. Dropping the signal back to its negative 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==
{{further|Command mode and Data mode#Switching between modes}}
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.
 
The DTR signal is an important call control signal for a data modem. According to the RS232 standard, dropping DTR from active to inactive for at least two seconds tells the modem to disconnect (end) a call or data connection.
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]]).
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.<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>
 
When a modemcomputer iswants beingto usedplace fora automaticcall, answeringit (suchasserts asthe withDTR thesignal commandbefore ATS0=1),sending commands. If the DTR signal confirmsis tonot asserted and the modem thatreceives thea computer''dial'' iscommand, modems either availablerefuse to acceptplace athe call., or Inthey theirsilently defaultdisable configuration,DTR mostsupport modemsfor willthe notduration answerof athat call if; the DTRactual signalbehavior isdepends low,on eventhe ifmodem autosoftware. answer is enabled.
 
VirtuallyOther allaspects modemsof new enoughresponses to supportchanges error correction and data compression (all modems 9600 bps and above, and some 2400 bps ones as well) have a built-in capabilityDTR ofcan modifyingbe whatmanually theyoverridden door with RS-232 signals, dependingconfigured on themost application.{{Citationnewer needed|date=November 2009}} The [[AT command]] for manipulating DTR is typically <code>AT&D</code> followed by a single digitmodems.<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 Microcomputer Products|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 |formaturl-status=PDFdead |archiveurl=https://web.archive.org/web/20070125091854/http://www.alphamicro.net/resources/GPRS_functional_overview.pdf |archivedate=2007-01-25 }}</ref>
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.
 
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 is 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.
===DTR configurability on modems===
{{Mergeto| 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 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.{{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>
 
==Null modem operation==
* '''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.
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.
* '''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).
 
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.
Many modems, especially older ones, have DIP switches that define the default DTR behavior when the modem is powered on or reset.<ref name="USR_Courier_Ch8" /> Newer modems use nonvolatile memory to hold this behavior, which can be manipulated with the AT&W command.
 
==Use for flow control==
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.
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.
==As used on null modem connections==
When a serial connection is made between two computers using a [[null modem]] adapter, the DTR and DCD ([[Data Carrier Detect]]) lines are typically paired. This allows both ends of the connection to sense when the connection is active.
 
==UsedUse as a power pin==
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.
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]].
==As used on serial printers==
On some serial printers, the DTR line is used for hardware [[flow control]], similar to how RTS and CTS are used on modems. This practice is not consistent - other printers define RTS for this same purpose.
 
==Use for transmit keying==
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.
 
In many [[radio modem]] implementations, especially in amateur radio, the DTR is used to control transmission. The radio receives when DTR is not asserted, typically passing audio in to a software modem. When DTR is asserted the radio transmits audio coming from the software modem. In cases where the radio is controlled by serial commands (e.g. a [[computer aided transceiver]] interface) the control data flows regardless of DTR state.
==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.
 
==See also==
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]].
* [[Ring Indicator]]
 
==References==
<references/>
 
==See also==
* [[RS-232]]
* [[Data Carrier Detect]]
* [[Ring Indicator]]
 
[[Category:RS-232 signals]]