You are currently offline, waiting for your internet to reconnect

Using Basic AT Modem Commands

This article was previously published under Q164659
This article has been archived. It is offered "as is" and will no longer be updated.
NOTE: These are general modem commands. Certain commands may not work withall modems. Consult the documentation for your modem if you experiencedifficulties, or contact your modem manufacturer's technical supportdepartment.

All commands except two must begin with the characters AT. The twoexceptions are the escape sequence (+++), and the repeat command (A/). Thecommand line prefix (letters AT), and the command sequences that follow,can be typed in uppercase or lowercase (used on older modems), butgenerally case must not be mixed. More than one command can be typed onone line; you may separate them by spaces for easier reading. The spacesare ignored by the modem's command interpreter but are included in thecharacter count on the input line. With most modems, the command linebuffer accepts up to 39 characters including the A and T characters.Spaces, carriage return, and any line feed characters do not go into thebuffer, and do not count against the 39 character limitation. Some modemshave line length limitations as low as 24 characters. Others may have alarger buffer. Refer to modem documentation for specifics about yourparticular modem. If more than 39 characters are entered, or a syntaxerror is found anywhere in the command line, the modem returns an ERRORresult code, and the command input is ignored.

Basic Commands

With the following basic AT commands, you can make calls directly, selectthe dialing method (tone or pulse), control the speaker volume, andperform a number of other basic modem operations.

IMPORTANT: You must be in the Command mode of your communication softwareto use the AT commands. Refer to the documentation that came with yourcommunications software for information on entering the Command mode.

AT : This prefix begins all but two commands you issue to the modemlocally, and tells the modem ATtention! commands to follow.

D Dial. Use the D command to dial a telephone number from the commandline. The format of the command is as follows:
ATD [string]
The string parameter can contain up to 45 characters, the phone number and dial modifiers. The dial modifiers instruct a modem how to place the call. Do not use any added characters, such as parentheses or hyphens in the phone number.
+++ -- Escape Character Sequence. After you have connected to anothermodem, you may need to return to command mode to adjust the modemconfiguration, or, more commonly, to hang up. To do this, leave yourkeyboard idle (press no keys) for at least one second, and then press theplus sign (+) three times. This is one of the two commands that do not usethe AT prefix, or a carriage return to enter. After a moment, the modemwill respond with OK indicating you have been returned to command mode.

P : Pulse dialing. Also known as rotary dialing, this dial modifierfollows the D command and precedes the telephone number to tell the modemto dial the number using pulse service. For example, to dial the number123-4567 on a pulse phone line, type "ATDP 1234567".

T : Tone dialing. This modifier selects the tone method of dialing usingDTMF tones. Note: Tone and pulse dialing can also be combined in a dialcommand line when both dialing methods are required. For example, to dialthe number 123-4567 on a touch-tone phone line, type "ATDT 1234567".

Dial Command Modifiers

Command modifiers define additional parameters to the modem that instructthe modem to perform certain functions automatically when dialing a phonenumber. They are only valid when they are contained in a dial string (thatfollows the D command). The commands that are used to accomplish this taskare called dial modifiers, and are placed in the dial string prior toissuing the command.

Syntax: ATD{dial modifier} 1234567 [Enter]

; : Resume command mode after dialing. If you need to dial a number thatis too long to be contained in the command buffer (45 characters for the Dcommand), use the semicolon (;) modifier to separate the dial string intomultiple dial commands. All but the last command must end with the ;modifier.

, : Pause While Dialing. The comma (,) dial modifier causes the modem topause while dialing. The modem will pause the number of seconds specifiedin S-Register S8 and then continue dialing. If a pause time longer thanthe value in S-Register S8, it can be increased by either inserting morethan one (,) in the dial command line or changing the value of S-RegisterS8. In the following example, the command accesses the outside (public)telephone line with the 9 dial modifier. Because the comma (,) dialmodifier is present, the modem delays before dialing the telephone number5551212.
Example: ATD 9, 5551212 [Enter]
! : Using the Hook Flash. The exclamation point (!) dial modifier causesthe modem to go on-hook (hang up) for one-half second and is equivalent toholding down the switch-hook on your telephone for one-half second. Thisfeature is useful when transferring calls.

W : Wait for a Subsequent Dial Tone. The W dial modifier causes a modem towait for an additional dial tone before dialing the numbers that followthe W. The length of time the modem waits depends on the value in S-Register S7. The modem can be instructed to dial through Private BranchExchanges (PBXs) or long-distance calling services that require delaysduring dialing. This can be done with the W command to wait for asecondary dial tone or with a comma (,) command to pause for a fixed timeand then dial.
Example: ATDT 9 W 1 2155551212 [Enter]
A/ : -- Repeat. This command does not use the AT prefix nor does itrequirea carriage return to enter. Typing this command causes the modem to repeatthe last command line entered, and is most useful for redialing telephonenumbers that are busy.

&Fn : Factory Defaults. This command (in which n=0 or 1) returns allparameters to the selected set of factory defaults if the modem hasfactory defaults; not all modems do.

H : Hang Up. This command tells the modem to go "on-hook," or disconnect,the telephone line.

O : Online. This command returns the modem to the on-line mode and isusually used after the escape sequence (+++) to resume communication.

Zn : Reset Modem. This command (in which n=0 or 1) resets the modem to theconfiguration profile stored in non-volatile memory location 0 or 1.

Making a Call

The following examples show how to place a call using several of the dialmodifiers.

ATD 1234567 The modem dials the telephone number 1234567 and then waits for a carrier from a distant, or remote, modem. If no carrier is detected within a given time (as defined by the initial settings in S-Register 6), the modem automatically releases the line and sends a NO CARRIER result code. If a carrier is detected, the modem gives a CONNECT result code and goes online, allowing communications with the remote modem. The connection between the two modems ends when any of the following occurs causing the modem to hang up, return to command mode, and send the NO CARRIER response:
  • The local modem loses the carrier signal from the remote modem.
  • The Hang Up command (H) is sent.
  • The DTR interface signal is dropped between the local DTE and modem when the &D2 or &D3 command is in effect.
NOTE: All ampersand (&) based commands are totally dependent onimplementation. They are extensions from the original HAYES command set.AT &F1DT9,P5551234 [Enter]
This command restores the factory default settings, dials, using tones, a 9 to access an outside line, pauses briefly, then pulse dials the number 555-1234. see above.

Manually Dialing with the Telephone

To manually dial the phone, you should be in your communicationssoftware'scommand mode.

  1. Lift the receiver of the telephone and dial the number you wish to call.
  2. Type ATH1 and press ENTER to connect the modem and then hang up the receiver.
  3. Type AT0 and press ENTER to tell the modem to go online.

Manual Answer

When the automatic answer feature (S-Register S1) is not being used,incoming calls can be answered manually by typing ATA and then pressingENTER when an incoming call is received. The modem will answer theincomingcall and enter the on-line mode.

Online State:
To transmit or receive data, the modem must be in the online state. When placing a call, the modem is put online with the dial command. At the remote end, the modem goes online when it is instructed to answer a call automatically by setting the S-Register S0 equal to any number greater than 0 and less than 255. You can also perform this function with the ATA command.
Escape to Command Mode:
After a connection has been established with a remote modem, you can return to command mode without breaking that connection by typing the escape sequence. The escape sequence consists of three plus signs (+++).

It is not necessary to begin this sequence with the attention code, or by pressing ENTER after typing the escape code.
Return to Online State:
The modem can be returned to the online state after the escape sequence has been sent. To return the modem to the online state, send the ATO command. To return the modem online and then initiate an equalizer retrain sequence, use the ATO1 command.
Repeating the Last Command:
Each command sent to the modem remains in the command buffer until the next command is sent, or until power to the modem is turned off. To repeat the last command sent, type the command A/. The A/ command is not preceded by the AT characters or followed by pressing ENTER. See the command reference for more information.
Omitting a Parameter:
Some commands require a parameter to completely define them. If a parameter is omitted from a command that requires one, the command will use the default value.
Result Codes:
A response is displayed on your screen by the modem, indicating the result after it processes, or tries to process, a command. These result codes display the status of the modem, or the progress of a call sequence, and can take the form of either words or digits. The default consists of word responses that are defined by the ATV1 command. To receive digit responses rather than words, use the ATV0 command. To disable responses entirely, use the ATQ1 command.
Command Syntax:

All control commands to the modem are prefixed with either AT or at andterminated by a carriage return (Enter). Mixed case set (At or aT) is notallowed. The AT sequence is called the Attention command. The Attentioncommand precedes all other commands except re-execute (A/) and the escape(+++) code.

Several commands that are preceded by AT can be entered in a single linefollowed by the carriage return character. Spaces can be inserted betweencommands to increase readability, but will not be stored in the commandbuffer, the size of which is 255 characters. The backspace character canbe used to erase mistakes but is not saved as part of the contents of thecommand buffer in terminal applications. Unsupported commands will belogged and an OK or ERROR will be returned.

Commands will only be accepted by the modem after the previous command hasfully executed. A command line may be canceled at any time by enteringCTRL+X. The AT sequence may be followed by any number of commands insequence, except for commands such as Z, D, or A. Commands following Z, D,or A on the same command line will be ignored. The maximum number ofcharacters on any command line is 56 (including A and T).

Additional information may be found at the Hayes Web site and the USRobotics Web site. Also, your modem manufacturer may have additionalinformation about commands that your modem supports.

Article ID: 164659 - Last Review: 12/04/2015 16:29:40 - Revision: 3.1

Microsoft Windows NT Advanced Server 3.1, Microsoft Windows NT Workstation 3.1, Microsoft Windows NT Workstation 3.5, Microsoft Windows NT Workstation 3.51, Microsoft Windows NT Workstation 4.0 Developer Edition, Microsoft Windows NT Advanced Server 3.1, Microsoft Windows NT Server 3.5, Microsoft Windows NT Server 3.51, Microsoft Windows NT Server 4.0 Standard Edition, Microsoft Windows 95, Microsoft Windows 98 Standard Edition, Microsoft LAN Manager to Windows NT Advanced Server Upgrade, Microsoft LAN Manager 2.2c, Microsoft TCP/IP for Windows for Workgroups 3.11, Microsoft TCP/IP for Windows for Workgroups 3.11a, Microsoft TCP/IP for Windows for Workgroups 3.11b, Microsoft Windows for Workgroups 3.11, Microsoft Internet Information Server 1.0

  • kbnosurvey kbarchive kbinfo KB164659