Modem Commands
Rarely, do you need a list of Modem commands. (For that matter, how do you even send these when troubleshooting a modem? Oh, wait - that's another document I need to produce. How to use the tools that come with Microsoft Windows or Linux to actually send the commands.)
At any rate, if you find the need to actually send commands when troubleshooting a modem, here is a list of some of them.
AT Commands
+++ | Keep data connection and move from data mode to command mode. | |
A | Answer command | |
A/ | Reexecute last command | |
Bn | Protocol for 1200bps operation | |
0 | ITU-T V.22 mode when modem is operating at 1200bps. | |
1 | Bell 212A mode when modem is operating at 1200bps. (default) | |
2 | Unselects V.23 reverse channel (same as B3) | |
3 | unselects V.23 reverse channel (same as B2) | |
15 | Selects V.21 when the modem is at 300 bits/sec. | |
16 | Selects Bell 103J when the modem is at 300 bits/sec (default) | |
D | Dial Command | |
T | Tone Dial | |
P | Pulse Dial | |
L | Redials the last number | |
R | Originate the call using the answer tone. | |
S=n | Dial a stored number (n is the storage location) | |
W | Wait for second dial tone | |
V | The modem switches to speakerphone mode and dials the number | |
^ | Disable data calling tone transmission | |
, | Pause during dialing (set in register S8 - usually .5 sec) | |
@ | Wait for quiet answer. Wait for 5 seconds of silence after dialing a number. If silence is not detected, modem sends a NO ANSWER result code to the user. | |
! | Hookflash for 0.5 seconds | |
; | Causes modem to return to command mode after dialing number | |
En | Echo characters in command mode | |
0 | Do not echo commands | |
1 | Echo commands (default) | |
Hn | Hook switch | |
0 | Go on-hook (hang up modem) | |
1 | Go off-hook | |
Ln | Speaker Volume | |
0 | Very Low | |
1 | Low | |
2 | Medium (Default) | |
3 | High | |
Mn | Speaker Status | |
0 | Speaker always off | |
1 | Speaker on until carrier is detected (default) | |
2 | Speaker always on | |
Nn | DCE data rate | |
0 | When originating or answering call, handshake only at the communication standard specified by S37, and the ATB command | |
1 | When originating or answering call, handshake only at the communication standard specified by S37, and the ATB command. During handshake, modem may fall back to a lower speed (default) | |
On | RETURN to data mode after using escape characters to switch to command mode | |
0 | Return to data mode | |
1 | Perform equalizer retrain sequence, then return to data mode | |
3 | Perform a rate re-negotiating, then return to data mode | |
Qn | Modem Responses | |
0 | Send responses to local computer (default) | |
1 | Do not send response | |
Sn? | Display value stored in register "n" | |
Sn=v | Set register "n" to value "v". | |
Vn | Response format | |
0 | Numeric response format | |
1 | Word response format (default) | |
Xn | Response set | |
0 | Modem ignores dial tone and busy signal; enables response 0-4 | |
1 | Modem ignores dial tone and busy signal; enables extended result codes. | |
2 | Modem ignores busy signal; enables dial tone and extended result codes | |
3 | Modem ignores dial tone and busy signal; enables extended result codes | |
4 | Modem recognizes dial tone, busy signal and extended result codes. (default) | |
5 | Modem recognizes dial tone, busy signal and extended result codes | |
6 | Modem recognizes dial tone, busy signal and extended result codes | |
7 | Modem recognizes dial tone and busy signal and ignores extended result codes | |
Zn | Recall Stored Profiles This command instructs the modem chip set to go on-hook and restore the profile saved by the last &@ command. Either Z0 or Z1 restores the same single profile. | |
0 | Reset and retrieve configuration from profile 0 | |
1 | Reset and retrieve configuration from profile 1 | |
&Cn | Carrier Detect signal status (DCD Signal) Controls the Data Carrier Detect (DCD) signal | |
0 | Forced on continuously | |
1 | Follows status of remote carrier signal (default) | |
&Dn | Data Terminal Ready signal status (DTR signal) Determine how your modem reacts to Data Terminal Ready (DTR) signal | |
0 | Ignore. The modem ignores the true status of DTR signal and treats it as always on. This should only be used if your computer does not provide DTR to the mode. (default) | |
1 | If the DTR signal is not detected while in on-line data mode, the modem enters command mode, issues OK result code, and remains connected. | |
2 | If the DTR signal is not detected while in on-line data mode, the modem disconnects. | |
3 | Modem resets when DTR goes off. | |
&F | Recall factory default | |
0 | Recall factory setting as active configuration | |
&Gn | Guard tones (not used in the USA) | |
0 | Disabled (default) | |
1 | Generate 550 Hz guard tone | |
2 | Generate 1800 Hz guard tone | |
&Kn | Flow Control | |
0 | Disable flow control; same as Q0 command | |
1 | Reserved | |
2 | Reserved | |
3 | Enable hardware flow control (RTS/CTS); same as Q3 (default) | |
4 | Enable software flow control (XON/XOFF); same as Q1 | |
5 | Reserved | |
&Qn | Asynchronous communication mode | |
0 | Asynchronous mode, buffered. Same as N0 | |
5 | Error control mode, buffered. (default) Same as N3 | |
6 | Asynchronous mode, buffered. Same as N0 | |
&Sn | Data Set Ready signal status | |
0 | DSR signal always ON (default) | |
1 | DSR signal is ON during handshaking and OFF in test or idle mode. DSR is OFF when the remote carrier signal is lost. | |
&Tn | Self-test Commands Initiates modem tests. If you want to include this command with other commands, this command must be the last command in the command line. | |
0 | Terminate Test | |
1 | Local analog loopback | |
3 | Local activated remote digital loopback (RDL) | |
6 | Remote | |
&Vn | View any stored configuration profiles | |
0 | View stored profile 0 | |
&Wn | Store current configuration. The following commands and registers can be stored in nonvolatile memory. Commands: Bn, En, Ln, Mn, Qn, T/P, Vn, Xn, &Cn, &Dn, &Gn… Registers: S0, S2, S6, S7, S8, S10, S11, S12, S37 | |
0 | Write S register values to profile 0. | |
&Yn | Select stored profile on power-up reset This command does not change the behavior of the modem, but is included for compatibility with applications that issue the &Y0 command | |
0 | Select stored profile 0 on powerup | |
1 | ERROR (There is one stored profile available with most modems - Profile 0) | |
&Zn=x | Stores telephone numbers (could be up to 4) in nonvolatile memory. | |
n | The memory location (0 - 3) | |
x | The telephone number to be stored To dial a stored number, use the ATDS = n command. Example: AT&Z0=1 555 1212 stores telephone number 1-555-1212 in memory position 0. |
MNP/V.42 and MNP/V.42bis Commands
%Cn | Enable/disable V.42bis / MNP Class 5 data compression | |
0 | Disable data compression | |
1 | Enable data compression (default) | |
Nn | Set operating mode | |
Selects the type of asynchronous data connections the modem will try to establish. A modem that uses V.42 cannot communicate with one using MNP, since the two error correction protocols are different. However, this command ensures that your modem can automatically communicate with modems that use V.42bis, MNP, or no error correction protocol. | ||
0 | Normal mode. No protocol., but flow control is allowed. | |
1 | Direct mode. No protocol and no flow control is allowed. | |
2 | MNP reliable mode or disconnect. | |
3 | V.42/MNP auto-reliable mode (default) | |
4 | V.42 LAP or MNP reliable mode. | |
5 | V.42 LAPM mode (same as N3) | |
7 | V.42 LAPM mode (same as N3) | |
Qn | Set serial port flow | |
Determine how the modem informs your computer to stop sending data so that the modem buffer will not overflow with data. | ||
0 | Disable flow control | |
1 | Bi-directional software (XON/XOFF) flow control. The modem and computer exchange ASCII characters to start and stop data transmission between them. | |
3 | Bi-directional hardware (CTS/RTS) flow control. When your modem receives the Request to Send (RTS) signal from the computer, indicating that the computer wants to send data, the modem responds by sending the CTS signal. Similarly, the modem sends CTS to the computer and expects to receive RTS from the computer. (default) | |
T0 | Inactivity timer disabled. | |
Vn | Protocol result code | |
0 | Disable protocol result code append to DCE speed. | |
1 | enable protocol result code append to DCE speed (default) | |
-Cn | Set calling tone in Data Mode | |
0 | Disable calling tone (default) | |
1 | Enable calling tone |
S-Registers
Register | Range | Value | Default | Definition |
S0 | 0-255 | Rings | 0 | Number of rings to auto-answer |
S1 | 0-255 | Rings | 0 | Holds the number of incoming rings (count) |
S2 | 0-255 | ASCII | 43 | Escape character (^[) |
S3 | 0-127 | ASCII | 13 | Carriage Return character (^M) |
S4 | 0-127 | ASCII | 10 | Line Feed character (^J) |
S5 | 0-255 | ASCII | 8 | Backspace character (^H) |
S6 | 2-255 | Seconds | 2 | Dial tone wait time before blind dialing |
S7 | 1-255 | Seconds | 50 | Remote carrier wait time |
S8 | 0-255 | Seconds | 2 | Comma pause time |
S9 | 1-255 | 100 ms | 6 | Carrier detect response time |
S10 | 1-255 | 100 ms | 14 | Delay between carrier loss and hang-up |
S11 | 50-255 | 1 ms | 95 | Tone duration in DTMF dialing |
S12 | 0-255 | 20 ms | 50 | Escape code guard time |
S13 | Reserved | |||
S14 | Bit Mapped Options | |||
S15 | Reserved | |||
S16 | Test mode bit mapped options | |||
S17 | Reserved | |||
S18 | 0-255 | Seconds | 0 | Modem test timer |
S19 | Reserved | |||
S20 | Reserved | |||
S21 | V.24 bit mapped options | |||
S22 | Speaker bit mapped options | |||
S23 | Bit mapped options | |||
S24 | 0-255 | Seconds | 0 | Sleep inactivity timer |
S25 | 0-255 | 10 ms | 5 | Data Terminal Ready (DTR) delay |
S26 | 0-255 | 10 ms | 1 | RTS to CTS delay |
S27 | Bit mapped options | |||
S28 | Bit mapped options | |||
S29 | 0-255 | 10 ms | 0 (disable) | Flash dial modifier time |
S30 | 0-255 | 10 Sec | 0 (disable) | Inactivity time before hang up |
S31 | Bit mapped options | |||
S32 | 0-255 | ASCII | 17 | XON Character |
S33 | 0-255 | ASCII | 19 | XOFF Character |
S34 | Reserved | |||
S35 | Reserved | |||
S36 | 7 | LAPM failure control | ||
0 | Modem disconnects | |||
3 | Modem stays on line and establishes a normal mode (speed buffering) connection. | |||
4 | Attempts MNP connection. If fails, it disconnects. | |||
7 | Attempts MNP connection. If fails, it establishes a normal mode (speed buffering) connection. | |||
S37 | 0-12 | 0 | Desired DTE connection speed | |
0 | Attempt automode connection (F0) | |||
1-3 | 300 BPS (F1) | |||
4 | Reserved | |||
5 | 1200 BPS (F4) | |||
6 | 2400 BPS (F5) | |||
7 | 75 BPS send / 1200 BPS receive V.23 (F3) | |||
8 | 4800 BPS (F6) | |||
9 | 9600 BPS (F8) | |||
10 | 12000 BPS (F9) | |||
11 | 14000 BPS (F10) | |||
12 | 7200 BPS (F7) | |||
S38 | 0-255 | Seconds | 20 | Delay before forced disconnect |
S39 | 0-6 | 3 | Flow Control | |
0 | No flow control | |||
3 | RTS / CTS (&K3) | |||
4 | XON / XOFF | |||
5 | Transparent XON (&K5) | |||
6 | Both methods (&K6) | |||
S40 | Bit mapped options | |||
S41 | Bit mapped options | |||
S42 | Reserved | |||
S43 | Reserved | |||
S44 | Reserved | |||
S45 | Reserved | |||
S46 | 136 / 138 | 138 | Data compression selection | |
136 | Error correction with no compression | |||
138 | Error correction and compression |
Modem Result Codes
This is the result codes that can come back from the modem:
Short Form Long Form n Value in AT Xn Command 0 1 2 3 4 0 OK X X X X X 1 CONNECT X X X X X 2 RING X X X X X 3 NO CARRIER X X X X X 4 ERROR X X X X X 5 CONNECT 1200 X1 X X X X 6 NO DIALTONE X1 X1 X X X 7 BUSY X1 X1 X1 X X 8 NO ANSWER X X X X X 9 CONNECT 0600 X1 X X X X 10 CONNECT 2400 X1 X X X X 11 CONNECT 4800 X1 X X X X 12 CONNECT 9600 X1 X X X X 13 CONNECT 7200 X1 X X X X 14 CONNECT 12000 X1 X X X X 15 CONNECT 14400 X1 X X X X 16 CONNECT 19200 X1 X X X X 17 CONNECT 38400 X1 X X X X 18 CONNECT 57600 X1 X X X X 22 CONNECT 1200 TX / 75 RX X1 X X X X 23 CONNECT 75 TX / 1200 RX X1 X X X X 40 CARRIER 300 X 44 CARRIER 1200 / 75 X 45 CARRIER 75 / 1200 X 46 CARRIER 1200 X 47 CARRIER 2400 X 48 CARRIER 4800 X 49 CARRIER 7200 X 50 CARRIER 9600 X 51 CARRIER 12000 X 52 CARRIER 14400 X 69 COMPRESSION: NONE X 76 PROTOCOL: NONE X 33 FAX X X X X X 34 +FCERROR X X X X X 35 DATA X X X X X