Linux, like most UNIX-like
operating systems, expects a serial console to be connected to a
dumb modem. Dumb modems are not seen much these days, perhaps only
on exotic hardware such as ISDN terminal adapters
or satellite ground terminals.
A dumb modem is configured using hardware. Figure 12-1 shows the front panel of a fanciful
dumb modem. In reality the speed and mode settings are likely to
be done using jumpers or DIP switches.
The modem's speed is set to the desired bit rate, in our case
9600bps. The modem's mode is set to Answer,
that is, to wait for incoming calls and to answer them.
If the RS-232 control line Data Terminal
Ready is low, the modem will not answer a call. The computer is
off or the computer's serial interface is not yet initialized.
Once DTR is high the modem will answer incoming
calls.
Once an incoming call is established the modem raises the
Data Carrier Detect control line.
getty on the Linux computer has
been waiting for DCD to come high, and
getty welcomes the user and requests
them to log in.
Whilst the user is logged in and data is flowing, Clear to
Send and Ready to Send are used between the modem and the computer
to prevent data being sent too soon. The computer lowers Clear to
Send when it is too busy to receive a character. The modem lowers
Ready to Send when it is too busy to receive a character.
When the user hangs up, Data Carrier Detect falls and the
hang up signal is sent to all processes associated with the dial in
session.
Alternatively, the user can log out. When the shell dies,
the computer pulls Data Terminal Ready low, causing the modem to
hang up. When the getty brings Data
Terminal Ready high again, the modem will accept more incoming
calls.
We have not yet described Data Set Ready. This line is low
if the modem is off or if the modem has not yet initialized.