Information on the Hayes compatible modem

See bottom of this page for source to the simple terminal programs and source for a null modem file transfer.

Here I will discuss information on the Hayes compatible modem and some of its interesting features like speaker control, call waiting, and others.
If you don't see some info that you are looking for about modems, let me know and I will add it to this page.

Modem Speaker Volume Control
The AT commands for the modem speaker control and volume levels are the same with all the high speed models. When adding AT commands to
your existing init strings, you will need to be sure to place the commands at the end of the existing string.

The high speed Hayes modems support two specific commands to control the volume level and the speaker controls. With the Ln command,
you can set the volume level. While with the Mn command, you can control the speaker functions. (n being a numeric value from 0 through 3).

Speaker Volume Level
AT Command    Setting Result
  L0           Low speaker volume
  L1           Low speaker volume
  L2           Medium speaker volume
  L3           High speaker volume

Speaker Function Option
AT Command    Setting Result
  M0           Speaker always off.
  M1           Speaker on while off hook until carrier detected.
  M2           Speaker always on while off hook;stays on after carrier is detected.
  M3           Speaker off as digits are dialed, then on until carrier is detected.


Hayes compatible AT commands
NOTE: All command strings are to be preceded by "AT"
AT Command    Setting Result
 A/            Re-execute command.
 A             Go off-hook and attempt to answer a call.
 B0            Select V.22 connection at 1200 bps.
 B1            Select Bell 212A connection at 1200 bps.
 Dn            Dial modifier.
 E0            Turn off command echo.
 E1            Turn on command echo.
 H0            Initiate a hang-up sequence.
 H1            If on-hook, go off-hook and enter command mode. 
 I0            Report product code. 
 I1            Report pre-computed checksum. 
 I2            Report OK. 
 I3            Report firmware revision, model, and interface type. 
 I4            Report response programmed by an OEM. 
 I5            Report the country code parameter. 
 I6            Report modem data pump model and code revision. 
 L1            Set low speaker volume. 
 L2            Set medium speaker volume. 
 L3            Set high speaker volume. 
 M0            Turn speaker off. 
 M1            Turn speaker on during handshaking and turn speaker 
                off while receiving carrier. 
 M2            Turn speaker on during handshaking and while receiving carrier. 
 M3            Turn speaker off during dialing and receiving carrier and turn
                speaker on during  answering. 
 N0            Turn off automode detection. 
 N1            Turn on automode detection. 
 O0            Go on-line. 
 O1            Go on-line and initiate a retrain sequence. 
 P             Force pulse dialing. 
 Q0            Allow result codes to DTE. 
 Q1            Inhibit result codes to DTE. 
 Sn            Select S-Register as default.
 Sn?           Return the value of S-Register n.
 =v            Set default S-Register to value v.
 ?             Return the value of default S-Register.
 T             Force DTMF dialing.
 V0            Report short form (terse) result codes.
 V1            Report long form (verbose) result codes.
 W0            Report DTE speed in EC mode.
 W1            Report line speed, EC protocol and DTE speed.
 W2            Report DCE speed in EC mode.
 X0            Report basic call progress result codes, i.e.,
                OK, CONNECT, RING, NO CARRIER (also, for  busy, if
                enabled, and dial tone not detected), NO ANSWER and ERROR.
 X1            Report basic call progress result codes and connections 
                speeds (OK, CONNECT, RING, NO  CARRIER (also, for busy, if
                enabled, and dial tone not detected), NO ANSWER, CONNECT XXXX,
                and ERROR.
 X2            Report basic call progress result codes and connections speeds,
                i.e., OK, CONNECT, RING,  NO CARRIER (also, for busy, if 
                enabled, and dial tone not detected), NO ANSWER, CONNECT XXXX,
                and ERROR.
 X3            Report basic call progress result codes and connection rate, i.e.,
                OK, CONNECT, RING, NO  CARRIER, NO ANSWER, CONNECT XXXX, BUSY,
                and ERROR.
 X4            Report all call progress result codes and connection rate, i.e.,
                OK, CONNECT, RING, NO  CARRIER, NO ANSWER, CONNECT XXXX, BUSY,
                NO DIAL TONE and ERROR.
 Y0            Disable long space disconnect before on-hook. 
 Y1            Enable long space disconnect before on-hook. 
 Z0            Restore stored profile 0 after warm reset. 
 Z1            Restore stored profile 1 after warm reset. 
 &C0           Force RLSD active regardless of the carrier state. 
 &C1           Allow RLSD to follow the carrier state. 
 &D0           Interpret DTR ON-to-OFF transition per &Qn:
 &Q0,&Q5,&Q6   The modem ignores DTR. 
 &Q0,&Q5,&Q6   Asynchronous escape. 
 &D2           Interpret DTR ON-to-OFF transition per &Qn:
 &Q0 -- &Q6    The modem hangs up. 
 &D3           Interpret DTR ON-to-OFF transition per &Qn:. 
 &Q0,&Q5,&Q6   The modem performs soft reset. 
 &F0           Restore factory configuration 0. 
 &F1           Restore factory configuration 1. 
 &K0           Disable DTE/DCE flow control. 
 &K3           Enable RTS/CTS DTE/DCE flow control. 
 &K4           Enable XON/XOFF DTE/DCE flow control. 
 &K5           Enable transparent XON/XOFF flow control. 
 &K6           Enable both RTS/CTS and XON/XOFF flow control. 
 &Q0           Select direct asynchronous mode. 
 &Q5           Modem negotiates an error corrected link. 
 &Q6           Select asynchronous operation in normal mode. 
 &V            Display current configurations. 
 &V1           Display connection statistics.
 &W0           Store the active profile in NVRAM profile 0. 
 &W1           Store the active profile in NVRAM profile 1. 
 &Y0           Recall stored profile 0 upon power up. 
 &Y1           Recall stored profile 1 upon power up. 
 &Zn=x         Store dial string x (to 34) to location n (0 to 3). 
 %E0           Disable line quality monitor and auto retrain. 
 %E1           Enable line quality monitor and auto retrain. 
 %E2           Enable line quality monitor and fallback/fall forward. 
 %L            Return received line signal level. 
 %Q            Report the line signal quality. 
 \N0           Select normal speed buffered mode.
 \N1           Select direct mode.
 \N2           Select reliable link mode.
 \N3           Select auto reliable mode.
 \N4           Force LAPM mode.
 \N5           Force MNP mode.
 \V0           Connect messages are controlled by the command settings X, W,
                and S95.
 \V1           Connect messages are displayed in the single line format. 

+MS - Select Modulation This extended-format command selects the modulation and, optionally, enables or disables automode, specifies
the lowest and highest connection rates, selects m-Law or A-Law codec type, and enables or disables robbed bit signaling
generation (server modem) or detection (client modem) using one to five subparameters.
The command format is: +MS=[mod],[automode],[min_rate],[max_rate],[x_law],[rb_signaling]{CR}

Notes:
For 14400 bps and lower speeds, the Nn command and S37 register can alternatively be used, in which case the +MS subparameters will
modified to reflect the Nn and S37=x settings. Use of the Nn and S37=x commands is not recommended but is provided
for compatibility with existing communication software. (S37 is not updated by the +MS command.)

Subparameters not entered (enter a comma only or {CR} to skip the last subparameter) remain at their current values.

Reporting Supported Options:
The modem can send a string of information to the DTE consisting of supported options using the following command:
+MS=?
The response is:
+MS: (list of supported {mod} values), (list of supported {automode} values), (list of supported {min_rate} values), (list of supported
{max_rate} values), (list of supported {x_law} values), (list of supported {rb_signaling} values)
For example:
+MS: (0,1,2,3,9,10,11,56,64,69),(0,1),(300-33600),(300- 56000),(0,1),(0,1)


Distinctive Ring Parameters
-SDR=0 Disable Distinctive Ring.
-SDR=1 Enable Distinctive Ring Type 1.
-SDR=2 Enable Distinctive Ring Type 2.
-SDR=3 Enable Distinctive Ring Type 1 and 2.
-SDR=4 Enable Distinctive Ring Type 3.
-SDR=5 Enable Distinctive Ring Type 1 and 3.
-SDR=6 Enable Distinctive Ring Type 2 and 3.
-SDR=7 Enable Distinctive Ring Type 1, 2, and 3. Use this command to determine the ring types on your phone system.


Error Correction Commands
%C0 Disable data compression.
%C1 Enable MNP 5 data compression.
%C2 Enable V.42 bis data compression.
%C3 Enable both V.42 bis and MNP 5 compression.
\A0 Set maximum block size in MNP to 64.
\A1 Set maximum block size in MNP to 128.
\A2 Set maximum block size in MNP to 192.
\A3 Set maximum block size in MNP to 256.


Caller ID commands
#CID=0 Disable Caller ID.
#CID=1 Enable Caller ID with formatted presentation.
#CID=2 Enable Caller ID with unformatted presentation.

Common Configurations

Force V.42 bis data compression with LAP-M error correction. AT\N4%C2-K0
Force V.42 bis data compression with MNP error correction. AT\N5%C2
Force MNP 5 data compression with MNP error correction. AT\N5%C1
Note: With the setup strings in examples 1-3, if the remote is unable to negotiate the desire rate mode, the modem will
disconnect and respond with NO CARRIER.
Auto negotiate data compression and error correction. AT&F (factory defaults) or AT\N3%C3 In this mode, the modem prefers
LAP-M over MNP 10, MNP 10 over MNP 4, and V.42 bis over MNP 5. If error correction is not negotiated, the modem will connect in normal mode.

Setting up Caller ID on the ACCURA Voice models

Caller ID is a service provided by most regional telephone companies which displays the calling party's telephone number on a
Caller ID monitoring device. The variety of Caller ID devices include Caller ID "boxes," telephones and modems. It should be noted
that all Caller ID support is not equal. Some phone companies provide only the number of the calling party, while others provide both
the name and number.

In terms of what the monitoring device "sees" when receiving a call, the Caller ID feature is simply an ASCII text string being sent to
the modem between the first and second rings. Note that in order to use Caller ID an end user requires support by the modem, regional
telephone company, and application software.

The possibilities for this service are endless. Imagine a database that will tell you who is calling as well as retrieve notes about the
last conversation you had before you even pick up the phone. A BBS could identify a caller and log them in automatically. For a home user,
you could just have the software make a list of everyone who calls, and with a bit of scripting, have it disconnect calls from a particular
number. You could also set your computer up to call a pager when a certain person calls.

The format that you would use for setting up the Caller ID feature with your Hayes modem would depend upon the model that you are using. Click
on the heading that corresponds to the modem that you are setting up.


The command to use Caller ID on your ACCURA 28.8 DSVD Modem or ACCURA 28.8 with Voice is AT#CID=n where n=0,1 or 2.

AT#CID=0 Turns Caller ID off. This is the default.
AT#CID=1 TLong Format Caller ID.
AT#CID=2 Gives Caller ID info using an unformatted output.

An example of the results of a call with AT#CID=1 set would be:

DATE = 0922 TIME = 1350 CALR = 7704411617 NAME = HAYES MICROCOMP
AT#CID=2 would put all this information onto one line using a raw data format:

MESG = 802701083039323231333439020A34303434343838393836070F484 1594553204D4943524F434F4D5036

Hayes modems with Caller ID also support the command AT#CID? which tells the current Caller ID mode.

There are two special messages that may be sent instead of Caller ID information: O or P. "O" means that the caller is
out of the Caller ID service area, usually a long distance call. "P" is for Private and will be displayed for callers who
have made arrangements with their phone company to have their numbers blocked.

What is single message formatting? What is multiple message formatting? Are both supported in Hayes modems? What's the difference?

Single message formatting was the original style of Caller ID and only provided you with the telephone number of the calling party.
Multiple message formatting supplies you with both the telephone number and the name of the person to whom the number belongs. Both
formats are supported by Hayes modems and do not require any changes in the modem's setup. All available information will be shown
when Caller ID is enabled. If you are not seeing the NAME line in your CID info, the phone company might not be providing it.

I know my modem supports Caller ID and my phone company provides it, but nothing appears on my screen. What's wrong?

Caller ID is a service that you have to pay your phone company to receive. Make sure that Caller ID is included in your monthly
statement. If you know you have subscribed to this service, try the following to test the modem.

Here is an example in BASIC to get the CALLER ID from a call:
CLS

OPEN "COM1:9600,N,8,1" FOR RANDOM AS #1
  PRINT #1, "+++"        ' tell modem "here comes AT commands"
  PRINT #1, "AT#CID=1"   ' tell modem to allow Caller ID
  PRINT #1, "ATS0=3"     ' tell modem to answer on third ring

  DO
    IF NOT EOF(1) THEN
      PRINT INPUT$(1,#1)
    END IF
  LOOP UNTIL LEN(INKEY$)
CLOSE
END
Now tell someone to call you. You should get something similar to the following:

+++
AT#CID=1
ATS0=3

RING

DATE = 0922
TIME = 1350
NMBR = 5555555
NAME = THECALLERSNAME

RING

If you don't, it's possible that another device on the line could be causing interference. Try removing any other Caller ID boxes
or answering machines from the line and repeat the test.

If you see this information in this test, but not in your regular communications software, be aware that some programs may not be expecting
to see this information, and are not able to display it for you.


Other notes
When sending AT commands you can include multiple commands on the same line with only one preceding AT. For example:
atz
atdt
5551234
{CR}

can be entered on one line as:
atzdt5551234{CR}

I found most of this info at Hayes web site:
http://www.hayes.com/support/techtips/index.htm


Here is the simple terminal program sources in versions of Assembler, Basic, C and Pascal.

Version: 1.00b
Author: Ben Lunt (Forever Young Software)
Date: 02 Jan 1998
Assembler: MASM 5.10
Basic Compiler: Quick Basic 4.5
C Compiler: Quick C 2.5
Pascal Compiler: Turbo Pascal 6.0

Download the zip file from here, or below, and unzip it (See my links page for PKUNZIP) in a directory of your choice
(To download, I suggest right clicking the link and saving to disk)

SIMPTERM.ZIP (8,140) should contain 6 files:
LINKA.ASM (8,188) - The assembler version
LINKA.INC (1,638) - Include file for assembler version
LINKB.BAS (321) - The Basic version
LINKC.C (4,857) - The C version
LINKC.H (1,915) - Include file for C version
LINKP.PAS (5,876) - The Pascal version
If there are any differences in the package you got, please let me know.


Here is the simple null modem file transfer routine. When both machines are running this basic program, you can transfer files between them.

Version: 1.00b
Author: Ben Lunt (Forever Young Software)
Date: 13 Feb 1998
Basic Compiler: Quick Basic 4.5

Download the bas file from here (3,582 bytes)

The comments at the top of the .BAS file show you how to use this routine.
It also shows how to create a null modem cable (you can buy one for about $15 or you can get the supplies at Radio Shack® and make one yourself for about $5).