|
|
||
|
||
|
|
| Red Hat Documentation |
11. Dial-In11.1 OverviewDial-in is where you set up your PC so that others may dial in to your PC (at your phone number) and use your PC. The "point of view" here is your PC. When you dial out from your PC you are also dialing in to another computer (but not dialing in to your own computer) Dial-in works like this. Someone with a modem dials your telephone
number. Your modem answers the call and connects. Once the caller is
connected the After the caller has logged in, the caller then may use your PC.
Using your PC may mean that the caller has a shell account and can use
your PC just as if they logged in at the console (or from a
text-terminal). It could also mean that they get connected to the
Internet thru your PC (via PPP). The program that you use at your PC
to handle dialin is called
56k doesn't workIf you expect that people will be able to dial-in to you at 56k, it can't be done unless you have all the following:
11.2 Getty
There are four different getty programs to choose from that may be
used with modems for dial-in: In order to see what documentation exists about the various gettys on
your computer, use the "locate" command. Type: locate "*getty*"
(including the quotes may help). Note that many distributions just
call the program getty even though it may actually be agetty, uugetty,
etc. But if you read the man page (type: man getty), it might
disclose which getty it is. This should be the getty program with
path
About mgetty
About uugetty
About getty_emThis is a simplified version of ``uugetty''. It was written by Vern Hoxie after he became fully confused with complex support files needed for getty_ps and uugetty. It is part of the collection of serial port utilities and information by Vern Hoxie available via ftp from scicom.alphacdc.com/pub/linux. The name of the collection is ``serial_suite.tgz''. When logging into ``scicom'' as "anonymous", you must use your full e-mail address as the password. For example: greg.hankins@cc.gatech.edu
About agetty, mingetty, and fbgetty
11.3 What Happens when Someone Dials In ? The caller runs some sort of communication program that dials your
telephone number and your telephone rings. There are two different
ways that your PC can answer the phone. One way is for the modem to
automatically answer the call. The other way is for getty to sense
the ringing and send a command to the modem to answer the call. Once
the call is answered, your modem sends tones to the other modem (and
conversely). The two modems negotiate how they will communicate and
when this is completed your modem sends a "CONNECT" message (or the
like) to Now for more details on the two methods of answering the call. By
setting the S0 register of the modem to 3, the modem will
automatically answer on the 3rd ring. If it's set to 0 then the modem
will only answer the call if getty sends it an "A" (= Answer) command
while the phone is ringing. Actually an "ATA" is sent since all modem
commands are prefixed by "AT". You might think it best to utilize the
ability of the modem to automatically answer the call, but it's
actually better if For the "manual" answer case, The automatic answer case uses the CD (Carrier Detect aka DCD) wire
from the modem to the serial port to detect when a connection is made.
It works like this. At boot-time You may wonder how getty is able to open the serial port in the manual-answer case since CD is negated. Well, there's a way to write a program to force the port to open even if there is no CD signal asserted.
11.4 Why Manual Answer is Best The difference between the two ways of answering is exhibited
when the computer happens to be down but the modem is still working.
For the manual case, the "RING" message is sent to getty but since the
computer is down, getty isn't there and the phone never gets answered.
There are no telephone charges when there is no answer. For the
automatic answer case, the phone is answered but no login message is
ever sent since the computer is down. The phone bill runs up as the
waiting continues. If the phone call is toll-free, it doesn't make
much difference, although it may be frustrating waiting for a login
prompt that never arrives.
11.5 Ending a Dial-in CallCaller logs outWhen the call is over the normal way to end the connection is for the user to log out. This will kill the user's shell. As a result, getty will respawn and a hangup signal (negates DTR) will be sent from the host's serial port to the modem. This will only happen if stty -a shows hupcl (hang up on close) but this should be the default. The modem getting the negated DTR signal will then hang up the phone line (provided the modem has been configured to do this --see below). The modem should then be ready to answer any new incoming calls. Killing the user's shell causes getty to respawn and wait for the next call. As an alternative to using DTR to tell the modem to hang up the phone line, a script used when getty respawns may send the unique escape code sequence +++ to the modem to put it into AT command mode. The +++ must have both an initial and final time delay. Once in AT command mode, a hangup command (H0) may be sent to the modem as well as other AT commands. If the PC fails to successfully signal the modem when a logout happens (or to use the +++ escape when restarting getty), then the modem is apt to remain in on-line mode and no more incoming calls can be received.
When DTR drops (is negated)When DTR (the "hang-up" signal) is negated, what the modem does depends on the value of the &D option in the modem's profile. If it's &D0 nothing at all happens (the modem ignores the negation of DTR).
If you don't know which of the above two to use try using
Caller hangs upInstead of logging out the normal way, a caller may simply hang up. This results in a lost connection and of course a loss of carrier. Other problems could also cause a loss of carrier. The "NO CARRIER" result code is displayed. The modem hangs up and waits for the next call. Except that there is no getty running yet to start the login process. Here's how getty gets started again: The loss of carrier should
negate the DCD signal sent by the modem to the serial port (provided
This paragraph is about other things that happen but do nothing. Only the curious need read it. When the shell is killed a DTR wink is sent to the modem but since the modem is not on-line anymore and has already hung up, the modem ignores the negation of DTR (hang up). The loss of carrier also negates the DSR signal sent by the modem to the serial port (provided &S1 or &S2 is set) but this signal is ignored (by Linux).
11.6 Dial-in Modem ConfigurationThe getty programs have a provision for sending an init string to the modem to configure it. But you may need to edit it. Another method is to save a suitable init string inside the modem (see Init Strings: Saving and Recalling for how to save it in the modem). The configuration for dial-in depends both on the getty you use and possibly on your modem. If you can't find suggested configurations in other documentation here are some hints using Hayes AT commands:
11.7 CallbackCallback is where someone first dials in to your modem. Then, you get a little info from the caller and then call it right back. Why would you want to do this? One reason is to save on telephone bills if you can call the caller cheaper than the caller can call you. Another is to make sure that the caller really is who it claims to be. If a caller calls you and claims to be calling from its usual phone number, then one way to verify this is to actually place a new call to that number. There's a program for Linux called "callback" that works with mgetty. It's at ftp://ftp.icce.rug.nl/pub/unix/. Step-by-step instructions on how someone installed it (and PPP) is at http://www.stokely.com/unix.serial.port.resources/callback.html
11.8 Voice MailVoice mail is like an answering machine run by a computer. To do this you must have a modem that supports "voice" and supporting software. Instead of storing the messages on tape, they are stored in digital format on a disk. When a person phones you, they hear a "greeting" message and can then leave a message for you. More advanced systems would have caller-selectable mail boxes and caller-selectable messages to listen to. Free software is available in Linux for simple answering, but doesn't seem to be available yet for the more advanced stuff. I know of two different voicemail packages for Linux. One is a very
minimal package (see
Voicemail Software).
The other, more advanced, but currently poorly documented, is
Next Previous Contents |
|
|