MORE INFORMATION
Basic Commands
With the following basic AT commands, you can make calls directly, select
the dialing method (tone or pulse), control the speaker volume, and
perform a number of other basic modem operations.
IMPORTANT: You must be in the Command mode of your communication software
to use the AT commands. Refer to the documentation that came with your
communications software for information on entering the Command mode.
AT : This prefix begins all but two commands you issue to the modem
locally, and tells the modem ATtention! commands to follow.
D Dial. Use the D command to dial a telephone number from the command
line. The format of the command is as follows:
ATD [string]
The string parameter can contain up to 45 characters, the phone
number and dial modifiers. The dial modifiers instruct a modem how
to place the call. Do not use any added characters, such as
parentheses or hyphens in the phone number.
+++ -- Escape Character Sequence. After you have connected to another
modem, you may need to return to command mode to adjust the modem
configuration, or, more commonly, to hang up. To do this, leave your
keyboard idle (press no keys) for at least one second, and then press the
plus sign (+) three times. This is one of the two commands that do not use
the AT prefix, or a carriage return to enter. After a moment, the modem
will respond with OK indicating you have been returned to command mode.
P : Pulse dialing. Also known as rotary dialing, this dial modifier
follows the D command and precedes the telephone number to tell the modem
to dial the number using pulse service. For example, to dial the number
123-4567 on a pulse phone line, type "ATDP 1234567".
T : Tone dialing. This modifier selects the tone method of dialing using
DTMF tones. Note: Tone and pulse dialing can also be combined in a dial
command line when both dialing methods are required. For example, to dial
the number 123-4567 on a touch-tone phone line, type "ATDT 1234567".
Dial Command Modifiers
Command modifiers define additional parameters to the modem that instruct
the modem to perform certain functions automatically when dialing a phone
number. They are only valid when they are contained in a dial string (that
follows the D command). The commands that are used to accomplish this task
are called dial modifiers, and are placed in the dial string prior to
issuing the command.
Syntax: ATD{dial modifier} 1234567 [Enter]
; : Resume command mode after dialing. If you need to dial a number that
is too long to be contained in the command buffer (45 characters for the D
command), use the semicolon (;) modifier to separate the dial string into
multiple dial commands. All but the last command must end with the ;
modifier.
, : Pause While Dialing. The comma (,) dial modifier causes the modem to
pause while dialing. The modem will pause the number of seconds specified
in S-Register S8 and then continue dialing. If a pause time longer than
the value in S-Register S8, it can be increased by either inserting more
than one (,) in the dial command line or changing the value of S-Register
S8. In the following example, the command accesses the outside (public)
telephone line with the 9 dial modifier. Because the comma (,) dial
modifier is present, the modem delays before dialing the telephone number
5551212.
Example: ATD 9, 5551212 [Enter]
! : Using the Hook Flash. The exclamation point (!) dial modifier causes
the modem to go on-hook (hang up) for one-half second and is equivalent to
holding down the switch-hook on your telephone for one-half second. This
feature is useful when transferring calls.
W : Wait for a Subsequent Dial Tone. The W dial modifier causes a modem to
wait for an additional dial tone before dialing the numbers that follow
the W. The length of time the modem waits depends on the value in S-
Register S7. The modem can be instructed to dial through Private Branch
Exchanges (PBXs) or long-distance calling services that require delays
during dialing. This can be done with the W command to wait for a
secondary dial tone or with a comma (,) command to pause for a fixed time
and then dial.
Example: ATDT 9 W 1 2155551212 [Enter]
A/ : -- Repeat. This command does not use the AT prefix nor does it
require
a carriage return to enter. Typing this command causes the modem to repeat
the last command line entered, and is most useful for redialing telephone
numbers that are busy.
&Fn : Factory Defaults. This command (in which n=0 or 1) returns all
parameters to the selected set of factory defaults if the modem has
factory defaults; not all modems do.
H : Hang Up. This command tells the modem to go "on-hook," or disconnect,
the telephone line.
O : Online. This command returns the modem to the on-line mode and is
usually used after the escape sequence (+++) to resume communication.
Zn : Reset Modem. This command (in which n=0 or 1) resets the modem to the
configuration profile stored in non-volatile memory location 0 or 1.
Making a Call
The following examples show how to place a call using several of the dial
modifiers.
ATD 1234567
The modem dials the telephone number 1234567 and then waits for a
carrier from a distant, or remote, modem. If no carrier is detected
within a given time (as defined by the initial settings in S-Register
6), the modem automatically releases the line and sends a NO CARRIER
result code. If a carrier is detected, the modem gives a CONNECT result
code and goes online, allowing communications with the remote modem.
The connection between the two modems ends when any of the following
occurs causing the modem to hang up, return to command mode, and send
the NO CARRIER response:
- The local modem loses the carrier signal from the remote modem.
- The Hang Up command (H) is sent.
- The DTR interface signal is dropped between the local DTE and modem
when the &D2 or &D3 command is in effect.
NOTE: All ampersand (&) based commands are totally dependent on
implementation. They are extensions from the original HAYES command set.
AT &F1DT9,P5551234 [Enter]
This command restores the factory default settings, dials, using tones,
a 9 to access an outside line, pauses briefly, then pulse dials the
number 555-1234. see above.
Manually Dialing with the Telephone
To manually dial the phone, you should be in your communications
software's
command mode.
- Lift the receiver of the telephone and dial the number you wish to
call.
- Type ATH1 and press ENTER to connect the modem and then hang up the
receiver.
- Type AT0 and press ENTER to tell the modem to go online.
Manual Answer
When the automatic answer feature (S-Register S1) is not being used,
incoming calls can be answered manually by typing ATA and then pressing
ENTER when an incoming call is received. The modem will answer the
incoming
call and enter the on-line mode.
Online State:
To transmit or receive data, the modem must be in the online state.
When placing a call, the modem is put online with the dial command. At
the remote end, the modem goes online when it is instructed to answer a
call automatically by setting the S-Register S0 equal to any number
greater than 0 and less than 255. You can also perform this function
with the ATA command.
Escape to Command Mode:
After a connection has been established with a remote modem, you can
return to command mode without breaking that connection by typing the
escape sequence. The escape sequence consists of three plus signs
(+++).
It is not necessary to begin this sequence with the attention code, or
by pressing ENTER after typing the escape code.
Return to Online State:
The modem can be returned to the online state after the escape sequence
has been sent. To return the modem to the online state, send the ATO
command. To return the modem online and then initiate an equalizer
retrain sequence, use the ATO1 command.
Repeating the Last Command:
Each command sent to the modem remains in the command buffer until the
next command is sent, or until power to the modem is turned off. To
repeat the last command sent, type the command A/. The A/ command is
not preceded by the AT characters or followed by pressing ENTER. See
the command reference for more information.
Omitting a Parameter:
Some commands require a parameter to completely define them. If a
parameter is omitted from a command that requires one, the command will
use the default value.
Result Codes:
A response is displayed on your screen by the modem, indicating the
result after it processes, or tries to process, a command. These result
codes display the status of the modem, or the progress of a call
sequence, and can take the form of either words or digits. The default
consists of word responses that are defined by the ATV1 command. To
receive digit responses rather than words, use the ATV0 command. To
disable responses entirely, use the ATQ1 command.
Command Syntax:
All control commands to the modem are prefixed with either AT or at and
terminated by a carriage return (Enter). Mixed case set (At or aT) is not
allowed. The AT sequence is called the Attention command. The Attention
command precedes all other commands except re-execute (A/) and the escape
(+++) code.
Several commands that are preceded by AT can be entered in a single line
followed by the carriage return character. Spaces can be inserted between
commands to increase readability, but will not be stored in the command
buffer, the size of which is 255 characters. The backspace character can
be used to erase mistakes but is not saved as part of the contents of the
command buffer in terminal applications. Unsupported commands will be
logged and an OK or ERROR will be returned.
Commands will only be accepted by the modem after the previous command has
fully executed. A command line may be canceled at any time by entering
CTRL+X. The AT sequence may be followed by any number of commands in
sequence, except for commands such as Z, D, or A. Commands following Z, D,
or A on the same command line will be ignored. The maximum number of
characters on any command line is 56 (including A and T).
Additional information may be found at the Hayes Web site and the US
Robotics Web site. Also, your modem manufacturer may have additional
information about commands that your modem supports.