Here is a description of the Hayes Command Set (la même chose en *.doc). Most modem follow this command set to large extent. If you lost your modem manual or never had one in the first place this reference might come in handy. I for instance finally found out how to turn my modems speaker off: ATM0 -- Finally: Silence !
The modem initialization string consists of a series of commands. It prepares the modem for communications, setting such features as dialing mode, waits, detection of the busy signal and many other settings. Newer modem communications programs reset the initializations string for you according to which menu options you select, which features you enable, etc.
For many years Hayes modems have been the standard. As the field of modem manufactures has grown, most have adhered at least loosely to the Hayes standard. The following is a partial list of the Hayes command set. (called the AT commands). The Hayes Command Set can be divided into four groups:
A "register" is computerese for a specific physical location in memory. Modem have small amounts of memory onboard. This fourth set of commands is used to enter values in a particular register (memory location). The register will be storing a particular "variable" (alpha-numeric information) which is utilized by the modem and communication software. For example, S7=60 instructs your computer to "Set register #7 to the value 60."
Note: Although most commands are defined by a letter-number combination (L0, L1, etc.), the use of a zero is optional. In this case, L0 is the same as a plain "L" - keep this in mind when reading the table below!
Here are some of the most important characters that may appear in the modem initialization string. These characters normally should not be changed.
Command | - Description - | Comments |
---|---|---|
A0 or A | Answer incoming call |
|
A/ | Repeat last command. | (Don't preface with AT. Enter usually aborts.) |
B0 or B | Call negotiation | V32 Mode/CCITT ans Seq |
B1 | Bell 212A Answer Seq |
|
B2 | Verbose/Quiet On Answer |
|
D | Dial | Dial the following number and then handshake in originate mode.
Dial Modifiers (These are common but most modems will have more.)
|
E0 or E | No Echo | Will not echo commands to the computer |
E1 | Echo | Will echo commands to the computer (so one can see what one types) |
H0 or H | Hook status | On hook - hang up |
H1 | Off hook - phone picked up |
|
I0 or I | Inquiry, Information, or Interrogation | (This command is very model specific. I0 usually returns a number or
code, while higher numbers often provide much more useful information.) |
L0 or L | Speaker Loudness
Modems with volume control knobs will not have these options. |
Off or low volume |
L1 | Low volume |
|
L2 | Medium volume |
|
L3 | Loud or high volume |
|
M0 or M | Speaker off | (M3 is also common, but different on many brands) |
M1 | Speaker on until remote carrier detected (until the other modem is
heard) |
|
M2 | Speaker is always on (data sounds are heard after CONNECT) |
|
N0 or N | Handshake Speed | Handshake only at speed in S37 |
N1 | Handshake at highest speed larger than S37 |
|
O0 or O | Return Online | (O0 see also X1 as dial tone detection may be active) |
O1 | Return Online after an equalizer retrain sequence |
|
Q0 or Q | Quiet mode | Off - Displays result codes, user sees command responses (e.g. OK) |
Q1 | On - Result codes are suppressed, user does not see responses |
|
Sn? | Query the contents of S-register n |
|
Sn=r | Store | Store the value r in S-register n |
V0 or V | Verbal? | Numeric result codes |
V1 | English result codes (e.g. CONNECT, BUSY, NO CARRIER etc.) |
|
X0 or X | Smartmodem | Hayes Smartmodem 300 compatible result codes |
X1 | Usually adds connection speed to basic result codes (e.g. CONNECT 1200) |
|
X2 | Usually adds dial tone detection (preventing blind dial and sometimes
ATO) |
|
X3 | Usually adds busy signal detection |
|
X4 | Usually adds both busy signal and dial tone detection |
|
Z0 or Z | Reset | Reset modem to stored configuration (Z0, Z1 etc. for multiple profiles) (Same as &F (factory default) on modems with out NVRAM (non volatile memory) |
Command | - Description - | Comments |
---|---|---|
&B0 or &B | Retrain Parameters | Disable auto retrain function |
&B1 | Enable auto retrain function |
|
&B2 | Enable auto retrain, but disconnect if no line improvement over period
dictated by S7 |
|
&C0 or &C | Carrier detect | signal always on |
&C1 | Indicates remote carrier (usual preferred default) |
|
&D0 or &D | Data Terminal Ready (DTR) | Signal ignored (See your manual on this one!) |
&D1 | If DTR goes from On to Off the modem goes into command mode (some modems) |
|
&D2 | Some modems hang upon DTR On to Off transition. (Usual prefered default) |
|
&D3 | Hang up, reset modem and return to command mode upon DTR |
|
&F0 or &F | Factory defaults | Generic Hayes-compatible defaults.
This is usually a good thing to use in your init string, since the &F1-&F3 settings can vary among modems, and they may actually be the cause of connection problems. (Since you never know exactly what Brand X's &F2 really changes. On the other hand, it pays to try out the other options below; many
people's problems can be solved by replacing a complicated init string
with a simple &F2 or the like. However, if you're building an init
string, it's best to start with a simple &F, and not use the "customized"
form of defaults. |
&F1 | Factory defaults tailored to an IBM-PC compatible user |
|
&F2 | Factory defaults for a Mac w/software handshaking |
|
&F3 | Factory defaults for a Mac w/hardware handshaking |
|
&G0 or &G | Guard tones | Disable guard tones |
&K0 or &K | Local flow control | Disable local flow control |
&K1 | Enable RTS/CTS hardware local flow control |
|
&K2 | Enable XON/XOFF software local flow control |
|
&K3 | Enable RTS/CTS hardware local flow control |
|
&K4 | Enable XON/XOFF software local flow control |
|
&L0 or &L | Dial mode | Select dial-up mode |
&M0 or &M | Error Control mode | Select asynchronous non-EC mode (same as &Q0) |
&P0 or &P | Pulse dialing ratio | U.S./Canada pulse dialing 39% make/ 61% break ratio |
&P1 | U.K./Hong Kong pulse dialing 33% make/ 67% break ratio |
|
&Q0 or &Q | Error Control mode | Asynchronous non-EC more. No data buffering. ASB disabled. |
&Q5 | Select V.42 EC operation (requires flow control) |
|
&Q6 | Asynchronous mode with ASB (requires flow control) |
|
&Q8 | Select alternate EC protocol (MNP) |
|
&Q9 | Conditional data compression: V.42bis = yes, MNP5 = no. |
|
&S0 or &S | DSR Action Select | Always on (default) |
&S1 | Follows EIA specification (Active following carrier tone, and until
carrier is lost.) |
|
&T0 or &T | Self test | Model specific self tests on some modems |
&U0 or &U | Trellis code modulation | Enable V.32 TCM |
&U1 | Disable V.32 TCM |
|
&V0 or &V | View active | (And often stored) configuration profile settings (or ATI4) |
&W0 or &W | Store profile | In NVRAM (&W0, &W1 etc. for multiple profiles) Some settings cannot be stored. These often don't show on &V or ATI4 |
&Y0 or &Y | Select Configuration Loaded at power-up | Load profile 0 (default) |
&Y1 | Load profile 1 |
|
&Zn=x | Soft reset and Load Stored profile #n | Note: All items after the &Z on the command line are ignored |
Note: A direct connection is a simple straight-though connection without any error correction or data compression. In this case, the computer-to-modem and modem-to-modem speeds must be identical.
A normal connection uses flow control (either software or hardware) to buffer the data being sent or received, so that the modem can transmit data at a different rate than the computer is actually sending or receiving it. For example, a computer may send actual data at 57kbps, but using compression, the modem only actually sends 28.8kbps. This is the mode use by most modems.
A reliable connection is a type of normal connection; if, for some reason, data compression or error correction cannot be established or maintained, the connection will hang up. (In essence, such a modem ensures that all connections are reliable, for it will hang up if the connection isn't.)
Likewise, an auto-reliable connection is virtually the same, except that the modem will try to renegotiate the connection in order to establish a reliable connection. Again, this is the mode that most modems use.
Many modems have dozens, even hundreds, of S registers, but only the first dozen or so are fairly standard. They are changed with a command like ATSn=N, and examined with ATSn? (e.g. "AT S10=70 S1?" would tell the modem not to hang up for seven seconds should it not hear the answering modem, and return the number of times the phone last rang.)