HAYES(8) BSD System Manager's Manual HAYES(8)NAME
hayes - control hayes compatible modems
SYNOPSIS
/etc/getty/hayes-function [-command command] [-dte-speeds baudrate] -f
filedes [-number number [...]] [-stty-modes mode [...]] [-term
type] [-verbose]
DESCRIPTION
There are four hayes-function scripts:
call Configure the modem for an outgoing call and dial the speci-
fied number(s). The modem is configured by sending the
hreset and hinit strings defined in the /etc/ttys.conf file.
If no number is provided, simply condition the modem, but do
not dial.
condition Condition a line for dialin. The modem is configured by
sending the hreset, hcondition, and hquiet strings defined
in the /etc/ttys.conf file.
hangup Disconnect any current call on the line. If the modem does
not respond to the standard AT command with OK, try sending
the string defined by hreset. If this does not result in OK,
sleep for 2 seconds, send +++ and wait for 2 more seconds
for an OK response. Once contact with the modem is estab-
lished, send the strings defined by hhangup and hinit.
watcher Condition a line for dialin and wait for a call. Once a
call is received, execute the requested command. The modem
is configured by sending the hreset and hinit strings fol-
lowed by ATS0=0. When the modem responds with RING send the
string ATA and wait for a CONNECT message. Once the CONNECT
message is received, exec command, or /usr/bin/login if
command was not specified.
The options understood by the hayes- scripts are:
-command For watcher scripts use command instead of /usr/bin/login.
-dte-speeds Set the baud rate of the serial line to be baudrate. This
is not the same as the modulation speed, which is the rate
at which the modems communicate. Typically this will be 2
or 4 times faster than the modulation speed.
-f Use the file specified by filedes as the device. This is
almost always of the form /dev/fd/N.
-number For call scripts dial the numbers specified by number.
There may be more than a single number provided.
-stty-modes Use the specified modes when setting up the serial line.
-term For watcher scripts, set the terminal type to type instead
of unknown.
-verbose Display what strings are sent to and received from the mo-
dem.
The following entries from the /etc/ttys.conf file are used by these
scripts:
hcondition String used to condition the modem for dialin. Default:
ATE0S0=1S2=255
hdial String used to dial a number. The number is substituted
for the string $1. Default: ATDT$1
hhangup String used to place the line on hook. Default: ATH
hinit String used to initialize a modem for outgoing calls. De-
fault: ATS2=255
hquiet String used to turn off response codes. Default: ATQ1
hreset String used to reset the modem to a known state. Default:
ATZ
SEE ALSOdialer.rules(5), ttys.conf(5), gettyd(8)BSDI BSD/OS September 4, 1996 2