Using AT Commands and Result Codes


Links to other Reference Manual pages
[Reference Manual Table of Contents]
[Factory Defaults and Active Configurations]
[Dialing and Answering]
[AT Commands]
[Result Codes]
[S Register Descriptions]


When you use your telecommunications software to perform a task (such as dialing a phone number), it uses your modem's AT commands to perform the task. It is usually easier to let your telecommunications software issue the commands for you than it is to issue the AT commands yourself.

When your telecommunications software can't perform a task (or you don't want it to), you'll issue the AT commands yourself. These commands can be used to perform various tasks, from hanging up to changing your modem's speaker volume.

Various chapters in this manual explain how to use the AT commands to accomplish specific tasks. The rest of this chapter explains how the AT commands work, and the AT Commands list explains them in detail.

Issuing Commands Yourself (Terminal Mode)
To issue AT commands yourself, you must be in your software's ``terminal mode'' -- also called ``local mode''. In this mode, the commands you type go to your modem rather than to your software or the remote computer.

Some software is in terminal mode when you start the program. Terminal mode often appears as a blank blue or black screen with a flashing cursor. If your modem responds with the OK result code when you type the following, you are in terminal mode and ready to issue commands ([CR] represents a carriage return):

AT [CR]
If you are not in terminal mode, refer to your software manual to determine how to get there.

Command Line Syntax
The prefix AT (``ATtention'') must start each command line except A/ and be in all uppercase (AT) or all lowercase (at) characters. The modem examines the AT code to determine your computer's rate, parity, word length, and number of stop bits, and then stores your current configuration in its memory.

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] -- ASCII 13). If you don't provide a carriage return, your modem ignores the commands. A line feed character following the carriage return is optional and is ignored by the modem.

The following are examples of valid command lines:

AT DT 555-5055 [CR]

ATH [CR]

AT &F &C1 &D2 [CR]

A/

Command State & Online State
The modem can operate in either command state or online state:

If you're connected to a network, Bulletin Board System, or other remote computer (i.e., you're online) you can transmit data, but you must change to command state to send AT commands.

To switch from one state to the other, use the methods below.

Escape Code (+++)
The escape code is a string of three ASCII plus signs (+++) preceded and followed by a ``guard time'' during which no other data is transmitted. It is used to leave the online state without hanging up. To use it, do the following:

  1. Do not transmit any data for a period equal to the guard time. The default setting for the guard time is 1 second.
  2. Type the escape code quickly. Do not follow with a carriage return.
  3. Do not transmit any data for another period of time equal to the guard time.
The modem responds to these steps with the OK result code. If it doesn't, either it received data during the guard time or the escape code was typed too slowly. The time between each plus sign (+) in the escape code should not exceed the guard time. The plus signs in the escape code can be changed to another ASCII character by changing the value in register S2.

Command Line Buffer
The modem places each command issued into a command buffer that holds up to 54 characters. The modem does not place the AT, carriage return, or line feed characters in the buffer, so the buffer's 54 spaces only hold actual command characters. If a command line contains more than 54 command characters, the modem ignores all the commands and displays the ERROR result code.

Result Codes
After your modem receives a command, it returns a result code. The most common result code is OK, which means your modem understood your command. Other result codes are listed in Appendix B.

Result codes can be represented by English words or with numbers. Words are preceded and followed by carriage return and line feed characters. Numbers are followed by a carriage return. See the ATV command for more information.

[Table of Contents]


© 1997 Diamond Multimedia Systems, Inc. All Rights Reserved.
Part Number:52500033-001