A typical dialog between a user and a modem could look like this:
AT OK ATDT 7443633 CONNECT 14400
Result codes are quite different from one modem to another, but usually configured with the V and X commands. V0 and V1 denote numeric and verbal result codes respectively. The number after the X denotes the amount of detail and sometimes other features. With X0 set a modem will report simply "CONNECT" after connecting. With X1 the speed will be indicated (e.g. CONNECT 1200, or CONNECT 2400). X1 uses blind dialing (after the S6 delay) as opposed to dial tone detection (usually X2 and above, or X and even numbers).
Blind dialing is useful in several situations, on a pbxor phone system with an unusual dial tone (e.g. voicemail) that may not be detected by the modem, or whenone wishes to dial a phone by hand and then force the modem on hook with the ATO command. Manual dialing is useful on modems that cannot handle extremely long phone numbers and access codes used by some long distance services (due to a 40 character command length limit), or occasionally some modems will break in a way that prevents them from dialing but they can still connect faster.
AT X1 DT 744-3633 AT X1 O
The X1 result code is good for reliability, but the larger X numbers usually give more informative messages. Beware however that some of them can prevent a modem from connecting or dialing. For example the X5 or X6 settings on USR Courier HST and DS modems (at least the older models) attempt to detect aVOICE should a modem not answer. V.32bis connections are erroneously interpreted as voice and the connection is dropped (NO CARRIER)
For brevity not all common commands will be discussed, but Table 2 is provided for a summary. Commands which are followed by a number assume the 0 value if no number is given. Multiple commands can be given after one AT prefix as in previous examples.
A Answer incoming call A/ Repeat last command. (Don't preface with AT. Enter usually aborts.) D Dial the following number and then handshake in originate mode.
P Pulse dial
T Touch Tone dial
W Wait for second dial tone
, Pause for time specified in register S8 (usually 2 seconds)
; Remain in command mode after dialing
! Flash switch-hook (Hang up for a half second as in transfering a
call)
E Will not echo commands to the computer (also E0)
E1 Will echo commands to the computer (so one can see what one types)
H On Hook (hang up, also H0)
H1 Off Hook (phone picked up)
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.)
L Speaker Loudness (L0 off or low volume) -\
L1 Low volume } Modems with volume control
L2 Medium volume (usual default) } knobs will not have these.
L3 Loud or high volume
M Speaker off (M0) (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)
O Return Online (O0 see also X1 as dial tone detection may be active)
O1 Return Online after an equalizer retrain sequence
Q Quiet mode Q0 displays result codes, user sees command responses
(e.g. OK)
Q1 Quiet mode, result codes are suppressed, user does not see responses
Sn? Query the contents of S-register n
Sn=r Store the value r in S-register n
V non-Verbal (Numeric result codes V0)
V1 Verbal english result codes (e.g. CONNECT, BUSY, NO CARRIER etc.)
X Hayes Smartmodem 300 compatible result codes (X0) (Many have more
than 4)
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
Z Reset modem to stored configuration (Z0, Z1 etc. for multiple profiles)
(Same as (factory default) on modems with out NVRAM (non volatile memory)
Carrier detect (CD) signal always on
Carrier detect indicates remote carrier (usual prefered default)
Data Terminal Ready (DTR) signal ignored (See your manual on this one!)
If DTR goes from On to Off the modem goes into command mode (some modems)
Some modems hang upon DTR On to Off transition. (usual prefered default)
Factory defaults (Most modems have several defaults etc.)
( U.S./Canada pulse dialing 39% make/ 61% break ratio
U.K./Hong Kong pulse dialing 33% make/ 67% break ratio
Model specific self tests on some modems
View active (and often stored) configuration profile settings (or
ATI4)
Store profile in NVRAM ( etc. for multiple profiles)
Some settings cannot be stored. These often don't show on or ATI4
Store number x in location n for AT DS on some modems
Register
Range Default Function
-----------------------------------------------------------------------
S0 0-255 rings 1-2 Answer on ring number Don't answer if 0
S1 0-255 rings 0 If S0>0 this register counts incoming
rings
S2 0-127 ASCII 43 + Escape to command mode character S2>127 no ESC
S3 0-127 ASCII 13 CR Carriage return character
S4 0-127 ASCII 10 LF Line feed character
S5 0-32,127 ASCII 8 BS Backspace character
S6 2-255 seconds 2 Dial tone wait time (blind dialing, see Xn)
S7 1-255 seconds 30-60 Wait time for remote carrier
S8 0-255 seconds 2 Comma pause time used in dialing
S9 1-255 1/10 sec 6 Carrier detect time required for recognition
S10 1-255 1/10 sec 7-14 Time between loss of carrier and hang up
S11 50-255 ms 70-95 Duration and spacing of tones when tone dialing
S12 0-255 1/50 sec 50 Guard time for pause around +++ command sequence
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.)
"Transmit Data (TD) Flow Control" CTS The DCE (modem) controls data from the DTE (computer){Hardware} DTE The DCE (modem) controls data from the DTE (computer) {Software}
"Received Data (RD) Flow Control" RTS The DTE (computer) controls data from the DCE (modem) {Hardware} DCE The DTE (computer) controls data from the DCE (modem) {Software}
Almost more confusing than the actual protocols and modem commands is the terminology used to describe error correction (also called error control). Error correction is similar to file transfer protocols such as Kermit, X, Y, or Zmodem. File transfer protocols break files up into chunks called packets. Error correction does the same thing except the blocks of data are called frames and are generally smaller than those typically used by modern file transfer protocols. In all cases additional information such as a checksum is added to the packet (frame) to verify that the data was undamaged in transit. If the data does not match the checksum the entire packet or frame must be resent. This technique trades off some speed for reliability. Like sliding-windows protocols several frames may be sent before an acknowledgment is required. The maximum data block size and the number of frames allowed before an acknowledgment is required are parameters negotiated by the modems when they connect. MNP (Microcom Networking Protocol) 2-4 and 10 are error correction protocols. V.42 is the standard which uses either LAPM (Link Access Procedures for Modems) error correction protocol or MNP 4, 3, or 2. MNP 5 is a data compression protocol. V.42bis is the standard for the BTLZ data compression protocol which is better than MNP 5. Direct, Normal, and Reliable Connections. Many modems will use these terms to distinguish between several types of modem configurations. A direct connection is the old-fashioned sort with no error correction or data compression. In a direct connection the DTE rate (computer serial speed) and the link rate (modem connection speed) must match. A normal connection uses flow control for speed buffering so the DTE and link rates may differ. A reliable connection uses flow control and will often hang up if error correction and data compression cannot be established. An auto-reliable connection is like a reliable one except the modem will fall back to normal or direct mode automatically rather than hang up. The \N command is common to control this, but it is not standard. Here are some example command summaries for a few common modems using \N: Supra FAXmodem v.32bis Bullet 14.4 \N Normal mode \N0 Normal data link \N1 Direct mode \N1 Direct data link \N2 MNP Reliable mode \N2 MNP reliable link \N3 AutoReliable mode \N3 MNP auto-reliable link \N4 LAPM/MNP Reliable Mode \N4 V.42bis reliable link with phase detection \N5 V.42bis auto-reliable link with phase detection \N6 V.42 reliable link without phase detection \N7 V.42 auto-reliable link without phase detection
Generally no parity, eight data bits, one stop bit, and hardware flow control are the most common software settings. Probably the most complicated values to pick can be the DTE rate or serial port speed. This is most easily accomplished by starting at the link rate of the modem and trying successively higher speeds and observing the impact on performance.
Problem: Modem won't dial: Try a regular phone on the modem line and listen for dial tone. If there is no dial tone the problem is the phone line and not the modem. Try X1 to disable dial tone detection. Try pulse dialing ATDP instead of ATDT. Try dialing manually with a phone and then use AT X1 O Problem: Modem dials but won't connect: Try adding commas after the phone number to increase the time the originating modem waits for carrier, or increase the value of S7. (e.g. AT S7=100 DT 744-3633 or ATDT 744-3633,,,,) Try X1 for simple result codes esp. if VOICE result appears after modem tone is heard. Try configuring for a slower link rate (set a lower port speed in your software or modem). Try disabling MNP 4,5, V.42, and V.42bis protocols each. Problem: Modem hangs up for no reason during a connection: Try \A0 for a 64 character maximum MNP block instead of the default 256 char. block. Disconnect all other phones and answering machines on the same line to see if any of them are interfering. Call your phone company if you can hear static on your lines. It is possible your modem may have a bug in its ROM, call your support line to check on the version of your ROM or for other problems unique to your modem.
Problem: Zmodem file transfers don't work: Check parity. X, Y, and Zmodem require none (No Parity). Check flow control. Are the modem and software set the same, preferably RTS/CTS? When using a Cisco terminal server, use the TERMINAL DOWNLOAD command before logging into the host for telnet transparent mode, and use the rlogin command to connect instead of the default telnet protocol used when just the hostname is typed. Use the -l and -L sz options to require acknowledgements and lower the packet size. (See your Zmodem documentation, man sz on Unix systems.) Switch to a more robust protocol like Kermit. Sometimes Ymodem will work when Zmodem will not.
Problem: Call waiting disconnects data calls: Disable call waiting with *70 (or *71 in some areas) before the phone number. AT DT *70, 443-3408 or AT DP 1170+443-3408 (Pulse) (Note this feature is not always available, call your local telephone company to be sure.) Try increasing the value of S10. References: Your modem owner's manual! CCSO User Guide 101: The CCSO Terminal Servers CCSO User Guide 402: Kermit for File Transfer