Hardware manual

5901 High Speed Dialup Modem Hardware Manual
October 19, 2007
26
10 AT Command Guidelines
Modem operation is controlled by generic AT commands. These AT commands may be basic AT
(i.e., commands preceded by AT, AT&, AT%, AT*, AT\, AT), AT-, or AT#) or S-Register (e.g.,
S6=n) commands. The command syntax and operation guidelines governing each of these command
categories are described in subsequent sections.
10.1 AT Command Format
A command line is a string of characters sent from a SCADAPack, TeleSAFE Micro16 controller or
computer (DTE) to the 5901 modem (DCE) while the modem is in a command state. A command
line has a prefix, a body, and a terminator.
Each command line (with the exception of the A/ command) must begin with the character sequence
AT and must be terminated by a carriage return. Commands entered in upper case or lower case are
accepted, but both the A and T must be of the same case.
The body is a string of commands restricted to printable ASCII characters (032 - 126). Space
characters (ASCII 032) and control characters other than CR (ASCII 013) and BS (ASCII 010) in
the command string are ignored.
The default terminator is the ASCII <CR> character. Characters that precede the AT prefix are
ignored. The command line interpretation begins upon receipt of the carriage return character.
Characters within the command line are parsed as commands with associated parameter values. The
basic commands consist of single ASCII characters, or single characters preceded by a prefix
character (e.g., “&"), followed by a decimal parameter. Missing decimal parameters are evaluated as
0.
The 5901 modem supports the editing of command lines by recognizing a backspace character.
When modem echo is enabled, the modem responds to receipt of a backspace or delete by echoing a
backspace character, a space character, and another backspace. The hex value to be used for the
backspace character is programmable through register S5.
The AT sequence may be followed by any number of commands in sequence, except for commands
such as Z, D, or A. Commands following commands Z, D, or A on the same command line will be
ignored. The maximum number of characters on any command line is 39 (including "A" and "T"). If
a syntax error is found anywhere in a command line command, the remainder of the line will be
ignored and the ERROR result code will be returned. Most commands entered with parameters out
of range will not be accepted and the ERROR response will be returned to the DTE.
Commands will only be accepted by the modem once the previous command has been fully
executed, which is normally indicated by the return of an appropriate result code. Execution of
commands D and A, either as a result of a direct command or a re-execute command, will be aborted
if another character is entered before completion of the handshake.
10.1.1 DTE Speed Auto Detect
The 5901 modem can automatically determine the speed and format of the data sent from the DTE.
Under AT operation, the 5901 modem performs an autobaud / autoparity / autolength function on
each AT header entered. The autolength / autoparity facility can detect 7- or 8-bit characters of even,
odd, or no parity with one stop bit. The 5901 modem can sense DTE speeds of 300, 600, 1200,
2400, 4800, 7200, 9600, 12000, 14400, 19200, 38400, and 57600 bps.