Information Technology Reference
In-Depth Information
15.4 Modem commands
Most modems are Hayes compatible. Hayes was the company that pioneered modems and
defined the standard method of programming the mode of the modem, which is the AT
command language. A computer gets the attention of the modem by sending an ' AT ' com-
mand. For example, ' ATDT ' is the touch-tone dial command. Initially, a modem is in the
command mode and accepts commands from the computer. These commands are sent at ei-
ther 300 bps or 1200 bps (the modem automatically detects which of the speeds is being
used).
Most commands are sent with the AT prefix. Each command is followed by a carriage
return character (ASCII character 13 decimal); a command without a carriage return charac-
ter is ignored (after a given time delay). More than one command can be placed on a single
line and, if necessary, spaces can be entered to improve readability. Commands can be sent
in either upper or lower case. Table 15.1 lists some AT commands. The complete set is de-
fined in Appendix C.
Table 15.1
Example AT modem commands
Command
Description
ATDT 54321
Automatically phones number 54321 using touch-tone dialing. Within the
number definition, a comma (,) represents a pause and a W waits for a sec-
ond dial tone and an @ waits for a 5 second silence.
ATPT 12345
Automatically phones number 12345 using pulse dialing.
AT S0=2
Automatically answers a call. The S0 register contains the number of rings
the modem uses before it answers the call. In this case there will be two rings
before it is answered. If S0 is zero, the modem will not answer a call.
ATH
Hang up telephone line connection.
+++
Disconnect line and return to on-line command mode.
AT A
Manually answer call.
AT E0
Commands are not echoed (AT E1 causes commands to be echoed). See
Table 15.2.
AT L0
Low speaker volume (AT L1 gives medium volume and AT L2 gives high
speaker volume).
AT MO
Internal speaker off (ATM1 gives internal speaker on until carrier detected,
ATM2 gives the speaker always on, AT M3 gives speaker on until carrier
detect and while dialing).
AT QO
Modem sends responses (AT Q1 does not send responses). See Table 15.2.
AT V0
Modem sends numeric responses (AT V1 sends word responses). See Table
15.2.
The modem can enter one of two states: the normal state and the command state. In the nor-
mal state the modem transmits and/or receives characters from the computer. In the com-
 
Search WWH ::




Custom Search