Hayes was the first modem manufacturer to develop modems to support multiple communication methods, up until that time, you had to buy matching pairs of modems to get computers to communicate across analog voice phone lines. Hayes big selling point was that their modem could talk to (almost) any other modem. To support different configurations of the local Hayes modem for each remote connection Hayes developed the AT command set. This allowed Hayes customers to inform the modem which functions and modes to use when initiating a connection to a remote modem, even one that was not a Hayes modem.
This allowed companies to buy one modem model, which in turn lowered hardware costs and made Hayes the leading vendor (for a time). Terminal software first sent the letters AT for 'attention' and then sent the rest of the Hayes commands as a configuration string of up to 45 characters. The Hayes "AT" command from the ATtention command which the AT command set gets its name. Terminal software soon provided the means to store these modem command codes. Not long after, many other modem manufacturers adopted the AT command set to be compatible with the terminal software available.
The basic command set was later extended to support the new capabilities and higher speeds of the newer modems.
Below is a chart of the basic and extended AT modem command set. Keep in mind that not all modems support the full extended AT command set and that many modems have many other proprietary commands in addition to ones listed below. To make adjustments to your modem string, always consult your modem's owners manual, where most of this information comes from.
Typically, a modem string will look something like the following when sent to the modem:
ATZ0DT 9 W 1 2125551212^M
Your can configure a string of up to 45 characters following the D for 'dial'. The pattern for each command in the configuration string is either "Capital Letter-Number"; "Symbol-Capital Letter-Number" or "Symbol-Capital Letter-Number-equal sign-Number" (S37=0). Below is a table of commands cobbled together from a number of modem manuals I had laying around. Note that since the manuals differed slightly, the table contains some best guesses as to the actual function of a command.
I have included not only the Hayes AT command set, but several proprietary extensions to the set supported by Rockwell etc.
HAYES AT COMMAND SET | ||||||||||||||
AT Dialing Commands | ||||||||||||||
CMD | ACTION | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+++ | Escape sequence. Notify the modem that a command is forthcoming. Escape is followed by other commands such as 'H' for hang-up/off-hook, or 'O' for 'on-hook'. Whilst 'mudding' on the old BBS systems we would social-engineer boisterous newbies into typing +++H. If their terminal package wasn't smart enough, the newbie disappeared and we got some much needed peace and quiet. This worked fairly well, at least until they got wise. --InetD |
|||||||||||||
~~~ | ||||||||||||||
AT | Attention modem. Precedes all modem commands except escape. E.g.: ATZ0 or ATDT2125551212 | |||||||||||||
A | Enters answer mode. After going off hook, the modem will answer the incoming call. It will then go on-line with the other modem. | |||||||||||||
A/ | Repeat the previous command. This is useful for dialing
the same number repeatedly with the same settings. |
|||||||||||||
Dm | T | Touch-tone dialing mode (uses the POTS DMT). If you hear different pitched tones instead of pops when you dial your phone, AND your call goes through, use this setting. | ||||||||||||
P | Pulse dial mode. Used by older phone systems and dying out rapidly. Use this setting if your phone only works when you have your phone set for pulse mode (the old ticking/popping dialing sound). | |||||||||||||
Zn | 0 | Reset modem and recall the first factory default stored in NVRAM. This usually cannot be modified by the user. | ||||||||||||
1 | Reset modem and recall the second factory provided default stored in NVRAM. Sometimes this setting can be modified by the user. | |||||||||||||
n | Reset the modem and recall user-stored setting 'n'. Additional settings are not always available or present, but if they are, they are usually blank. These are 'slots' set aside for the user to store frequently used configurations. | |||||||||||||
&Fn | 0 | Recall the factory default settings from NVRAM. | ||||||||||||
n | Recall stored user settings from NVRAM. | |||||||||||||
Extended AT Commands | ||||||||||||||
CMD | ACTION | |||||||||||||
Bn | 0 | Use CCITT V.22 at 1200 bps | ||||||||||||
1 | Use 212A at 1200 bps. Not supported in the United Kingdom | |||||||||||||
2 | When making a call using CCITT V.23, transmit at 75 bps and receive at 1200 bps. When answering and N0, transmit at 1200 bps and receive at 75 bps. | |||||||||||||
3 | When making a call using V.23, transmit at 1200 bps and receive at 75 bps. When answering and N0 selected, transmit at 75 bps and receive at 1200 bps. | |||||||||||||
15 | Use CCITT V.21 at 300 bps | |||||||||||||
16 | Use 103 at 300 bps. Not supported in the United Kingdom. |
|||||||||||||
41 | Use CCITT V.32 at 4800 bps | |||||||||||||
42 | Use Express 96 at 4800 bps | |||||||||||||
60 | Use CCITT V.32 at 9600 bps | |||||||||||||
61 | Use Hayes Express 96 proprietary protocol 9600 bps connection. | |||||||||||||
En | 0 | In command state, characters are not echoed from the keyboard to the screen. | ||||||||||||
1 | In command state, characters are echoed from the keyboard to the screen | |||||||||||||
Hn | 0 | After hanging up, place modem in command state. | ||||||||||||
1 | After going off hook, operate auxiliary relay | |||||||||||||
In | 0 | Show numeric product code | ||||||||||||
1 | ROM checksum is calculated | |||||||||||||
2 | ROM checksum is verified (output is OK or ERROR) | |||||||||||||
Ln | 0,1 | Speaker volume LOW | ||||||||||||
2 | Speaker volume MEDIUM | |||||||||||||
3 | Speaker volume HIGH | |||||||||||||
Mn | 0 | Turn the modem speaker off | ||||||||||||
1 | Turn the modem speaker on until a carrier signal is detected. This is useful for troubleshooting dialing problems, such as a wrong number or other problem. | |||||||||||||
2 | Speaker always on. Useful for troubleshooting cross-talk issues. | |||||||||||||
3 | Except when dialing, speaker on until carrier detected | |||||||||||||
Nn | 0 | Handshake only at rate specified by S37 while originating or answering | ||||||||||||
1 | Negotiate common communication standard, while originating, at the optimum line speed supported by both modems. Negotiations start at the DCE line speed specified in S37, dropping back to a slower speed if required. Go back from CCITT V.22 to CCITT V.21, when answering. | |||||||||||||
2 | Negotiate common communication standard, while originating, at the optimum line speed supported by both modems. Negotiations start at the DCE line speed specified in S37, dropping back to a slower speed if required. Go back from CCITT V.22 to CCITT V.23/CCITT V.21, when answering. | |||||||||||||
3 | Handshake only at speed defined by S37, when originating. Go back from CCITT V.32 to CCITT V.22./212A/CCITT V.22bis, finally 103, when answering | |||||||||||||
4 | Handshake only at speed defined by S37, when originating. Go back from CCITT V.32 to CCITT V.22./212A/CCITT V.22bis, finally 103, when answering | |||||||||||||
5 | Negotiate common communication standard, while originating, at the optimum line speed supported by both modems. Negotiations start at the DCE line speed specified in S37, dropping back to a slower speed if required. Handshake only at speed defined by S37, when answering. | |||||||||||||
On | 0 | Enter on-line state | ||||||||||||
1 | Enter on-line state. Then start equalizer retrain sequence | |||||||||||||
3 | Enter on-line state. Then start CCITT V.32bis rate renegotiation sequence | |||||||||||||
Qn | 0 | Result codes are returned | ||||||||||||
1 | Result codes are not returned | |||||||||||||
2 | Result codes are returned in originate mode. Result codes are not returned in answer mode | |||||||||||||
Vn | Result codes are shown as 0=numbers; 1=words | |||||||||||||
Wn | 0 | Negotiation progress messages are not returned | ||||||||||||
1 | Negotiation progress messages are returned | |||||||||||||
2 | Negotiation progress messages are not returned. CONNECT messages are returned with modem-to-modem (DCE) speeds, not modem-to-DTE speeds. | |||||||||||||
Xn | 0 | Give basic call progress result codes: CONNECT , NO CARRIER ,and RING | ||||||||||||
1 | Give basic call progress result codes and connection speeds (for example, CONNECT 2400) | |||||||||||||
2 | Give basic call progress result codes, connection speed, and DIALTONE detection | |||||||||||||
3 | Give basic call progress result codes, connection speed and BUSY signal detection | |||||||||||||
4 | Give basic call progress result codes connection speed, BUSY signal detection and DIALTONE detection. | |||||||||||||
Yn | 0 | Ignore longspace disconnect | ||||||||||||
1 | Obey longspace disconnect | |||||||||||||
Rockwell Compatible S-Register Commands | ||||||||||||||
CMD | FUNCTION | |||||||||||||
Sr? | Read and respond with current value of register r.
The question mark '?' requests the value assigned to that register. Eg. Use "S37?" to find out what speed the modem is configured to attempt to negotiate first. |
|||||||||||||
Sr=n | Register r is set to n.
|
|||||||||||||
r | Default | Range | FUNCTION | |||||||||||
0 | 0 | 0-255 | Number of rings before the Auto-Answer function goes on-hook and answers the call | |||||||||||
1 | 0 | 0-255 | Ring counter | |||||||||||
2 | 43 | 0-255 | The ASCII code for the character used as 'escape' (Default = ASCII 43 '+') | |||||||||||
3 | 13 | 0-127 | The ASCII code for the character used as 'return' (Default = ASCII 13 '^M') | |||||||||||
4 | 10 | 0-127 | The ASCII code for the character used as 'line feed' (Default = ASCII 10 'LF') | |||||||||||
5 | 8 | 0-127 | The ASCII code for the character used as 'backspace' (Default = ASCII 8 '^T') | |||||||||||
6 | 2 | 2-255 | Number of seconds to wait before blind dialing. | |||||||||||
7 | 50 | 1-255 | Number of seconds to wait for a carrier signal after dialing. | |||||||||||
8 | 2 | 0-255 | Number of seconds to pause when a comma is encountered in the dial string. | |||||||||||
9 | 6 | 1-255 | Time between carrier detect and response. Setting is in tenths of seconds (i.e.. default is .6 seconds). | |||||||||||
10 | 14 | 1-255 | Time to wait to hang up after detecting loss of carrier (indicated in tenths of seconds) | |||||||||||
11 | 95 | 50-255 | How many milliseconds each touch tone should last. | |||||||||||
12 | 50 | 0-255 | Guard time before the escape code is received, measured in 50ths of a second (eg. default=1 second) | |||||||||||
18 | 0 | 0-255 | Test timer. Set the length of time, in seconds, that the modem conducts a test (commanded by &Tn) before returning to the command mode. If this register value is zero, the test will not automatically terminate; the test must be terminated from the command mode by issuing an &T0 or H command. When S18 is non-zero, the modem returns the OK message upon test termination. |
|||||||||||
25 | 5 | 0-255 | Delay to Data Transmit Receive | |||||||||||
26 | 1 | 0-255 | RTS to CTS delay interval | |||||||||||
30 | 0 | 0-255 | Inactivity timeout in tens of seconds. Setting this to 0 disables this setting. If |
|||||||||||
37 | 0 | 0-10 | Desired DTE speed (modem to modem). This setting is used by the N commands. |
|||||||||||
S37= | FUNCTION | |||||||||||||
0 | Auto-negotiate; use this for all speeds above 14,400 | |||||||||||||
1-3 | 300 bps | |||||||||||||
5 | 1200 bps | |||||||||||||
6 | 2400 bps | |||||||||||||
7 | V.23 mode (75/1200 bps) | |||||||||||||
8 | 9600 bps | |||||||||||||
9 | 12,000 bps | |||||||||||||
10 | 14,400 bps | |||||||||||||
38 | 20 | 0-255 | This register specifies the delay between the modem's receipt of the H command to disconnect (or ON-to-OFF transition of DTR if the modem is programmed to follow the signal), and the disconnect operation. Applicable to error-correction connection only. This register can be used to ensure that data in the modem buffer is sent before the modem disconnects. If S38 is set to a value between 0 and 254, the modem will wait that number of seconds for the remote modem to acknowledge all data in the modem buffer before disconnecting. If time expires before all data has been lost. If all data is transmitted prior to time-out, the response to the H0 command will be OK. If S38 is set to 255, the modem does not time-out and continues to attempt to deliver data in the buffer until the connection is lost or the data is delivered. |
|||||||||||
95 | 0 | - | The bits in this register can be set to override some of the Wn command options. A Bit set to 1 in this register will enable the corresponding result code regardless of the Wn setting. Bit 0 CONNECT result code indicates DCE speed instead of DTE speed. Bit 1 Append/ARQ to CONNECT XXXX result code in error-correction mode
(XXXX=rate) |
|||||||||||
Extended '&' Commands | ||||||||||||||
CMD | FUNCTION | |||||||||||||
&A0 | When auto-answering, connect as answering modem | |||||||||||||
&A1 | When auto-answering, connect as originating mode, | |||||||||||||
&C0 | Presence of carrier detect signal is assumed (ROM default. This value is recalled after &F is issued) | |||||||||||||
&C1 | Track status of carrier detect signal | |||||||||||||
&C2 | Presence of carrier detect signal is assumed until on-line. From that point, track status of signal | |||||||||||||
&D0 | Status of DTR signal is ignored. (ROM Default. This value is recalled after &F is issued) | |||||||||||||
&D1 | DTR signal is monitored. The modem enters command state after an on-to-off transition of DTR signal. If the connection is intact, the O0 command returns to the on-line state. | |||||||||||||
&D2 | DTR signal is monitored. The modem hangs up and enters command state after an on-to-off transition of DTR signal. | |||||||||||||
&D3 | DTR signal is monitored. The modem hangs up and resets after an on-to-off transition of DTR signal. | |||||||||||||
&G0 | Guard tones not used (Not supported in Netherlands, Norway, Sweden, Switzerland, or the United Kingdom) | |||||||||||||
&G2 | 1800 Hz Guard tones are used | |||||||||||||
&J0 | Configure for RJ-11, RJ-41S, RJ-45S telco jacks | |||||||||||||
&J1 | Configure for RJ-12, RJ-13 telco jacks (Not supported in Netherlands, Norway, Sweden, Switzerland, or the United Kingdom) | |||||||||||||
&K0 | Local flow control disabled | |||||||||||||
&K1 | RTS/CTS local flow control enabled | |||||||||||||
&K2 | XON/XOFF local flow control enabled | |||||||||||||
&K3 | RTS/CTS local flow control enabled. Often used for Rockwell Protocol Interface modems with no onboard error correction. | |||||||||||||
&K4 | XON/XOFF local flow control enabled | |||||||||||||
&K5 | Transparent XON/XOFF local flow control enabled | |||||||||||||
&L0 | Set for dial-up mode | |||||||||||||
&L1 | Set modem for conditioned leased line (private speech band circuit) mode | |||||||||||||
&On | Go to the X.25 PAD command state of channel n(n=0-3) from the AT command state. The modem will return to the command state of last channel selected, if a parameter for this command is not specified. | |||||||||||||
&Q0 | Communicate in asynchronous mode | |||||||||||||
&Q1 | Communicate is asynchronous mode 1 - Async-to-Sync | |||||||||||||
&Q2 | Communicate in asynchronous mode 2 - Stored Number Dial | |||||||||||||
&Q3 | Communicate in asynchronous mode 3 - Voice/Data Switch | |||||||||||||
&Q4 | Communicate in asynchronous mode 4 - Hayes AutoSync. | |||||||||||||
&Q5 | Communicate in error-control mode | |||||||||||||
&Q6 | For interfaces requiring constant speed between the DTE (computer/terminal) and the DCE (modem), communicate in asynchronous mode with automatic speed buffering (ASB) | |||||||||||||
&Rn | 0 | Track CTS according to RTS | ||||||||||||
1 | Assume CTS (ignore RTS) | |||||||||||||
&S0 | Assert DSR signal always | |||||||||||||
&S1 | Assert DSR signal before handshake only | |||||||||||||
&S2 | After handshake negotiation, assert DSR signal, but before CONNECT XXXXX result code is sent to the DTE | |||||||||||||
&Tn | 0 | Halt any test in progress * | ||||||||||||
1 | Start local analog loopback * | |||||||||||||
3 | Start local digital loopback * | |||||||||||||
4 | Grant request from remote modem for remote digital loopback * | |||||||||||||
5 | Deny request from remote modem for remote digital loopback * | |||||||||||||
6 | Start remote digital loopback * | |||||||||||||
7 | Start remote digital loopback with self-test * | |||||||||||||
8 | Start local analog loopback with self-test * | |||||||||||||
19 | Find out if RTS and CTS circuits are supported in the DTE cable ** | |||||||||||||
&U0 | Trellis coding enabled (CCITT V.32 9600 bps only) | |||||||||||||
&U1 | Trellis coding disabled | |||||||||||||
&V | View active, user profiles, and stored telephone numbers | |||||||||||||
&W0 | Write current configuration parameters in memory as profile 0 | |||||||||||||
&W1 | Write current configuration parameters in memory as profile 1 | |||||||||||||
&X0 | Derive transmit clock signal from modem's internal oscillator (internal clock signal on pin 15) | |||||||||||||
&X1 | Derive transmit clock signal from attached computer (external clock signal on pin 24) | |||||||||||||
&X2 | Derive transmit clock signal from receive carrier (slave receive clock signal on pin 15) | |||||||||||||
&Y0 | Set stored user profile 0 as power-up configuration | |||||||||||||
&Y1 | Set stored user profile 1 as power-up configuration | |||||||||||||
&Zn=x | Store phone number x in location n ( where n=0 through 3) |
Notes:
* For the loopback tests commands to work (&T)
you have to set the modem to unbuffered asynchronous mode using &Q0.
** Not all terminal emulators support &T19.