19
The plus signs in the escape code can be changed to another ASCII character by changing the value
in Register S2. S Registers contains more information on setting S Registers.
C
OMMAND
L
INE
S
YNTAX
The prefix AT (“ATtention”) must start each command line except
A
/. The modem examines the AT
code to determine your computer’s serial port rate, parity, word length, and number of stop bits. It
then stores your current configuration in its memory.
Most multiple commands can appear on one command line. You can separate these with spaces to
improve readability if you like. (The modem ignores the spaces.)
Each command line (except
A/
) must end with a Carriage Return [
CR
]. The command is not acted
upon until the [CR] key is pressed. The following are valid examples:
AT DT 555-5055 [CR]
(Dial a touch tone phone number.)
ATH [CR]
(Hang up.)
AT &F &C1 &D2 &W [CR]
(Configure modem to the following and store it to memory.)
A/
(Re-execute last command.)
Commands are executed in order, from left to right. If a command contradicts an earlier command,
the later command takes precedence.
Command Forms
The International Telecommunications Union (ITU) has made an effort to standardize the AT
command set for modems. Some of the resulting command forms are:
•
Single character commands (
ATA
)
•
Simple extended commands with no parameters. These commands perform an action or print
reports (
+GCAP
)
•
Complex extended commands with parameters (
AT+MS
)
The complex extended commands also have three forms. These forms allow you to:
•
Change the current settings of the extended command (
AT+[cmd]
=<parameters>)
•
View the current settings for an extended command (
AT+[cmd]?
)
•
View the range for the command’s parameters (
AT+[cmd]=?
)