

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:

_N_a_m_e _T_y_p_e      _M_e_a_n_i_n_g

aadd   number    Delay after aass
aass   flag      Numbers are in ASCII, not binary
aatt   string    Attention string, forces model into command mode
               from online mode
bbdd   number    Highest online baud rate
bbll   number    Alternate lower baud rate
ccee   string    Command end string (required if CS is present)
ccll   string    String from modem on remote connection at BL baud rate
ccoo   string    String from modem on remote connection at BD baud rate
ccss   string    Command start string
ddee   string    End dial command string (required if DS is present)
ddii   flag      Modem has a dialer
ddss   string    Start dial command string
iidd   number    Delay after IS
iiss   string    Initialization string, resets modem to offline,
               ready to dial
hhcc   flag      Modem hangs up when DTR drops
hhuu   string    Hangup command
tttt   flag      Modem dials touchtone by default (or DS is set
               that way)

All commands, such as ddss (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:

aass             Numbers are in binary mode.

aatt=+++         To gain the attention of the modem, type +++.

aadd#33           Delay three milliseconds after a number.

bbdd#11220000        Maximum baud rate is 1200.

bbll#330000         Minimum baud rate is 300.

ccss=AATT          To initiate a command string, type AATT.

ccee=\rr           A command  string is  ended by  a carriage-return
               character.

ccoo=CCOONNNNEECCTT     Modem  returns the string CCOONNNNEECCTT  when it makes a
               connection at 1200 baud.

ccll=CCOONNNNEECCTT     Modem  returns the string CCOONNNNEECCTT  when it makes a
               connection at 300 baud.

ddii             The modem can dial a telephone number.

ddss=DDTT          Begin dialing, touch-tone mode.

ddee=             No  special  string is  needed  to  end the  dial
               string.

iiss=AATTQQ00        To initialize the modem, type AATTQQ00 VV11 EE11<rreettuurrnn>.

iidd#22
               Delay two  seconds after entering  the initializa-


COHERENT Lexicon                                           Page 2




modemcap              Technical Information              modemcap



               tion string.

hhcc             The modem hangs  up when DTR drops (i.e., it hangs
               up when the program requests a hangup).

hhuu=HH00          To hang up, type HH00 VV00 EE00 QQ11.

tttt             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


