Chapter 1. Syntax and Procedures


Alphabet

Only the low order seven bits of each character are significant to the modem; any eighth or higher order bit(s), if present, are ignored for the purpose of identifying commands and parameters. Unless otherwise specifically noted (for example, in string literals in the extended command format), lowercase characters (values from 61H to 7AH) are considered identical to their uppercase equivalents (values from 41H to 5AH) when received by the modem from the DTE; responses from the modem shall be in upper cas e.


DTE Commands

In the descriptions that follow, words enclosed in <angle brackets> are references to syntactical elements defined in this document. When they appear in a command line, the brackets are not used. Words enclosed in [square brackets] represent optional items; such items may be omitted from the command line at the point where they are specified, and when they appear the square brackets are not included in the command line. Ellipses ("...") indicate that the preceding syntactical element (parameter, va lue, etc.) may be repeated. Other characters which may appear in syntax descriptions, such as ?, (, ), &, =, etc., must appear in the places shown.


Command Line General Format

A "command line" is made up of three elements: the prefix, the body, and the terminator. The command line prefix consists of the ASCII characters "AT" or "at". A valid stop bit must always precede the prefix. This is to insure that a modem that disconnects unexpectedly does not misinterpret data as a command. "AT" must precede all commands except "A/", A> and "+++". When a command prefix is entered the modem clears its command buffer in preparation for accepting a new command line.

The body is made up of individual commands as specified later in this document. Space characters (20H) are ignored and may be used freely for formatting purposes. The terminator character may not appear in the body. The modem shall be capable of accepting at least 60 characters in the body.

The terminator is a single character, which may be, selected by a user option (parameter S3), the default being ASCII CR (0DH).

The general format of commands, except for the D and S commands, is as follows:

<command>[<number>]

Where <command> is a single character, or either the "&" character (26H) or the "%" character (25H) followed by a single character. <Number> may be a series of characters from "0" through "9" representing a decimal integer value. If a command expects <number> and it is missing, (<command> is immediately followed in the command line by another <command> or the terminator), the value "0" is assumed. All leading "0"s in <number> are ignored by the modem.

Additional commands may follow a basic format command (and associated parameter, if any) on the same command line without any character required for separation. The actions of some commands cause the remainder of the command line to be ignored (e.g., "A").

See the "D" command for details on the format of the information that follows it. See the "S" command for details on the format of the information that follows it.


Command Line Editing

The character defined by parameter S5 (default, ASCII BS [08H]) is intended to be interpreted as a request from the DTE to the modem to delete the previous character.

The modem checks characters from the DTE first to see if they match the terminator (S3), then the editing character (S5), before checking for other characters. This insures that these characters will be properly recognized even if they are set to values that the modem uses for other purposes. If S3 and S5 are set to the same value, a matching character will be treated as matching S3 (S3 is checked before S5).


Command Line Echo

The modem may optionally echo back characters received from the DTE while in command mode. If so enabled, every character received from the DTE is individually echoed at the same rate, parity, and format as received.


Valid Values

Command identifiers used in this specification shall be taken from the set of displayable ASCII characters (21H through 7EH, inclusive). Single character commands shall consist of the alphabetic characters "A" through "Z" (41H through 5AH; 61H through 7AH are equivalent since lower case characters are treated the same as their upper case equivalents). Double character commands shall consist of the character "&" or the "%" character followed by one of the characters valid for single ch aracter commands.


Invalid Commands

In some cases (specified in the description of the individual command), the modem may ignore certain commands and respond with OK rather than an ERROR result code, if the continued correct operation of the interface between the modem and DTE will not be affected by such action.


Issuing Commands

All characters in a command line shall be issued at the same data rate, and with the same parity and format.

The DTE shall not issue a subsequent command line until at least one millisecond has elapsed after receipt of the entire result code issued by the modem in response to the preceding command line.

The modem shall issue no unsolicited result codes to the DTE during reception and processing of a command line (i.e., between receipt of the first character of the prefix and issuance of the last character of any eventual response(s)).


Executing Commands

Upon receipt of the termination character, the modem shall commence execution of the commands in the command line, if any. The modem shall execute the commands in the body of the command line left to right. Each command is individually executed regardless of what follows on the line. If all commands execute properly, or if no commands appear in the command line, a single "OK" result code is issued after execution of the final command. Should a character not recognized as a valid command be encountered, o r should execution of any command result in an error, execution of the command line is terminated at that point and all subsequent commands on the line are ignored. Commands in the line prior to the error will have already been executed.


Command Execution Time

Unless otherwise specified, commands are assumed to execute instantaneously. Commands that execute instantaneously cannot be aborted. Some action commands that require time to execute (such as dialing or answering a call) may be aborted while in progress; see the following section.


Aborting Commands

Commands that may be aborted are explicitly noted in the description of the command. Aborting of commands is accomplished by the transmission from the DTE to the modem of any character. A single character shall be sufficient to abort the command in progress; however, characters transmitted during the first 125 milliseconds of the execution of a command shall be ignored (to allow for the DTE to append additional control characters such as line feed after the command line terminator). To insure that the a borting character is recognized by the modem, it should be sent at the same rate as the preceding command line; the modem may ignore characters sent at other rates. When such an aborting event is recognized by the modem, it shall terminate the command in progress and return an OK or NO CARRIER result code to the DTE.


Modem Responses

While in command mode, the modem shall issue responses using the same rate, word length, and parity as the most recently received DTE command line.

While in online mode, the modem shall issue responses using the current Modem to DTE data rate, with parity equal to the most recently received DTE command (as described above). Following the issuance of a result code indicating a transition from online state to command state, any additional responses shall be issued using the same rate as the most recently received DTE command line.

The characters of a response shall be contiguous with no more than two bit times of mark idle issued between characters.


Basic Responses

There are two types of responses that may be issued by the modem: information and result codes.

Information responses consist of three parts: a header, a line of text, and a line terminator. The last two parts may be repeated for multiple line information responses. The characters sent for the header is determined by a user setting (see the "V" command). The line terminator consists of two characters, being the character having the ordinal value of parameter S3 followed by the character having the ordinal value of parameter S4 (default, ASCII CR and LF [0DH, 0AH]).

Result codes consist of four parts: a header, the result text, the line terminator, and a trailer. The characters sent for the header and trailer are determined by a user setting (see the "V" command). The line terminator consists of the contents of parameter S3 (default, ASCII CR [0DH]). A result code may be sent as a number or as a string, depending on a user setting (see the "V" command).

There are three types of result codes: final, intermediate, and unsolicited. Intermediate result codes are used to inform the DTE of the ongoing progress of an action. Final result codes indicate that the modem has completed processing of the previous command(s) and is ready to receive a new command; these include OK, ERROR, NO CARRIER, and others that are identified in the definition of the result code. Unsolicited result codes (such as "RING") indicate the occurrence of an event not directly associate d with the issuance of a command from the DTE.

There are 16 result codes implemented (See the description of the X command for result code descriptions and their numeric equivalents). The description of each command includes specific result codes that may be issued in relation to the command and the circumstances under which they may be issued.