AT command set
The following Hayes commands represent industry standards. These
are included as part of the information we are providing new modem
ans BBS users as part of Online Training.----Lois Laulicht; ccc of wv
Introduction
This chapter describes the AT command set. If you're using
communication software, you shouldn't have to use AT
commands. Your modem will be controlled by your
communications software. However, if you are writing software
that you want to control the modem, or if you want to
undderstand the "behind the scenes" operation of the modem,
you'll want to learn more about the AT command set.
Major topics discussed in this following section include:
* Command Execution
* Command Guidelines
* AT Immediate Commands
* AT Set Commands
* AT Commands for Optional Non-Volatile Memory
* Sendfax AT Commands
* S Register Table
command Execution
Your modem accepts only ASCII characters (loosely speaking
the characters on the keyboard) as commands- The commands
entered while the modem is in command mode are stored in a
memory buffer that is 40 characters long. Unless the echo
back is disabled (EO command), these characters will also be
echoed back to your computer and displayed on the monitor
screen. Upon seeing a carriage return showing that the
command is ended, the command is compared to a list of valid
commands, and if a match is found, the function associated
with the command is executed.
A command line must start with the ATtention code AT.
However, commands may be strung together in a single command
line. If desired, each command may be separated by a space
for readability, however the command string may not exceed 40
characters and spaces. The command or string of commands will
be executed when you enter a carriage return, and a result
code is sent back after the last command that is executed in
the command string. The result codes are displayed on the
monitor, unless they have been intentionally disabled.
command Guidelines
Your modem is easy to operate and configure. However, it is
very important that certain guidelines for issuing commands
to the modam are followed.
If an error was made while entering a command in command
mode, it can be edited at any time (before pressing the
return key).Pressing the backspace key delete the last
character entered. By pressing the backspace key repeatedly,
the entire command line may be deleted, except for the AT
command at the beginning of the command line.
Each command line must end with carriage return. The modem
does not begin command execution until it receives a carriage
return.
A missing parameter in a cammand that requires a parameter tp
fully define the command (in addition to the command)
evaluates to zero.
The command buffer is 40 characters long, If a Command
exceeds 40 characters, the modem will abort execution of the
command line and display an error message.
AT Immediate Commands
The modem command set consists of two types of commands:
Immediate Commands and set Commands. The Immediate Commands
will always use the current default settings, unless the
command specifies otherwise. The table below lists the
Immediate commands and their functions.
AT ImmediateCommands
COMMAND FUNCTION
AT Command line prefix. The Attention Command precedes
all other commands listed below except for A/ and the
excape code. For example, the command DT would be typed
ATDT.
______________________________________________________________
A/ Repeat the previous command (not to be preceded by AT)
______________________________________________________________
A The modem is set to answer mode and goes offhook
immediately.
______________________________________________________________
Dn Dial the number immediately following this command
where n is the number to be dialed, or that number
combined with other dial subcommands as shown below.
Any combination of the subcommands listed below may
be strung together to perform the desired dialing
sequance. The number is dialed in the call progress
or blind mode depending on register S11.
DIAL FUNCTION
SUBCOMMAND
T Touch Tone Dialing.
P Pulse Dialing.
(Default to Pulse if T or P not used)
R Reverse mode. Puts modem in answer mode
immediately after dialing.
W Wait for a continuous tone before
dialing the next number. Useful for dialing
MCI or Sprint. The modem waits for the
number of seconds set by the register S7
for the tone to occur. If the tone is not
not heard, BUSY or NO DIALTONE result code
is issued.
@ Wait for the "quiet answer" - one or more
rings followed by 5 seconds of silence -
for the length of time defined by register S7.
, Pause the length of time specified by register
S8 (default time = 2 seconds). Each comma
equals the pause length specified.
! Flash. This character can be used to go
temporarily on-hook in order to get a new
dialtone. (Note: Some software uses ! as a
carriage return.)
; Return to the Command state after
dialing. This command can only be
placed at the end of a dial command.
S Dial a stored number. The numbers
are stored in the registers of the
microcontroller.
S=9 Dial stored number 0,1,2,or 3 that has
been previously stored in non-volatile
memory using &Zn command (the non-
volatile memory is an optional feature).
0-9 # * ABCD Digits and -characters that may be use
in dialing. il * and ABCO may only be
used when tone dialing.
DIAL EXAMPLE 1:ATDTl1234567
This example instructs the modem to tone
dial the number 1234567. Bl@nk spaces
within a command string are ignored.
DIAL EXAMPLE 2: ATDP9WT4ll,,,,,HO
This example instructs the modem to
pulse dial 9, wait for a second
dialtone; tone dial the number 411,
pause 10 seconds, and then hang up.
Hn controls the modem on/off hook relay
n = 0, on-hook (disconnected) n = 1, off-hook
In Returns product ID/checksum.
n = 0, returns product ID.
n = 1, performs checksum, returns checksum.
n = 2, performs checksum, returns result code.
n = 3, returns ROM part # and revision level
On Puts modem in the online data mode.
n = 0, online
n = 1, online with equalizer retrain sequence (2400
bps only).
Issuing an 'On' command always takes modem offhook
Z Causes a software reset with registers set to default
values.
&F Sets values for S Registers and commands to factory
default.
&Zn Stores telephone numbers to optional non-volatile
memory. Modem normally comes without non-volatile
memory.
AT Set Commands
Set commands are used to configure the modem, allowing you to
select operation speeds and standards, result code format
and various other options. The default confiqurations are
listed first, and marked with an *.
COMMAND FUNCTION
_____________________________________________________________
Bn Selects V.22 or Bell 212A in the 1200 bps mode.
*n = 1, Bell 212A with 2225 Hz Answer Back Tone
n = 0, CCITT V.22 with 2100 Hz Answer Back Tone
En Determines whether the modem echoes the data received
in the command mode back to the local computer.
*n = 1, echo on n = 0, echo off
Ln Speaker Volume
*n=2, medium n= 0 or 1, low n = 3, high
Mn Speaker Control
*n = 1, speaker on when dialing until carrier detected
n = 0, speaker off
n = 2, speaker always on
n = 3, speaker on after dialing until carrier detected
Qn Result codes on/off.
*n = 0, codes are sent n = 1, codes are not sent
Sr? Reads the contents of status register r.
Sr=n This command may be used to modify an S Register of
the modem. It assigns a value n to the status
register r. They may be reset to the default value
by issuing an '&F' or 'z' command. See next table
for @ list of S Registers.
Vn Sets result code format.
*n = 1, words n = 0, numeric
Xn Sets dialing mode, result code format for dial command
*n = 4, Dialtone and busy signal detected. Result
codes 0-7 and 10 enabled.
n = 0, Dialtone and busy signal not recognized (blind
dialing). Result codes 0-4 enabled.
n = 1, Dialtone and busy signal not recognized (blind
dialing). Result codes 0-5 and 10 enabled.
n = 2, Dialtone detected. Busy signal not detected
Result codes 0-6 and 10 enabled.
n = 3, Busy signal detected. Dialtone not detected
Result codes 0-5,7, and 10 enabled.
Yn Long Space Disconnect Option
*n = 0, disabled n = 1, enabled
Zn Recall configuration profile in non-volatile RAM
*n = 0, Recall profile 0 (stored using &WO command)
n = 1, Recall profile 1 (stored using &WI command)
&Cn Enables DCD.
*n = 1, DCD set by modem when remote carrier detected.
n = 0, DCD always on.
&Dn Enables DTR. DTR on/off time as specified by S25.
*n = 0, modem ignores DTR.
n = 1, switches to command mode when DTR goes off.
n = 2, same as n = 1. Also hangs up, disables auto
answer.
n = 3, initializes modem when DTR goes off.
&Gn Guard Tone (used only whan in CCITT modes)
*n = 0, noguard tone n = 1, 550Hz n = 2, 1800 Hz
This command need never be used when communicating
over U.S. phone lines. Outside the U.S,, the modem
may need to generate an additional tone, along with
its carrier, to disable echo suppressors in the
central office. This guard tone varies by country.
&Mn Communications Mode
*n = 0, Asynchronous n = 1, n = 2, n = 3, Reserved
&Pn Pulse dial make/break ratio.
*n = 0, 39/61 (for U.S. applications)
n = 1, 33/67 (for foreign applications)
&Qn Communications Mode Option
Idle State On-line State
*n = 0 Normal Asynchronous
n = 1 Normal Reserved
n = 2 Dial when DTR = 1 Reserved
Hangup when DTR = 0 Reserved
n = 3 Talk/data, DTR = 0/1 Reserved
&Sn Controls DSR. DSR ON indicates that the modem is
connected to a communication channel and is ready.
*n = 0, DSR is always on
n = 1, DSR turned on at start of handshaking, off in
test mode, idle state, or when carrier is lost
&Tn Controls Test (for n=6,7,8 disabled for 300 bps modes
*n = 0, Ends current test and returns to command mode
n = 1, Initiate local analog loopback
n = 3, Initiate local digital loopback
n = 4. Grant request to remote mode for RDL.
n = 5, Deny request from ramote modem for RDL
n = 6, Initiate ramote digital loopback
n = 7, Initiate remote digital loopback w/ self test
n = 8, Initiate local analog loopback w/ self test
AT Commands for Optional Non-Volatile Memory
This modem has been designed to accept non-volatile memory
if required. In general, non-volatile memory is not required
for modems that are used in PCs, since the configuration that
would be stored in the non-volatile memory is stored instead
in the communications software as part of the software setup,
or as an initialization string or dial string.
&V Displays active configuration profiles (S Register
settings, commands, and telephone numbers. Inputs
from the DTE are ignored while this information is
being sent.
@Wn Store Active Profile. Sends and stores acceptable
values for certain commands and S Registers to non-
volatile RAM. The following may be stored:
Commands:Bn,Cn,En,Fn,Ln,Mn,P or T,Qn,Vn,Yn,Xn,&Cn,
&Dn,&Gn,&Jn,&Ln,&Mn,&Pn,&Qn,&Rn,&Sn,&T4,&T5,&Xn
Registers:S0,S14,S18,S21,S22,S23,S25,S26,S27
The last DTE speed and parity are also stored. Stored
values are used on power-up or hard reset.
n = 0, Store active profile in location 0
n = 1, Store active profile in location 1
&Yn Select Stored Profile on Power Up Option
n = 0, Select profile 0 on power up or hard reset
n = 1, Select profile 1 on power up or hard reset
See the &Wn command for particular commands and S
Registers stored. The selected &Y command survives a
power outage
&Zn=x Store Telephone Number. Stores up to four dialing
strings in non-volatile RAM for later recall using DS
(dial stored number) command.
Command format:
&Z <up to 36 characters> <CR>
&Z= <up to 36 characters> <CR>
&Zn <up to 3G characters> <CR> where n=0 to 3
If the delimiter (=) is not present, the characters
following the &Z are treated as telephone numbers
and/or modifiers and are stored in location 0. If the
delimiter is present, th@ characters following it are
stored in the location specified by the character
preceding the delimiter (0 to 3), If not specified, 0
will be used.
Allowable characters: 0 1 2 3 4 5 6 7 8 9 A B C D # *
T P R W @ , ! ;
Characters not listed above will be ignored.
are included as part of the information we are providing new modem
ans BBS users as part of Online Training.----Lois Laulicht; ccc of wv
Introduction
This chapter describes the AT command set. If you're using
communication software, you shouldn't have to use AT
commands. Your modem will be controlled by your
communications software. However, if you are writing software
that you want to control the modem, or if you want to
undderstand the "behind the scenes" operation of the modem,
you'll want to learn more about the AT command set.
Major topics discussed in this following section include:
* Command Execution
* Command Guidelines
* AT Immediate Commands
* AT Set Commands
* AT Commands for Optional Non-Volatile Memory
* Sendfax AT Commands
* S Register Table
command Execution
Your modem accepts only ASCII characters (loosely speaking
the characters on the keyboard) as commands- The commands
entered while the modem is in command mode are stored in a
memory buffer that is 40 characters long. Unless the echo
back is disabled (EO command), these characters will also be
echoed back to your computer and displayed on the monitor
screen. Upon seeing a carriage return showing that the
command is ended, the command is compared to a list of valid
commands, and if a match is found, the function associated
with the command is executed.
A command line must start with the ATtention code AT.
However, commands may be strung together in a single command
line. If desired, each command may be separated by a space
for readability, however the command string may not exceed 40
characters and spaces. The command or string of commands will
be executed when you enter a carriage return, and a result
code is sent back after the last command that is executed in
the command string. The result codes are displayed on the
monitor, unless they have been intentionally disabled.
command Guidelines
Your modem is easy to operate and configure. However, it is
very important that certain guidelines for issuing commands
to the modam are followed.
If an error was made while entering a command in command
mode, it can be edited at any time (before pressing the
return key).Pressing the backspace key delete the last
character entered. By pressing the backspace key repeatedly,
the entire command line may be deleted, except for the AT
command at the beginning of the command line.
Each command line must end with carriage return. The modem
does not begin command execution until it receives a carriage
return.
A missing parameter in a cammand that requires a parameter tp
fully define the command (in addition to the command)
evaluates to zero.
The command buffer is 40 characters long, If a Command
exceeds 40 characters, the modem will abort execution of the
command line and display an error message.
AT Immediate Commands
The modem command set consists of two types of commands:
Immediate Commands and set Commands. The Immediate Commands
will always use the current default settings, unless the
command specifies otherwise. The table below lists the
Immediate commands and their functions.
AT ImmediateCommands
COMMAND FUNCTION
AT Command line prefix. The Attention Command precedes
all other commands listed below except for A/ and the
excape code. For example, the command DT would be typed
ATDT.
______________________________________________________________
A/ Repeat the previous command (not to be preceded by AT)
______________________________________________________________
A The modem is set to answer mode and goes offhook
immediately.
______________________________________________________________
Dn Dial the number immediately following this command
where n is the number to be dialed, or that number
combined with other dial subcommands as shown below.
Any combination of the subcommands listed below may
be strung together to perform the desired dialing
sequance. The number is dialed in the call progress
or blind mode depending on register S11.
DIAL FUNCTION
SUBCOMMAND
T Touch Tone Dialing.
P Pulse Dialing.
(Default to Pulse if T or P not used)
R Reverse mode. Puts modem in answer mode
immediately after dialing.
W Wait for a continuous tone before
dialing the next number. Useful for dialing
MCI or Sprint. The modem waits for the
number of seconds set by the register S7
for the tone to occur. If the tone is not
not heard, BUSY or NO DIALTONE result code
is issued.
@ Wait for the "quiet answer" - one or more
rings followed by 5 seconds of silence -
for the length of time defined by register S7.
, Pause the length of time specified by register
S8 (default time = 2 seconds). Each comma
equals the pause length specified.
! Flash. This character can be used to go
temporarily on-hook in order to get a new
dialtone. (Note: Some software uses ! as a
carriage return.)
; Return to the Command state after
dialing. This command can only be
placed at the end of a dial command.
S Dial a stored number. The numbers
are stored in the registers of the
microcontroller.
S=9 Dial stored number 0,1,2,or 3 that has
been previously stored in non-volatile
memory using &Zn command (the non-
volatile memory is an optional feature).
0-9 # * ABCD Digits and -characters that may be use
in dialing. il * and ABCO may only be
used when tone dialing.
DIAL EXAMPLE 1:ATDTl1234567
This example instructs the modem to tone
dial the number 1234567. Bl@nk spaces
within a command string are ignored.
DIAL EXAMPLE 2: ATDP9WT4ll,,,,,HO
This example instructs the modem to
pulse dial 9, wait for a second
dialtone; tone dial the number 411,
pause 10 seconds, and then hang up.
Hn controls the modem on/off hook relay
n = 0, on-hook (disconnected) n = 1, off-hook
In Returns product ID/checksum.
n = 0, returns product ID.
n = 1, performs checksum, returns checksum.
n = 2, performs checksum, returns result code.
n = 3, returns ROM part # and revision level
On Puts modem in the online data mode.
n = 0, online
n = 1, online with equalizer retrain sequence (2400
bps only).
Issuing an 'On' command always takes modem offhook
Z Causes a software reset with registers set to default
values.
&F Sets values for S Registers and commands to factory
default.
&Zn Stores telephone numbers to optional non-volatile
memory. Modem normally comes without non-volatile
memory.
AT Set Commands
Set commands are used to configure the modem, allowing you to
select operation speeds and standards, result code format
and various other options. The default confiqurations are
listed first, and marked with an *.
COMMAND FUNCTION
_____________________________________________________________
Bn Selects V.22 or Bell 212A in the 1200 bps mode.
*n = 1, Bell 212A with 2225 Hz Answer Back Tone
n = 0, CCITT V.22 with 2100 Hz Answer Back Tone
En Determines whether the modem echoes the data received
in the command mode back to the local computer.
*n = 1, echo on n = 0, echo off
Ln Speaker Volume
*n=2, medium n= 0 or 1, low n = 3, high
Mn Speaker Control
*n = 1, speaker on when dialing until carrier detected
n = 0, speaker off
n = 2, speaker always on
n = 3, speaker on after dialing until carrier detected
Qn Result codes on/off.
*n = 0, codes are sent n = 1, codes are not sent
Sr? Reads the contents of status register r.
Sr=n This command may be used to modify an S Register of
the modem. It assigns a value n to the status
register r. They may be reset to the default value
by issuing an '&F' or 'z' command. See next table
for @ list of S Registers.
Vn Sets result code format.
*n = 1, words n = 0, numeric
Xn Sets dialing mode, result code format for dial command
*n = 4, Dialtone and busy signal detected. Result
codes 0-7 and 10 enabled.
n = 0, Dialtone and busy signal not recognized (blind
dialing). Result codes 0-4 enabled.
n = 1, Dialtone and busy signal not recognized (blind
dialing). Result codes 0-5 and 10 enabled.
n = 2, Dialtone detected. Busy signal not detected
Result codes 0-6 and 10 enabled.
n = 3, Busy signal detected. Dialtone not detected
Result codes 0-5,7, and 10 enabled.
Yn Long Space Disconnect Option
*n = 0, disabled n = 1, enabled
Zn Recall configuration profile in non-volatile RAM
*n = 0, Recall profile 0 (stored using &WO command)
n = 1, Recall profile 1 (stored using &WI command)
&Cn Enables DCD.
*n = 1, DCD set by modem when remote carrier detected.
n = 0, DCD always on.
&Dn Enables DTR. DTR on/off time as specified by S25.
*n = 0, modem ignores DTR.
n = 1, switches to command mode when DTR goes off.
n = 2, same as n = 1. Also hangs up, disables auto
answer.
n = 3, initializes modem when DTR goes off.
&Gn Guard Tone (used only whan in CCITT modes)
*n = 0, noguard tone n = 1, 550Hz n = 2, 1800 Hz
This command need never be used when communicating
over U.S. phone lines. Outside the U.S,, the modem
may need to generate an additional tone, along with
its carrier, to disable echo suppressors in the
central office. This guard tone varies by country.
&Mn Communications Mode
*n = 0, Asynchronous n = 1, n = 2, n = 3, Reserved
&Pn Pulse dial make/break ratio.
*n = 0, 39/61 (for U.S. applications)
n = 1, 33/67 (for foreign applications)
&Qn Communications Mode Option
Idle State On-line State
*n = 0 Normal Asynchronous
n = 1 Normal Reserved
n = 2 Dial when DTR = 1 Reserved
Hangup when DTR = 0 Reserved
n = 3 Talk/data, DTR = 0/1 Reserved
&Sn Controls DSR. DSR ON indicates that the modem is
connected to a communication channel and is ready.
*n = 0, DSR is always on
n = 1, DSR turned on at start of handshaking, off in
test mode, idle state, or when carrier is lost
&Tn Controls Test (for n=6,7,8 disabled for 300 bps modes
*n = 0, Ends current test and returns to command mode
n = 1, Initiate local analog loopback
n = 3, Initiate local digital loopback
n = 4. Grant request to remote mode for RDL.
n = 5, Deny request from ramote modem for RDL
n = 6, Initiate ramote digital loopback
n = 7, Initiate remote digital loopback w/ self test
n = 8, Initiate local analog loopback w/ self test
AT Commands for Optional Non-Volatile Memory
This modem has been designed to accept non-volatile memory
if required. In general, non-volatile memory is not required
for modems that are used in PCs, since the configuration that
would be stored in the non-volatile memory is stored instead
in the communications software as part of the software setup,
or as an initialization string or dial string.
&V Displays active configuration profiles (S Register
settings, commands, and telephone numbers. Inputs
from the DTE are ignored while this information is
being sent.
@Wn Store Active Profile. Sends and stores acceptable
values for certain commands and S Registers to non-
volatile RAM. The following may be stored:
Commands:Bn,Cn,En,Fn,Ln,Mn,P or T,Qn,Vn,Yn,Xn,&Cn,
&Dn,&Gn,&Jn,&Ln,&Mn,&Pn,&Qn,&Rn,&Sn,&T4,&T5,&Xn
Registers:S0,S14,S18,S21,S22,S23,S25,S26,S27
The last DTE speed and parity are also stored. Stored
values are used on power-up or hard reset.
n = 0, Store active profile in location 0
n = 1, Store active profile in location 1
&Yn Select Stored Profile on Power Up Option
n = 0, Select profile 0 on power up or hard reset
n = 1, Select profile 1 on power up or hard reset
See the &Wn command for particular commands and S
Registers stored. The selected &Y command survives a
power outage
&Zn=x Store Telephone Number. Stores up to four dialing
strings in non-volatile RAM for later recall using DS
(dial stored number) command.
Command format:
&Z <up to 36 characters> <CR>
&Z= <up to 36 characters> <CR>
&Zn <up to 3G characters> <CR> where n=0 to 3
If the delimiter (=) is not present, the characters
following the &Z are treated as telephone numbers
and/or modifiers and are stored in location 0. If the
delimiter is present, th@ characters following it are
stored in the location specified by the character
preceding the delimiter (0 to 3), If not specified, 0
will be used.
Allowable characters: 0 1 2 3 4 5 6 7 8 9 A B C D # *
T P R W @ , ! ;
Characters not listed above will be ignored.
Comments
Post a Comment