Virtual Modem PRO - The Hayes Command Set

The modem initialization string consists of a series of commands which are called Hayes ("AT") commands. For many years Hayes compatible modems have been a standard. Virtual Modem Pro by Eltima Software has adhered the Hayes commands as well, however due to its Virtual Serial Ports technology some of the "AT" commands became obsolete. Those commands that aren't supported by Virtual Modem Pro will always return "ERROR" in response. In case your application needs specific Hayes commands emulation, please, contact our support team to get in touch with our developers.

The following is a partial list of the Hayes command set (called the "AT" commands). It can be divided into several groups:

Basic Command Set
A capital character followed by a digit. For example, ATDT#.
Extended Command Set
An "&" (ampersand) and a capital character followed by a digit. This is an extension of the basic command set. For example, "&AT&V".
Proprietary Command Set
These are commands that are unique and supported just by Virtual Modem Pro
Register Commands
ATSr=n where "r" is the number of the register to be changed and "n" is the new value that is being assigned.

A "register" refers to a specific physical location in memory. Modems have small amounts of memory onboard (ROM). 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 can be 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!

 


The Basic Hayes Command Set - Alphabetical

Command Description Comments
A0 or A Answer incoming call
The A command instructs the modem to go off hook and respond to an incoming call, then handshake with the remote modem
B0 or B Select Communication Standard V.22 when line speed is at 1200 bps.
B1 Domestic industry standard 212A when line speed is at 1200 bps.
D Dial Command Dial the following number and then handshake in originate mode.

Dial Modifiers

(These are common but most modems will have more.)

P
Pulse dial *
T
Touch Tone dial *
S=n
Dials telephone number stored in location n, where n is 0, 1,or 2. You must have previously saved the value with the AT&Z command
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 transferring a call)

 

E0 or E Command State Character Echo Selection Will not echo commands to the computer
E1 Will echo commands to the computer (so one can see what one types)
F0 or F On-line State Character Echo Selection * On-line character echo enabled (where not supported, ERROR result code is returned)

F1 On-line character echo disabled
H0 or H Hook Command Options On hook - hang up
H1 Off hook - phone picked up
I0 or I Internal Memory Tests Connection speed
I1 Checksum (usually 3 digits)
I2 Always returns "OK"
I3 Additional information
I4 Product name
I5 - I7 Reserved
L0 or L Speaker Volume Level Selection * Off or low volume
L1 Low volume
L2 Medium volume
L3 Loud or high volume
M0 or M Speaker On/Off Selection* Speaker always off
M1 Speaker on until remote carrier detected (until the other modem is heard)
M2 Speaker always on; stays on after carrier is detected.
N0 or N Negotiation of Handshake Options * Handshake only at speed in S37
N1 Handshake at highest speed larger than S37
Q0 or Q Result Code Display Options Off - Displays result codes, user sees command responses (e.g. OK)
Q1 On - Result codes are suppressed, user does not see responses
Sn? Addresses An S-register Query the contents of S-register n
Sn=r Read An S-register Store the value r in S-register n
V0 or V Result Code Format Options Numeric result codes
V1 Verbose result codes (e.g. CONNECT, BUSY, NO CARRIER etc.)
W0 or W Negotiation Progress Message Selection * CONNECT result code reports DTE speed, and if S95=0, then disable all extended result codes.
W1 CONNECT result code reports DTE speed, and if S95=0, then enable the CARRIER and PROTOCOL extended result codes.
W2 CONNECT result code reports DCE speed, and if S95=0, then disable all extended result codes.
X0 or X Call Progress Options Hayes Smartmodem 300 compatible result codes
X0 Busy and dial tone detection are disabled. Only result codes 0-4 are enabled. Only the CONNECT result code is permitted, but with no indication of the telephone line speed. This setting overrides any other result code selections made with the W command and S95
X1 Busy and dial tone detection are disabled. Result codes 0-5 are enabled and line speed reporting with CONNECT XXXX messages. W command options and S95 are enabled
X2 Busy detection is disabled. Dial tone detection is enabled. Result codes 0-6 are enabled and line speed reporting with CONNECT XXXX messages. W command options and S95 are enabled
X3 Busy detection is enabled. Dial tone detection is disabled. Result codes 0-5 and 7 are enabled and line speed reporting with CONNECT XXXX messages. W command options and S95 are enabled
X4 Busy and dial tone detection are enabled. Result codes 0-7 are enabled and line speed reporting with CONNECT XXXX messages. W command options and S95 enabled
Z0 or Z Soft Reset Command Reset modem to stored configuration (Z0, Z1 etc. for multiple profiles)
(Same as &F (factory default) on modems with out NVRAM (non volatile memory)

 

The Extended Hayes Command Set
(Ampersand Commands )

Command Description Comments
&D1 Data Terminal Ready (DTR) If DTR goes from On to Off the modem goes into command mode (some modems)
&D3 Hang up, reset modem and return to command mode upon DTR
&F0 or &F Factory defaults Reset modem to generic Hayes-compatible defaults.
&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 Line Type Selection (Dial-up/Leased) Select dial-up mode
&L1 Select Leased line (Private Circuit) operation
&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.
&R0 or &R RTS/CTS Options ACTS tracks RTS while the modem is in on-line state and observes the RTS-to-CTS delay determined by S26
&R1 CTS is ON while the modem is in the On-Line State, and RTS is ignored
&T0 or &T Test Options Model specific self tests on some modems
&V View Configuration Profiles The &V command is used to display the active and stored profiles (commands and S-register settings) along with any stored telephone numbers
&W0 or &W Write Active Profile to Memory Store the Active Profile into Stored Profile 0
&W1 I Store the Active Profile into Stored Profile 1
&Y0 or &Y Select Configuration Loaded at power-up Load profile 0 (default)
&Y1 Load profile 1
&Zn=x Store Telephone Number Store up to four (0-3) dialing strings in the modem's nonvolatile memory for later dialing

Proprietary Virtual Modem Commands:

Command Description Comments
&P Set the default client port This command sets the default client TCP port which will be used to connect to remote server. Example:
&P5500 -- assign the default client port to 5500
&H Set the hostname to connect to
This command sets the hostname (IP address or FQDN) and optionally TCP port to connect to. Examples:
&H192.168.0.1 -- set the default hostname to 192.168.0.1
&H192.168.0.1:5410 -- set the default hostname to 192.168.0.1 and TCP port to 5410
&H'server.com' -- set the default domain name to server.com

S-Registers:

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 hangup
S11 50-255 millisec. 70-95 Duration and spacing of tones when tone dialing
S12 0-255 1/50 sec. 50 Guard time for pause around +++ command sequence
S40 0-255 rings. 40 Wait time for remote answer

* - these commands are simple stubs that are implemented for compatibility however don't modify modem's settings.