modemcap Technical Information modemcap
Modem description language
modemcap is a language for describing modems to your system. It
resembles the termcap language in its syntax, although the two
are by no means identical. With modemcap, you can describe your
modem to any program that automatically dials out on your modem;
this should spare you the tedium of continually describing your
modem to one program after another.
The copy of /etc/modemcap included with your release of COHERENT
already contains descriptions of many popular modems; the chances
are good that yours has already been described for you.
Each modemcap command is one of three types: flag, string, or
number. A flag command signals that your modem is performs a
particular action or has a particular feature. A string command
gives the command that your modem recognizes to perform a par-
ticular action. For example, many modems recognize that the
string at means that you want to gain its attention. Finally, a
number command sets a value or parameter for your modem, such as
the highest baud rate it recognizes.
The following table describes each modemcap command:
Name Type Meaning
ad number Delay after as
as flag Numbers are in ASCII, not binary
at string Attention string, forces model into command mode
from online mode
bd number Highest online baud rate
bl number Alternate lower baud rate
ce string Command end string (required if CS is present)
cl string String from modem on remote connection at BL baud rate
co string String from modem on remote connection at BD baud rate
cs string Command start string
de string End dial command string (required if DS is present)
di flag Modem has a dialer
ds string Start dial command string
id number Delay after IS
is string Initialization string, resets modem to offline,
ready to dial
hc flag Modem hangs up when DTR drops
hu string Hangup command
tt flag Modem dials touchtone by default (or DS is set
that way)
All commands, such as ds (dial command) and hu (hang up) will be
prefixed by cs and ended with ce. If there is a common prefix
and suffix, use this feature. Otherwise, each command will have
to have the entire string built in.
COHERENT Lexicon Page 1
modemcap Technical Information modemcap
***** Example Entry *****
The following gives the entry in /etc/modemcap for the Hayes
Smartmodem 1200:
hy|hayes|Hayes Smartmodem 1200:\
:as:at=+++:ad#3:bd#1200:bl#300:cs=AT:ce=\r:co=CONNECT:\
:cl=CONNECT:di:ds=DT :de=:is=ATQ0 V1 E1\r:id#2:\
:hc:hu=H0 V0 E0 Q1:tt:
Each field is separated by a colon. A backslash `\' character at
the end of each line but the last lets the description extend
over more than one line.
The three fields gives three versions of the modem's name,
separated by vertical bars `|'. The first version of the name is
a two-character mnemonic; this must be unique. The other two
versions give fuller versions of the name; these are optional.
The following explains each field in detail:
as Numbers are in binary mode.
at=+++ To gain the attention of the modem, type +++.
ad#3 Delay three milliseconds after a number.
bd#1200 Maximum baud rate is 1200.
bl#300 Minimum baud rate is 300.
cs=AT To initiate a command string, type AT.
ce=\r A command string is ended by a carriage-return
character.
co=CONNECT Modem returns the string CONNECT when it makes a
connection at 1200 baud.
cl=CONNECT Modem returns the string CONNECT when it makes a
connection at 300 baud.
di The modem can dial a telephone number.
ds=DT Begin dialing, touch-tone mode.
de= No special string is needed to end the dial
string.
is=ATQ0 To initialize the modem, type ATQ0 V1 E1<return>.
id#2
Delay two seconds after entering the initializa-
COHERENT Lexicon Page 2
modemcap Technical Information modemcap
tion string.
hc The modem hangs up when DTR drops (i.e., it hangs
up when the program requests a hangup).
hu=H0 To hang up, type H0 V0 E0 Q1.
tt The modem dials touch-tone by default.
***** Currently Recognized Modems *****
The file /etc/modemcap includes descriptions of the following
modems:
Trailblazer, 9600 baud
Trailblazer, 2400 baud
Hayes Smartmodem 1200
Avatex 2400 (clone of Hayes Smartmodem 2400)
Prometheus Promodem 1200
Signalman Mark XII
Radio Shack Direct-Connect 300 Modem
***** See Also *****
technical information, termcap
COHERENT Lexicon Page 3