411 REFERENCE · Wikibooks
Serial Programming/Modems and AT Commands/Special Commands and Character Sequences
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Special Commands and Character Sequences
This module explains the special commands and character sequences as used by a "generic" Hayes-compatible modem. Different modems use slightly different commands. However, this list is supposed to be as "generic" as possible, and should not be extended with modem-specific commands. Instead it is recommended to provide such command lists in an Appendix.
AT: Command Prefix
Syntax:
AT<command ...><CR>
Description:
Almost every line with commands start with the AT prefix, followed by one or more commands, terminated with a Carriage Return character.
See the #AT Command Format section for details.
Related Commands and Registers:
[[#<CR>: End-of-line Character]]
#A/: Repeat Last Command
+++: Escape Sequence
Syntax:
<1 sec. nothing>+++<1sec. nothing>
Description:
See: #On-line State to Command State
Result Codes:
+ Result Codes Code Description OK Escape into command mode was successful
Related Commands and Registers:
#O: On-Line Command
#S2: Escape Sequence Character -- Register to change the character
#S12: Escape Sequence Guard Time -- register to change the guard time
<CR>: End-of-line Character
Syntax:
AT command line<CR>
Description:
In command mode the end of line character (default ASCII 13, alias ASCII 0dH, alias <CR>, alias <Ctrl-M>, alias carriage return) marks the end of a command line. The modem starts to execute the command line after reception of the end-of-line character.
Result Codes:
+ Result Codes Code Description OK All commands in the command line were successfully executed. ERROR One command in the command line failed.
Related Commands and Registers:
#AT Command Format
[[#<BS>: Backspace Character]]
#S3: Carriage Return Character -- Register to change the character.
<BS>: Backspace Character
Syntax:
AT command line<BS>more command line
Description:
In command mode the backspace character (default ASCII 8, alias ASCII 08H, alias <BS>, alias <Ctrl-H>, alias backspace) can be used to edit the command line.
Result Codes:
+ Result Codes Code Description <none> Does not generate a result code.
Related Commands and Registers:
#AT Command Format
[[#<CR>: End-of-line Character]]
#S5: Backspace Character -- Register to change the character.
<CAN>: Cancel Character
Syntax:
AT command line<CAN>
Description:
In command mode the cancel character (default ASCII 24, aka ASCII 18H, aka <CAN>, aka <Ctrl-X>) cancels a command line as long as the command line has not been terminated with the [[#<CR>: End-of-line Character]].
Result Codes:
+ Result Codes Code Description <none> No result code is returned.
Related Commands and Registers:
#AT Command Format
[[#<BS>: Backspace Character]]
A/: Repeat Last Command
Syntax:
A/
Description:
The command repeats the last command. It differs from other commands in two ways:
It is not prefixed with the AT command.
It should not be followed by the usual <CR>:
The most typical usage is to repeat a previous dialing command that failed because of a BUSY line.
Related Commands and Registers:
#D: Dial Command