mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
188925bf2e
commit
976a01147b
|
@ -3,10 +3,12 @@
|
|||
<title> Modem-HOWTO </title>
|
||||
<author>David S.Lawyer
|
||||
<tt><url url="mailto:dave@lafn.org"></tt>
|
||||
<date> v0.12, December 2000
|
||||
<date> v0.13, February 2001
|
||||
|
||||
<!--
|
||||
Change log: + => added more info ++ => added new topic
|
||||
v0.13 serial-modem => digital-modem, fixed suse isdn link, antique
|
||||
modems, typos fixed in "Getty", new section: "Ending a Dial-in Call"
|
||||
v0.12 Dec. 2000 Zoltrix and Cirrus Logic linmodems; don't omit 0 in X0
|
||||
(for some modems) X3 if no dial-tone; init string locations; more on
|
||||
"Modem is busy"; PCI non-winmodems are OK; terminology: software-based
|
||||
|
@ -91,12 +93,10 @@ maintainer. You may create a derivative work and distribute it
|
|||
provided that you:
|
||||
|
||||
<enum>
|
||||
<item> Send your derivative work to the LDP (Linux Documentation
|
||||
Project) or the like for free distribution on the Internet in a
|
||||
format they will accept. If not the LDP, then let the LDP know
|
||||
where it is available. Except for a translation, send a copy to the
|
||||
previous maintainer's url as shown in the latest version.
|
||||
|
||||
<item> If it's not a translation: Email a copy of your derivative work
|
||||
to the LDP (Linux Documentation Project) for free distribution on the
|
||||
Internet in a format LDP accepts. Also email such a copy to the
|
||||
author(s) and maintainer (could be the same person).
|
||||
<item>License the derivative work in the spirit of this license or use
|
||||
GPL. Include a copyright notice and at least a pointer to the
|
||||
license used.
|
||||
|
@ -153,27 +153,24 @@ modem situation is rapidly changing (and since I'm still learning).
|
|||
Your problem might be solved in the latest version. It will be
|
||||
available to browse and/or download at LDP mirror sites. For a list
|
||||
of such sites see: <url url="http://metalab.unc.edu/LDP/mirrors.html">
|
||||
If you only want to quickly compare the date of this the version v0.12, December 2000
|
||||
If you only want to quickly compare the date of this the version v0.13, February 2001
|
||||
with the date of the latest version go to:
|
||||
<url url="http://metalab.unc.edu/LDP/HOWTO/Modem-HOWTO.html">
|
||||
|
||||
<sect1> New in this Version
|
||||
<p> v0.12 Zoltrix and Cirrus Logic linmodems; don't omit 0 in X0 (for
|
||||
some modems) X3 if no dial-tone; init string locations; more on "Modem
|
||||
is busy"; PCI non-winmodems are OK; terminology: software-based modem,
|
||||
driver-based modem; Linmodem-HOWTO; types of software modems;
|
||||
setserial irq5 to irq 5; Quick Install rewrite.
|
||||
<p> v0.13 serial-modem => digital-modem, fixed suse isdn link, antique
|
||||
modems, typos fixed in "Getty", new section: "Ending a Dial-in Call"
|
||||
|
||||
<sect1> What is a Modem ? <label id="what_is_modem">
|
||||
<p> A modem is a device that lets one send digital signals over
|
||||
ordinary telephone lines not designed for digital signals. If
|
||||
<p> A modem is a device that lets one send digital signals over an
|
||||
ordinary telephone line not designed for digital signals. If
|
||||
telephone lines were all digital then you wouldn't need a modem. It
|
||||
permits your computer to connect to and communicate with the rest of
|
||||
the world. When you use a modem, you normally use a communication
|
||||
program or web browser (which includes such a program) to utilize the
|
||||
modem and dial-out on a telephone line. Advanced modem users can set
|
||||
things up so that others may phone in to them and use their computer.
|
||||
This is called "dial-in".
|
||||
program or web browser to utilize the modem and dial-out on a
|
||||
telephone line. Advanced modem users can set things up so that others
|
||||
may phone in to them and use their computer. This is called
|
||||
"dial-in".
|
||||
|
||||
There are two basic types of modems for a PC: external and internal.
|
||||
The external sets on your desk outside the PC while the internal is
|
||||
|
@ -668,7 +665,8 @@ the telephone line and don't use serial ports for the interface to the
|
|||
computer. Instead, they interface directly to the PC bus via a
|
||||
special card (which may also contain the "digital modems"). They are
|
||||
able to send at near 56k, something no analog modem can do. They are
|
||||
often a component of "remote access servers" or "digital modem pools"
|
||||
often a component of "remote access servers" (RASs) or "digital modem
|
||||
pools"
|
||||
|
||||
The cables from the phone company that carry digital signals have been
|
||||
designed for high bandwidth so that the same cable carries multiple
|
||||
|
@ -687,18 +685,18 @@ telephone line. Thus it only makes digital-to-digital conversions and
|
|||
doesn't deal in analog at all. It thus is not really a modem at all
|
||||
since it doesn't modulate any analog carrier. So the name "digital
|
||||
modem" is a misnomer but it does do the job formerly done by modems.
|
||||
Thus Some "serial modems" call themselves "digital signal processors",
|
||||
"remote access servers", etc. and may not even mention the word
|
||||
"modem". This is technically correct terminology.
|
||||
Thus some "digital modems" call themselves "digital signal
|
||||
processors", or "remote access servers", etc. and may not even mention
|
||||
the word "modem". This is technically correct terminology.
|
||||
|
||||
Such a system may be a stand-alone proprietary server, a chassis
|
||||
containing digital modems that connects to a PC via a special
|
||||
interface card, or just a card itself. Digi calls one such card a
|
||||
"remote access server concentrator adapter". One incomplete
|
||||
description of what is needed to become an ISP is: See <htmlurl
|
||||
url="/http://www.cyclades.com/sol_isp.html" name="What do I need to be
|
||||
an ISP?">. Cyclades promotes their own products here so please do
|
||||
comparison shopping before buying anything.
|
||||
url="/http://www.cyclades.com/solutions/techtalk/techtalk0l.htm"
|
||||
name="What do I need to be an ISP?">. Cyclades promotes their own
|
||||
products here so please do comparison shopping before buying anything.
|
||||
|
||||
<sect> Serial Port and Modem Basics <label id="basics_">
|
||||
<!-- basics.H begin <sect> Serial Port and Modem Basics
|
||||
|
@ -1908,10 +1906,13 @@ modem.
|
|||
|
||||
Such command strings are either automatically sent to the modem by
|
||||
communication programs or are manually typed in by you. Most
|
||||
communication programs provide a screen where you may type such
|
||||
commands. You may type in some commands to create the configuration
|
||||
you want and then save this this configuration (profile) for later
|
||||
use. It gets saved inside the modem itself.
|
||||
communication programs provide a screen where you may change (edit)
|
||||
and save the init string that the communication program will use.
|
||||
The modem itself has a stored configuration (profile) which is like a
|
||||
long init string. It represents the configuration of the modem when
|
||||
it's first tuned on. You may change it to suit your taste. In most
|
||||
cases there are a few different such configurations (profiles) and
|
||||
there are ways to designate one of them to be active.
|
||||
|
||||
If you have a manual for your modem you can likely look up the AT
|
||||
command set. Otherwise, you may try to find it on the Internet.
|
||||
|
@ -1920,7 +1921,7 @@ search terms to avoid finding sites that just talk about such commands
|
|||
but fail to list them. You might also try a few of the sites listed
|
||||
in the subsection <ref id="web_sites" name="Web Sites">
|
||||
|
||||
<sect1> Init Strings: Saving and Recalling
|
||||
<sect1> Init Strings: Saving and Recalling <label id="init_str">
|
||||
<p> The examples given in this subsection are from the Hayes AT modem
|
||||
command set. All command strings must be prefaced by the two letters
|
||||
AT. For example: AT&C1&D3^M (^M is the return character).
|
||||
|
@ -1952,11 +1953,10 @@ Modern modems have a few different stored profiles to choose from that
|
|||
are stored in the modem's non-volatile memory (it's still there when
|
||||
you turn it off). In my modem there are two factory profiles (0 and
|
||||
1, neither of which you can change) and two user defined profiles (0
|
||||
and 1) that the user may set and store. Your modem may have more.
|
||||
To view some of these profiles send the command &V.
|
||||
At power-up one of the user-defined profiles is loaded. For example,
|
||||
if you type the command &Y0 then in the future profile 0 will be
|
||||
used at power-on.
|
||||
and 1) that the user may set and store. Your modem may have more. To
|
||||
view some of these profiles send the command &V. At power-up one
|
||||
of the user-defined profiles is loaded. For example, if you type the
|
||||
command &Y0 then in the future profile 0 will be used at power-on.
|
||||
|
||||
There are also commands to load (activate) any of the stored profiles.
|
||||
Such a load command may be put in an init string. Of course if it
|
||||
|
@ -2004,7 +2004,8 @@ cases.
|
|||
<itemize>
|
||||
<item> Gnome: run pppsetup
|
||||
<item> wvdial: edit /etc/wvdial.conf
|
||||
<item> minicom: hit ^Ao, then select "Modem and Dialing"
|
||||
<item> minicom: hit ^Ao (or possibly ALT-o), then select "Modem and
|
||||
Dialing"
|
||||
</itemize>
|
||||
|
||||
<sect1> Other Modem Commands <label id="modem_commands">
|
||||
|
@ -2023,7 +2024,7 @@ S0=0 never answer (uugetty does this with the WAITFOR option)
|
|||
|
||||
Here's some more codes:
|
||||
<itemize>
|
||||
<item>&C1 DCD is on only after connect
|
||||
<item>&C1 DCD is only on when you're connected
|
||||
<item>&S0 DSR is always on
|
||||
<item>&X3 Dial even if there is no dialtone (Use where
|
||||
dial-tones don't exist).
|
||||
|
@ -2665,30 +2666,30 @@ login:
|
|||
<sect> Dial-In <label id="dialin_">
|
||||
<sect1> Overview
|
||||
<p> Dial-in is where you set up your PC so that others may dial in to
|
||||
your phone number and use your PC. The "point of view" 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)
|
||||
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, your PC (via the <tt/getty/ program) starts the login
|
||||
connected the <tt/getty/ program is notified and starts the login
|
||||
process for the caller. The original method was to send a login
|
||||
prompt to the caller's screen (manual login). But a more modern
|
||||
method (if you use <tt/mgetty/) is to start PPP (pppd) and let PPP
|
||||
automatically login the caller (no need to manually type in a name or
|
||||
password). See the PPP-HOWTO (new revision expected soon) and docs
|
||||
for <tt/mgetty/ for more details.
|
||||
prompt to the caller's screen (manual login). It's still used but if
|
||||
you let callers use the PPP protocol then the login can take place
|
||||
automatically after a PPP connection is started from both sides. See
|
||||
the PPP-HOWTO for more details.
|
||||
|
||||
After the caller has logged in, the caller uses 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 <tt/getty/ or <tt/mgetty/. See <ref id="mgetty_" name="About
|
||||
mgetty">.
|
||||
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 <tt/getty/ or <tt/mgetty/. See <ref
|
||||
id="getty_" name="Getty">
|
||||
|
||||
If you expect that people will be able to dial-in to you at 56k, it
|
||||
can't be done unless:
|
||||
<sect2> 56k doesn't work
|
||||
<p>If 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:
|
||||
<enum>
|
||||
<item> You have a digital connection to the telephone company such as a
|
||||
trunkside-T1 or ISDN line
|
||||
|
@ -2699,25 +2700,23 @@ can't be done unless:
|
|||
</enum>
|
||||
A "... concentrator" may be called a "modem concentrator"
|
||||
or a "remote access concentrator" or it could be included in a "remote
|
||||
access server" which includes the digital modems, etc. This type of
|
||||
setup is used by ISPs (Internet Service Providers).
|
||||
access server" (RAS) which includes the digital modems, etc. This
|
||||
type of setup is used by ISPs (Internet Service Providers).
|
||||
|
||||
<sect1> Getty <label id="getty_">
|
||||
<p> <tt/getty/ is the program you run for dialin. You don't need it
|
||||
for dialout. In addition to presenting a login prompt, it also
|
||||
for dialout. In addition to presenting a login prompt, it also helps
|
||||
answers the telephone. Originally getty was used for logging in to a
|
||||
computer from a dumb terminal. A major use of it today is for logging
|
||||
in to a Linux console. There are a few different getty programs with
|
||||
slightly different names. Only certain ones work with modems for
|
||||
dialin. The getty program is usually started at boot-time. It must
|
||||
be called from the /etc/inittab file. You may find an example in this
|
||||
file of a call to getty which you will likely need to edit a bit. If
|
||||
you use a different getty program than the one shown in such an
|
||||
example, then you will need to edit it quite a bit since the options
|
||||
will have a different format.
|
||||
be called from the /etc/inittab file. In this file you may find some
|
||||
examples which you will likely need to edit a bit. Hopefully these
|
||||
examples will be for the flavor of getty installed on your PC.
|
||||
|
||||
<p> There are four different getty programs to choose from that may be
|
||||
used with modems for dialin: <tt/mgetty/, <tt/uugetty/, <tt/getty_em/,
|
||||
used with modems for dial-in: <tt/mgetty/, <tt/uugetty/, <tt/getty_em/,
|
||||
and <tt/agetty/. A brief overview is given in the following
|
||||
subsections. <tt/agetty/ is the simplest (and weakest) of the four
|
||||
and some consider it mainly for use with directly connected
|
||||
|
@ -2736,15 +2735,14 @@ your computer, use the "locate" command. Type: locate "*getty*"
|
|||
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 /sbin/getty.
|
||||
path <tt>/sbin/getty.</tt>
|
||||
|
||||
<sect2>About mgetty <label id="mgetty_">
|
||||
<p>
|
||||
<tt/mgetty/ was written as a replacement for <tt/uugetty/ which was
|
||||
in existence long before <tt/mgetty/. Both are for use with
|
||||
modems. Although <tt/mgetty/ may be also used for directly connected
|
||||
terminals the documentation for this is hard to pinpoint and mgetty
|
||||
will not (as of mid 1999) support software flow control (used on many
|
||||
in existence long before <tt/mgetty/. Both are for use with modems.
|
||||
<tt/mgetty/ may be also used for directly connected terminals. Mgetty
|
||||
doesn't (as of mid 1999) support software flow control (used on many
|
||||
terminals) without recompiling. This defect is listed as a bug. In
|
||||
addition to allowing dialup logins, <tt/mgetty/ also provides FAX
|
||||
support and auto PPP detection. There is a supplemental program
|
||||
|
@ -2760,7 +2758,7 @@ url="http://alpha.greenie.net/mgetty">
|
|||
<p>
|
||||
<tt/getty_ps/ contains two programs: <tt/getty/ is used for console
|
||||
and terminal devices, and <tt/uugetty/ for modems. Greg Hankins
|
||||
SUAL --(former author of Serial-HOWTO) used <tt/uugetty/ so his writings
|
||||
(former author of Serial-HOWTO) used <tt/uugetty/ so his writings
|
||||
about it are included here. See <ref id="uugetty_" name="Uugetty">.
|
||||
The other gettys are well covered by the documentation that comes with
|
||||
them.
|
||||
|
@ -2777,17 +2775,18 @@ url="scicom.alphacdc.com/pub/linux">. The name of the collection is
|
|||
you must use your full e-mail address as the password. For example:
|
||||
greg.hankins@cc.gatech.edu
|
||||
|
||||
<sect2>About agetty and mingetty
|
||||
<sect2>About agetty, mingetty, and fbgetty
|
||||
<p>
|
||||
<tt/agetty/ is a simple, completely functional implementation of
|
||||
<tt/getty/ which is best suited for virtual consoles or terminals
|
||||
rather than modems. But it works fine with modems under favorable
|
||||
48%
|
||||
Waiting for a call). <tt/agetty/ in the Debian distribution is just
|
||||
named <tt/getty/.
|
||||
conditions. <tt/agetty/ in the Debian distribution is just named
|
||||
<tt/getty/.
|
||||
|
||||
<tt/mingetty/ is a small getty that will work only for consoles
|
||||
(monitors) so you can't use it with modems for dialin.
|
||||
<tt/mingetty/ is a small getty that will work only for monitors
|
||||
(the usual console) so you can't use it with modems for dialin.
|
||||
|
||||
<tt>fbgetty</tt> is also only for monitors and supports framebuffers.
|
||||
|
||||
<sect1> What Happens when Someone Dials In ?
|
||||
<p> The caller runs some sort of communication program that dials your
|
||||
|
@ -2797,12 +2796,12 @@ 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 done your modem sends a "CONNECTed" message (or the like)
|
||||
to <tt/getty/. When <tt/getty/ gets this message, it sends a login
|
||||
prompt out the serial port. Sometimes <tt/getty/ just calls on a
|
||||
program named <tt/login/ to handle the logging in. <tt/getty/ usually
|
||||
starts running at boot-time but it must wait until a connection is
|
||||
made before sending out a "login" prompt.
|
||||
when this is completed your modem sends a "CONNECT" message (or the
|
||||
like) to <tt/getty/. When <tt/getty/ gets this message, it sends a
|
||||
login prompt out the serial port. Sometimes <tt/getty/ just calls on
|
||||
a program named <tt/login/ to handle the logging in. <tt/getty/
|
||||
usually starts running at boot-time but it must wait until a
|
||||
connection is made before sending out a "login" prompt.
|
||||
|
||||
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
|
||||
|
@ -2822,12 +2821,12 @@ sends the modem an "ATA" command. The modem then makes a connection
|
|||
and sends a "CONNECT ..." message to <tt/getty/ which then sends a login
|
||||
prompt to the caller.
|
||||
|
||||
The automatic answer case uses the CD (Carrier Detect) wire from the
|
||||
modem to the serial port to detect when a connection is made. It
|
||||
works like this. At boot-time <tt/getty/ tries to open the serial
|
||||
port but the attempt fails since there is normally no CD signal from
|
||||
the modem. Then the <tt/getty/ program waits at the open statement in
|
||||
the program until a CD signal appears. When a CD signal arrives
|
||||
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 <tt/getty/ tries to open the serial
|
||||
port but the attempt fails since the modem has negated CD (the modem
|
||||
is idle). Then the <tt/getty/ program waits at the open statement in
|
||||
the program until a CD signal is asserted. When a CD signal arrives
|
||||
(perhaps hours later) then the port is opened and <tt/getty/ sends the
|
||||
login prompt. While <tt/getty/ is waiting (sleeping) at the open
|
||||
statement, other processes can run since Linux is a multiprocessing
|
||||
|
@ -2835,12 +2834,12 @@ operating system. What actually wakes <tt/getty/ up is an interrupt
|
|||
which is issued when the CD line from the modem changes state to on.
|
||||
|
||||
You may wonder how getty is able to open the serial port in the
|
||||
manual-answer case since there is no CD signal. Well, there's a way
|
||||
to write a program to force the port to open even if there is no CD
|
||||
signal present.
|
||||
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.
|
||||
|
||||
<sect1> Why Manual Answer is Best
|
||||
<p> The difference between the two ways of answering will show itself
|
||||
<p> 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.
|
||||
|
@ -2852,15 +2851,117 @@ much difference, although it may be frustrating waiting for a login
|
|||
prompt that never arrives. <tt/mgetty/ uses manual answer. <tt/Uugetty/
|
||||
can do this too using a configuration script.
|
||||
|
||||
<sect1> Ending a Dial-in Call
|
||||
<sect2> Caller logs out
|
||||
<p> When 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 and normally
|
||||
will result in a hangup signal sent from the host's serial port (DTR
|
||||
is negated) to the modem. This will 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 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 to wait for the next call.
|
||||
|
||||
Besides using DTR to tell the modem to hang up the phone line, a
|
||||
program (like mgetty) may send the unique escape code sequence to the
|
||||
modem to put it into AT command mode. This is +++ with 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.
|
||||
|
||||
<sect2> When DTR drops (is negated)
|
||||
<p>When DTR is negated (the "hang-up" signal), 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). In this section it's assumed that &Q6 is set (in antique
|
||||
modems it may not be).
|
||||
|
||||
&D2: The modem will hang up and go into AT command mode (off-line)
|
||||
to wait for the next call. Except that it will not automatically
|
||||
answer the phone (if it should) until DTR is asserted again. But
|
||||
since getty is set to respawn (in /etc/inittab) then getty will
|
||||
immediately restart after a logout and this will assert DTR. So what
|
||||
happens when someone logs out is that DTR only is negated for a
|
||||
fraction of a second (winks) before it gets asserted again. The DTR
|
||||
must be negated for at least the time specified by register S25.
|
||||
|
||||
&D3: In this case the modem does a hard reset: It hangs up and
|
||||
restores the saved profile . It should be now in the same state it
|
||||
was in when first powered on and it's ready to answer incoming calls.
|
||||
The S25 limit has no effect so even a very short "wink" is detected.
|
||||
Thus this is a stronger "reset" than &D2 which doesn't restore the
|
||||
saved profile and requires a longer wink to work.
|
||||
|
||||
If you don't know which of the above two to use try using &D3
|
||||
first. Under favorable conditions, either one should work OK. If the
|
||||
PC fails to successfully signal the modem when a logout happens, then
|
||||
the modem is apt to remain in on-line mode and no incoming calls can
|
||||
be received.
|
||||
|
||||
<sect2> Caller hangs up
|
||||
<p> Instead of logging out the normal way a caller may simply hang up.
|
||||
This results in a lost connection of course a loss of carrier. Other
|
||||
problem could also cause a loss of carrier. As a result, the NO
|
||||
CARRIER result is displayed (if this display is enabled). 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
|
||||
&C1 has been set). When the the PC's serial port gets the negated
|
||||
DCD signal it should kill the shell and then getty should respawn.
|
||||
|
||||
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).
|
||||
|
||||
As an alternative to the above, getty might could watch for a "NO
|
||||
CARRIER" message sent from the modem and take appropriate action.
|
||||
Does it ??
|
||||
|
||||
<sect1> Dial-in Modem Configuration
|
||||
<p> The 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
|
||||
<ref id="init_str" name="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
|
||||
your getty documentation here are some hints using Hayes AT commands:
|
||||
|
||||
<itemize>
|
||||
<item>&C1 Make the DCD line to the serial port track the actual
|
||||
state of the carrier (DCD asserted only when there's carrier).
|
||||
Getty_em requires &C0 (DCD always asserted)
|
||||
<item>&D3 Do a hard reset of the modem when someone logs out
|
||||
(or hangs up). For some modems it's reported that &D2 is
|
||||
required since they can't tolerate a hard reset ??
|
||||
<item>&K3 Use hardware flow control
|
||||
<item>V1 Display results (such as CONNECT) in words (and not in code)
|
||||
<item>Q0 Echo results words (such as CONNECT). Most gettys use them. But
|
||||
it's reported an AT&T version of uugetty requires Q2 (no result
|
||||
words for dial-in)
|
||||
<item>S0=? mgetty suggests S0=0 (manual answer). For other gettys if you
|
||||
want auto-answer S0=4 will auto-answer on the 4th ring, etc.
|
||||
<item>E0 Don't echo AT commands back to the serial port. mgetty suggest
|
||||
E1 (echo AT commands) for some modems. For dial-out you want E1 so you
|
||||
can see what was sent.
|
||||
</itemize>
|
||||
|
||||
<sect1> Callback
|
||||
<p> Callback 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.
|
||||
<p> Callback 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 <url url="ftp://ftp.icce.rug.nl/pub/unix/">. Step-by-step
|
||||
|
@ -2897,8 +2998,8 @@ who is familiar with vgetty please let me know its current status.
|
|||
<sect> Uugetty for Dial-In (from the old Serial-HOWTO) <label id="uugetty_">
|
||||
<p> Be aware that you could use mgetty as a (better?) alternative to
|
||||
<tt/uugetty/. <tt/mgetty/ is newer and more popular than uugetty.
|
||||
See <ref id="getty_" name="What is getty?"> for a brief comparison of
|
||||
these 2 gettys.
|
||||
See <ref id="getty_" name="Getty"> for a brief comparison of these 2
|
||||
gettys.
|
||||
|
||||
<sect1>Installing getty_ps
|
||||
<p> Since uugetty is part of getty_ps you'll first have to install
|
||||
|
@ -3067,13 +3168,18 @@ ringback feature.
|
|||
incorrectly calls it speed. For all modern modems you have no choice
|
||||
of the speed that the modem uses on the telephone line since it will
|
||||
automatically choose the highest possible speed that is feasible under
|
||||
the circumstances. But you do have a choice as to what speed will be
|
||||
used between your modem and your computer (PC-to-modem speed). This
|
||||
is sometimes called "DTE speed" where "DTE" stands for Data Terminal
|
||||
Equipment (Your computer is a DTE.) You need to set this speed high
|
||||
enough so this part of the signal path will not be a bottleneck. The
|
||||
setting for the DTE speed is the maximum speed of this link. Most of
|
||||
the time it should operate at lower speeds.
|
||||
the circumstances. If one modem is slower than the other, then the
|
||||
faster modem will operate at the slower ones speed. On a noisy line,
|
||||
this speed will drop still lower.
|
||||
|
||||
While the above speeds are selected automatically by the modems you do
|
||||
have a choice as to what speed will be used between your modem and
|
||||
your computer (PC-to-modem speed). This is sometimes called "DTE
|
||||
speed" where "DTE" stands for Data Terminal Equipment (Your computer
|
||||
is a DTE.) You need to set this speed high enough so this part of the
|
||||
signal path will not be a bottleneck. The setting for the DTE speed
|
||||
is the maximum speed of this link. Most of the time it should operate
|
||||
at lower speeds.
|
||||
|
||||
For an external modem, DTE speed is the speed (in bits/sec) of the
|
||||
flow over the cable between you modem and PC. For an internal modem,
|
||||
|
@ -3200,17 +3306,25 @@ is:
|
|||
<item> 33.6k (V.34): use 115.2 kbps
|
||||
<item> 14400 bps (V.32bis), with V.42bis data compression: use 57600 bps
|
||||
<item> 9600 bps (V.32), with V.42bis data compression: use 38400 bps
|
||||
<item> slower than a 9600 bps (V.32) modem: set your speed to the
|
||||
highest speed your modem supports.
|
||||
<item> slower than a 9600 bps (V.32) modem: Set the speed to the
|
||||
same speed as the modem.
|
||||
</itemize>
|
||||
|
||||
<sect>Communications Programs And Utilities<label id="comms">
|
||||
<p> While PPP is used for Internet access, there are various dialer
|
||||
programs that dial a phone number, possibly login, and then start PPP.
|
||||
Dialer programs include wvdial, chap scripts, kppp, and gnome-ppp.
|
||||
There are various dialers which can be For dialing out to public
|
||||
libraries, bulletin boards, etc. <tt/minicom/ is the most popular
|
||||
followed by <tt/Seyon/ (X-Windows only) and <tt/Kermit/.
|
||||
<p> While PPP is used for Internet access you also need a dialer
|
||||
program that is designed to work with PPP. Such a dialer program will
|
||||
dial a phone number. When the other side answers the phone then three
|
||||
things happen: PPP is started at both ends and you get logged in
|
||||
(often automatically). The exact sequence of these 3 events may vary.
|
||||
Dialer programs for ppp include wvdial, chap scripts, kppp, and
|
||||
gnome-ppp.
|
||||
|
||||
There are also other dialer programs which can dial out directly (thru
|
||||
a modem) to public libraries, bulletin boards, etc. This isn't the
|
||||
Internet. <tt/minicom/ is the most popular followed by <tt/Seyon/
|
||||
(X-Windows only) and <tt/Kermit/. People have likely also used these
|
||||
programs for dialing out with ppp for the Internet but it's not what
|
||||
they were originally designed for.
|
||||
|
||||
<sect1> Minicom vs. Kermit
|
||||
<p> Minicom is only a communications program while Kermit is both a
|
||||
|
@ -3230,7 +3344,8 @@ Although all Minicom documentation is free, it's not as extensive as
|
|||
Kermit's. Since permission is required to include Kermit in a
|
||||
commercial distribution, and since the documentation is not entirely
|
||||
free, some distributions don't include Kermit. In my opinion it's
|
||||
easier to set up Minicom and there is less to learn.
|
||||
easier to set up Minicom, there is less to learn, and you can still
|
||||
use kermit from within Minicom.
|
||||
|
||||
<sect1> List of Communication Software
|
||||
<p> Here is a list of some communication software you can choose from,
|
||||
|
@ -3248,8 +3363,8 @@ Are the least popular ones obsolete?
|
|||
<sect2> Most Popular Dialout
|
||||
<p> <itemize>
|
||||
<item> ppp dialers for getting on the internet: <tt/chat/, <tt/wvdial/
|
||||
<item><tt/minicom/ - <tt/telix/-like communications program. Supports
|
||||
scripts, zmodem, kermit
|
||||
<item><tt/minicom/ - <tt/telix/-like communications program. Can work
|
||||
with scripts, zmodem, kermit
|
||||
<item><url url="http://www.columbia.edu/kermit/" name="C-Kermit"> -
|
||||
portable, scriptable, serial and TCP/IP communications including file
|
||||
transfer, character-set translation, and zmodem support
|
||||
|
@ -3474,16 +3589,19 @@ Make sure you are using the correct syntax for your version of
|
|||
syntax in the <tt>/etc/inittab</tt> file. Make sure you are using the
|
||||
correct syntax for your version of <tt/getty/.
|
||||
|
||||
|
||||
<sect1>I Keep Getting: ``Id "S3" respawning too fast: disabled for 5 minutes''
|
||||
<p> Id "S3" is just an example. In this case look on the line which
|
||||
starts with "S3" in <tt>/etc/inittab</tt>. This is causing the problem.
|
||||
Make sure the syntax for this line is correct and that the device
|
||||
(ttyS3) exists and can be found.
|
||||
starts with "S3" in <tt>/etc/inittab</tt> and calls getty. This line
|
||||
causes the problem. Make sure the syntax for this line is correct and
|
||||
that the device (ttyS3) exists and can be found. If the modem has
|
||||
negated DCD and getty opens the port, you'll get this error message
|
||||
since negated DCD will kill getty. Then getty will respawn only to be
|
||||
killed again, etc. Thus it respawns over and over (too fast). It
|
||||
seems that if the cable to the modem is disconnected or you have the
|
||||
wrong serial port, it's just like DCD is negated. All this can occur
|
||||
when your modem is chatting with getty. Make sure your modem is
|
||||
configured correctly. Look at AT commands <tt/E/ and <tt/Q/.
|
||||
|
||||
Make sure your modem is configured correctly. Look at registers
|
||||
<tt/E/ and <tt/Q/.
|
||||
This can occur when your modem is chatting with <tt/getty/.
|
||||
<p>
|
||||
If you use uugetty, verify that your <tt>/etc/gettydefs</tt> syntax is
|
||||
correct by doing the following:
|
||||
|
@ -3491,21 +3609,19 @@ correct by doing the following:
|
|||
linux# getty -c /etc/gettydefs
|
||||
</verb></tscreen>
|
||||
|
||||
<p>
|
||||
This can also happen when the <tt/uugetty/ initialization is failing.
|
||||
See section <REF id="nowork" name="uugetty Still Doesn't Work">.
|
||||
|
||||
See section <ref id="uu_nowork" name="uugetty Still Doesn't Work">.
|
||||
|
||||
<sect1>My Modem is Hosed after Someone Hangs Up, or uugetty doesn't respawn
|
||||
<p>
|
||||
This can happen when your modem doesn't reset when DTR is dropped.
|
||||
Greg Hankins saw his RD and SD LEDs go crazy when this happened.
|
||||
You need to have your modem reset. Most Hayes compatible modems
|
||||
do this with <tt/&D3/, but on his USR Courier, he had to set
|
||||
<tt/&D2/ and <tt/S13=1/. Check your modem manual (if you have
|
||||
one).
|
||||
You need to have your modem reset. Most Hayes compatible modems do
|
||||
this with <tt/&D3/, but for USR Courier, SupraFax, and other
|
||||
modems, you must set <tt/&D2/ (and <tt/S13=1/ for USR Courier).
|
||||
Check your modem manual (if you have one).
|
||||
|
||||
<sect1> uugetty Still Doesn't Work <label id="nowork">
|
||||
<sect1> uugetty Still Doesn't Work <label id="uu_nowork">
|
||||
<p>
|
||||
There is a <tt/DEBUG/ option that comes with <tt/getty_ps/. Edit your
|
||||
config file
|
||||
|
@ -3905,7 +4021,7 @@ may be found on the Internet.
|
|||
<p> <itemize>
|
||||
<item>Cable-Modem mini-howto
|
||||
<item>ISDN Howto (not a LDP Howto) <url
|
||||
url="http://www.suse.de/Support/sdb_e/isdn.html">: drivers for ISDN
|
||||
url="http://sdb.suse.de/sdb/en/html/isdn.html">: drivers for ISDN
|
||||
"Modems". Much related info on this is in German.
|
||||
<item>Linux-Modem-Sharing mini-howto. Computers on a network share
|
||||
a single modem for dial-out (like a shared printer).
|
||||
|
@ -4046,11 +4162,12 @@ actually didn't.
|
|||
|
||||
To avoid this difficulty one may simultaneous change only the phase
|
||||
and amplitude (with no change in frequency). This is called
|
||||
phase-amplitude modulation (sometimes also called quadrature amplitude
|
||||
modulation = QAM). This method is used today for the common modem
|
||||
speeds of 14.4k, 28.8k, and 33.6k. The only significant case where
|
||||
this modulation method is not used today is for 56k modems. But even
|
||||
56k modems exclusively use QAM (phase-amplitude modulation) in the
|
||||
phase-amplitude modulation. It is also called quadrature amplitude
|
||||
modulation (= QAM) since there were only 4 possible phases in early
|
||||
versions of it. This method is used today for the common modem speeds
|
||||
of 14.4k, 28.8k, and 33.6k. The only significant case where this
|
||||
modulation method is not used today is for 56k modems. But even 56k
|
||||
modems exclusively use QAM (phase-amplitude modulation) in the
|
||||
direction from your PC out the telephone line. Sometimes even the
|
||||
other direction will also fall back to QAM when line conditions are
|
||||
not good enough. Thus QAM (phase-amplitude modulation) still remains
|
||||
|
@ -4143,10 +4260,11 @@ Two such circuits are used for a phone call, one in each direction.
|
|||
The 56k signal is only used in one of these directions: from your ISP
|
||||
to your PC. The other direction, from your home/office to the ISP,
|
||||
uses the conventional phase-amplitude modulation scheme with a maximum
|
||||
of 36.6kbps (and not 53.3kbps). Yet due to sophisticated cancellation
|
||||
methods it's able to send simultaneously in both directions over the
|
||||
analog portion of the telephone line as explained in the next
|
||||
subsection.
|
||||
of 36.6kbps (and not 53.3kbps). The analog portion of the circuit
|
||||
from your home/office to the nearest telephone Co. office was never
|
||||
intended to be bi-directional since it's only a single twisted pair.
|
||||
But due to sophisticated cancellation methods it's able to convey data
|
||||
simultaneously in both directions as explained in the next subsection.
|
||||
|
||||
<sect1> Full Duplex on One Circuit
|
||||
<p> Modern modems are able to both send and receive signals
|
||||
|
@ -4165,15 +4283,15 @@ the digital part of the phone system then bidirectional communication
|
|||
(sending and receiving at the same time) would be no problem because
|
||||
two channels would be available.
|
||||
|
||||
But the end portions of the signal path go over just one circuit. How
|
||||
But the end portion of the signal path goes over just one circuit. How
|
||||
can there be two-way communication on it simultaneously? It works
|
||||
something like this. Suppose your modem is receiving a signal from
|
||||
the other modem and is not transmitting. Then there's no problem.
|
||||
But if it were to start transmitting (with the other received signal
|
||||
still flowing into the modem) it would drown out the received signal.
|
||||
If the transmitted signal was a "solid" voltage wave applied to the
|
||||
end of the line then there is no way any received signal could be
|
||||
present at that point.
|
||||
But if your modem were to start transmitting (with the other received
|
||||
signal still flowing into your modem) it would drown out the received
|
||||
signal. If the transmitted signal was a "solid" voltage wave applied
|
||||
to the end of the line then there is no way any received signal could
|
||||
be present at that point.
|
||||
|
||||
But the transmitter has "internal impedance" and the transmitted
|
||||
signal applied to the end of the line is not solid (or strong enough)
|
||||
|
@ -4344,7 +4462,7 @@ next 3 sections: ISDN, DSL and 56k, concern digital-to-digital
|
|||
<p> The "modem" is really a Terminal Adapter (TA). A Debian package
|
||||
"isdnutils" is available. There is a ISDN Howto in German with an
|
||||
English translation: <url
|
||||
url="http://www.suse.de/Support/sdb_e/isdn.html">. It's put out by
|
||||
url="http://sdb.suse.de/sdb/en/html/isdn.html">. It's put out by
|
||||
the SuSE distribution of Linux and likely is about drivers available
|
||||
in that distribution. There is an isdn4linux package and a newsgroup:
|
||||
de.alt.comm.isdn4linux. Many of the postings are in German. You
|
||||
|
@ -4394,7 +4512,7 @@ line modems are incompatible with other brands.
|
|||
|
||||
<p> Here's some info on the bloated bandwidth required for standard
|
||||
fax including the dot density. You can of course send a fax via your
|
||||
modem if you dial the real telephone number of the recipinet.
|
||||
modem if you dial the real telephone number of the recipient.
|
||||
|
||||
<tscreen><verb>
|
||||
A4 paper: 216mm (horizontal) * 297mm (vertical)
|
||||
|
@ -4408,6 +4526,91 @@ paper using fine mode is (216*8) * (297*7.7) = about 4 million dots.
|
|||
With a compression ratio of 8:1 it takes about 50 seconds at 9600bps
|
||||
for transmission.
|
||||
|
||||
<sect> Appendix G: Antique Modems
|
||||
<p> This section is about modems with modem-to-modem speeds of 9600
|
||||
bps or less. Around 1980 many modems only had a speed of 300 bps
|
||||
(which was also 300 baud). This is only 0.3kbps. Modern modems are
|
||||
over 100 times faster. Many old-slow modems are still in use so they
|
||||
are not really "antique" quite yet. This section compares the antique
|
||||
modems with the modern ones. You should read it if you are interested
|
||||
in modem history or are intending to actually use an antique modem.
|
||||
|
||||
<sect1> Autobauding <label id="autobaud_">
|
||||
<sect2> Various meanings
|
||||
<p>This term has a few different meanings. In general it means the
|
||||
automatic adjustment of modem-to-modem speed or modem-to-serial_port
|
||||
speed.
|
||||
|
||||
<sect2> Modem-to-modem speed
|
||||
<p>Modern modems negotiate the modem-to-modem speed and protocol when
|
||||
they first connect to each other. If one side can't negotiate, the
|
||||
other side should accept whatever speed and protocol that the antique
|
||||
modem has available. Sometimes this is called "autobauding". When
|
||||
both modems automatically lower their speed due to a noisy line it's
|
||||
called "fallback". Thus users (or computer programs in your PC) don't
|
||||
need to deal with this (unless the S37 register has been set so as to
|
||||
disable autobauding).
|
||||
|
||||
But many old modems didn't have such autobauding (although many had
|
||||
fallback). If you have such a modem, it will likely work OK if the
|
||||
other modem you connect to is a modern one that can adjust it's speed
|
||||
and protocol to yours. But a problem arises if both modems which want
|
||||
to communicate with each other are both antique and don't support
|
||||
autobauding. How was this done?
|
||||
|
||||
In olden days, a computer dial-in site might have a number of phone
|
||||
lines, each of which would have a specific speed modem on it. For
|
||||
example, if you had a 1200 baud modem then you simply only dialed in
|
||||
to certain telephone numbers that supported that speed. Once a site
|
||||
obtained modems that could support various speeds on the same modem
|
||||
and automatically detect the callers speed (do autobauding) then
|
||||
people could call in using modems that didn't do this autobauding
|
||||
(providing that their speed and protocol was supported).
|
||||
|
||||
<sect2> Modem-to-serial_port speed
|
||||
<p> When a modem modem is sent an init string (or a dial command),
|
||||
the modem detects the speed of the serial port and sets it's
|
||||
modem-to-serial_port speed to this value. It does this by sensing the
|
||||
speed of the "AT" at the beginning of the string.
|
||||
|
||||
Old modems couldn't do this and one would need to set the computer's
|
||||
serial port speed (with stty or the like) to the same exact value as
|
||||
the modem-to-modem speed (such as 1200 bps). If the modem had a
|
||||
choice of speeds one could use the AT command F to select one. But
|
||||
for dial-in when there was a choice of speeds (via autobauding), if a
|
||||
connection was made at say 2400 baud, then the modem-to-serial_port
|
||||
speed would change to 2400 baud. Then one would need to start getty
|
||||
at 2400 baud. Thus getty needed to adjust to whatever speed was
|
||||
coming from the modem. Today it's the other way around: the modem
|
||||
adjusts its modem-to-serial_port speed to whatever the serial port is
|
||||
using.
|
||||
|
||||
The original getty program configuration file /etc/gettydefs has an
|
||||
optional autobauding feature (see "next-label" in the manual) which
|
||||
will change the speed of the serial port. The agetty program has a
|
||||
similar baud rate detection feature. This was used to adjust the speed
|
||||
of the serial port to the modem-to-modem speed of an incoming dial-in
|
||||
call.
|
||||
|
||||
Modern modems can use almost any serial port speed. To do this they
|
||||
employ speed buffering and flow control. Speed buffering means that
|
||||
modems have buffers so that there can be a difference between the
|
||||
modem-to-modem speed and the modem-to-serial_port speed. If the flow
|
||||
entering the modem is faster than the flow exiting it, the excess flow
|
||||
is simply stored in a buffer in the modem. Then to prevent the buffer
|
||||
from overflowing, the modem sends a flow control signal to stop the
|
||||
input flow to the modem. See <ref id="flow_control" name="Flow
|
||||
Control"> for more details.
|
||||
|
||||
<sect1> Before AT Commands
|
||||
<p> Hayes introduced the AT command set and other modem manufacturers
|
||||
adopted it as a standard. Before the AT commands, many modems used
|
||||
dip switches to configure the modem. Another command set is the CCITT
|
||||
V.25bis command set. Some modems supported both CCITT and AT
|
||||
commands. The CCITT V.25bis also specifies how Synchronous
|
||||
modem-to-serial_port communication is to take place using either the
|
||||
ASCII or 8-bit EBCDIC character sets.
|
||||
|
||||
END OF Modem-HOWTO
|
||||
</article>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue