Saturday 5 March 2011

Modem Control Codes

This section lists the command and control codes for popular modems. Most modems use a standard
AT command set that was developed by Hayes and augmented by U.S. Robotics. Table 27
comes in handy when you need to reconfigure a modem without the original manual. Even if
your modem is not Hayes or U.S. Robotics, it probably follows most of these commands because
this command set has become somewhat of a standard. S-register values listed at the end of the
table are also somewhat standard but are more subject to variation in the defaults by brand and
model.


Modem AT Commands and S-Register Features

Command Modem Functions and Options

&
% See Extended Command Set
A Force Answer mode when modem has not received an incoming call
A/ Reexecute last command once
A>
Any key Terminate current connection attempt; exit Repeat mode
AT Attention: must precede all other commands, except A/, A>, and +++
Bn Handshake options
B0 CCITT answer sequence
B1 Bell answer tone
Cn Transmitter On/Off
C0 Transmitter Off
C1 Transmitter On—Default
Dn Dial number n and go into originate mode
Use any of these options:
P Pulse dial—Default
T Touch-tone dial
, (Comma) Pause for two seconds
; Return to command state after dialing
“... Dial the letters that follow
! Flash switch-hook to transfer call
W Wait for second dial tone (if X3 or higher is set)
@ Wait for an answer (if X3 or higher is set)
R Reverse frequencies
S Dial stored number
DL Dial the last-dialed number
DSn Dial number stored in NVRAM at position
En Command mode local echo; not applicable after a connection has been made
E0 Echo Off
E1 Echo On
Fn Local echo On/Off when a connection has been made
F0 Echo On (Half duplex)
F1 Echo Off (Full duplex)—Default
Hn On/Off hook control
H0 Hang up (go on hook)—Default
H1 Go off hook
In Inquiry
I0 Return product code
I1 Return memory (ROM) checksum
I2 Run memory (RAM) test
I3 Return call duration/real time
I4 Return current modem settings
I5 Return NVRAM settings
I6 Return link diagnostics
I7 Return product configuration
Kn
K0 ATI3 displays call duration—Default
K1 ATI3 displays real time; set with ATI3=HH:MM:SSK1
Ln
L0 Low
L1 Low
L2 Medium
L3 High
Mn Monitor (speaker) control
M0 Speaker always Off
M1 Speaker On until carrier is established—Default
M2 Speaker always On
M3 Speaker On after last digit dialed, Off at carrier detect
O Return online after command execution
O0 Return online, normal
O1 Return online, retrain
P Pulse dial
Qn Result codes display
Q0 Result codes displayed
Q1 Result codes suppressed (quiet mode)
Q2 Quiet in answer mode only
Sr=n Set Register commands: r is any S-register; n must be a decimal number between 0 and
255.
Sr.b=n Set bit .b of register r to n (0/Off or 1/On)
Sr? Query register r
T Tone dial
Vn Verbal/Numeric result codes
V0 Numeric mode
V1 Verbal mode
Xn Result code options
Yn Long space disconnect
Y0 Disabled
Y1 Enabled; disconnects after 1 1/2-second break
Z Software reset
+++ Escape code sequence, preceded and followed by at least one second of no data
transmission
/(Slash) Pause for 125 msec
> Repeat command continuously or up to 10 dial attempts, Cancel by pressing
any key
$ Online Help—Basic command summary
&$ Online Help—Ampersand command summary
%$ Online Help—Percent command summary
D$ Online Help—Dial command summary
S$
<Ctrl>-S Stop/restart display of Help screens-C Cancel display Help screens
<Ctrl>
<Ctrl>-K Cancel display Help screens



Extended Command Set

&An
&A0 Suppress ARQ result codes
&A1 Display ARQ result codes—Default
&A2 Display HST and V.32 result codes
&A3 Display protocol result codes
&Bn Data Rate, terminal-to-modem (DTE/DCE)
&B0 DTE rate follows connection rate—Default
&B1 Fixed DTE rate
&B2 Fixed DTE rate in ARQ mode; variable DTE rate in non-ARQ mode
&Cn Carrier Detect (CD) operations
&C0 CD override
&C1 Normal CD operations
&Dn Data Terminal Ready (DTR) operations
&D0 DTR override
&D1 DTR Off; goes to command state
&D2 DTR Off; goes to command state and on hook
&D3 DTR Off; resets modem
&F Load factory settings into RAM
&Gn Guard tone
&G0 No guard tone; U.S., Canada—Default
&G1 Guard tone; some European countries
&G2 Guard tone; U.K., requires B0
&Hn Transmit Data flow control
&H0 Flow control disabled—Default
&H1 Hardware (CTS) flow control
&H2 Software (XON/XOFF) flow control
&H3 Hardware and software control
&In Received Data software flow control
&I0 Flow control disabled—Default
&I1 XON/XOFF to local modem and remote computer
&I2 XON/XOFF to local modem only
&I3 Host mode, Hewlett-Packard protocol
&I4 Terminal mode, Hewlett-Packard protocol
&I5 ARQ mode-same as &I2; non-ARQ mode; look for incoming XON/XOFF
&Jn Telephone jack selection
&J0 RJ-11/RJ-41S/RJ-45S
&J1 RJ-12/RJ-13
&Kn Data compression
&K0 Disabled
&K1 Auto enable/disable—Default
&K2
&K3 V.42bis only
&Ln
&L0 Normal phone line—Default
&L1 Leased line
&Mn Error Control/Synchronous Options
&M0 Normal mode, no error control
&M1 Sync mode
&M2 Sync mode 2—stored number dialing
&M3 Sync mode 3—manual dialing
&M4 Normal/ARQ mode—Normal if ARQ connection cannot be made—Default
&M5 ARQ mode—hang up if ARQ connection cannot be made
&Nn Data Rate, data link (DCE/DCE)
&N0 Normal link operations—Default
&N1 300bps
&N2 1,200bps
&N3 2,400bps
&N4 4,800bps
&N5 7,200bps
&N6 9,600bps
&N7 12Kbps
&N8 14.4Kbps
&Pn Pulse dial make/break ratio
&P0 North America—Default
&P1 British Commonwealth
&Rn
Normal/Leased line operation
Enabled
ARQ result codes 14–17, 19
Online Help—S-register summary
Loudness of speaker volume
Modem clock operation
Repeat last command continuously
See Extended Command Set

No comments:

Post a Comment