22
Chapter 3 - AT Commands
3.2.2 Command Structure
You can control a wide variety of modem operations and options when the modem is in command mode. AT
commands tell the modem to dial a number, to answer a call, to operate at a certain speed, to use a certain
compression technique, and many other functions. AT commands consist of one or two letters, which may be
preceded by an ampersand (&), a dollar character ($), a pound character (#), a percent character (%), or a
greater-than character (>). The Q command, for example, determines whether the modem returns result
codes, while the &Q command selects which AT command set the modem uses.
A parameter after a command (0, 1, 2, etc.) tells the modem which option to use. If you do not specify a
parameter, the modem assumes the 0 (zero) option. E, for example, is the same as E0. You can issue several
commands on a single line (a command string) as long as the line does not exceed 60 characters. Note that
though Q1 is one command, it counts as two characters in the command line.
Each command has a valid range of parameters; for instance, &W can have only 0 or 1 as a parameter. Valid
commands generate an OK result code. A few generate an additional response, such as a list of parameters.
An invalid command, such as &W3, which has a parameter outside the valid range, generates an ERROR
result code. Most commands have a default parameter, one that is enabled when the modem is turned on or
reset with the ATZ or AT&F command. Factory defaults are stored in read-only memory (ROM), and cannot
be changed. User-defined defaults can be stored in nonvolatile random-access memory (NVRAM), and can
be changed or deleted at will.
3.3.3 Command Editing
Always begin a command with the letters AT. You may type the command in upper case or lower case, but
not both. The AT command is not executed until you press the ENTER key. Use the BACKSPACE key to
erase the previous command character; it will not erase the AT characters once they are typed. If your
keyboard has no BACKSPACE key, use CTRL+H. You can change the character recognized by the modem
as BACKSPACE to any other ASCII character by changing register S5.
To cancel an entire command that has been typed but not yet executed, press CTRL+X. This also clears the
command buffer. The effect is the same as backspacing the command, only quicker.
The MT2834MR6 stores characters entered in a command in the modem’s command buffer until they are
executed by pressing ENTER. The command buffer’s capacity is 60 characters. The attention characters (AT)
do not count in the 60 allowed command characters. You may use spaces for increased readability when
typing a command; they are neither stored in the command buffer nor counted in the 60 allowed characters.
Hyphens, parentheses, etc., are not allowed.
If you exceed the 60-character limit or type invalid characters, the command buffer is automatically erased
and an ERROR message is displayed. You must then retype the command within the 60-character limit,
using only the allowed characters.
The commands in this chapter are organized by function. A brief summary follows.