[LUGOS] mgetty + callback

Ales Kosir ales.kosir at zaslon.com
Wed Jan 9 17:23:09 CET 2002


Vir je bil prirocnik dveh popolnoma razlicnih modemov, kar se vedno ne
pomeni, da se tvoj modem obnasa po teh navodilih.

Morda pomaga tale prepis iz aktualnega Modem-HOWTO:

Now for more details on the two methods of answering the call. For the first
method where the modem automatically answers the call, the number of times
it will ring before answering is controlled by the S0 register of the modem.
If S0 is set 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) AT command to the modem while the phone is ringing. (Actually
an "ATA" is sent since all modem commands are prefixed by "AT".) This is
known as "manual" answering since the modem itself doesn't do it
automatically (but getty does). You might think it best to utilize the
ability of the modem hardware to automatically answer the call, but it's
actually better if getty answers it "manually". 

For the "manual" answer case, getty opens the port at boot-time and listens.
When the phone rings, a "RING" message is sent to the listening getty. Then
if getty wants to answer this ring, it sends the modem an "A" command. Note
that getty may be set to answer only after say 4 "RING" messages (the 4th
ring) similar to the automatic answer method. The modem then makes a
connection and sends a "CONNECT ..." message to getty which then sends a
login prompt to the caller. It's not all quite this simple as are some
special tricks used to allow dial-out when waiting for a call. See Dialing
Out while Waiting for an Incoming Call

The automatic answer case uses the CD (Carrier Detect aka DCD) wire from the
modem to the serial port to tell when a connection is made. It works like
this. At boot-time getty tries to open the serial port but the attempt fails
since the modem has negated CD (the modem is idle). Then the 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
getty sends the login prompt. While getty is waiting (sleeping) at the open
statement, other processes can run so it doesn't degrade computer
perfomance. What actually wakes getty up is an interrupt which is issued
when the CD line from the modem changes its state to on. 

You may wonder how getty is able to open the serial port in the
"manual"-answer case since CD may be negated. Well, there's a way to write a
program to force the port to open even if there is no CD signal asserted. 

...

12.8 Dial-in Modem Configuration 

S0=? mgetty suggests S0=0 (manual answer). If you set S0=3 the modem will
auto-answer on the 3rd ring, etc. Agetty uses auto-answer. So does uugetty
(usually).
...


Ce pobrskam po internetu, pa so nasveti dveh vrst: tisti, ki predlagajo S0=0
in drugi S0=1. 
 "Set S0=1 if you want to return the modem back. The modem MUST not answer
the phone for mgetty to work."

Lep pozdrav,
Ales

-----Original Message-----
From: Rok Krulec [mailto:Rok.Krulec at fpp.edu]
Sent: Wednesday, January 09, 2002 10:55 AM
To: lugos-list at lugos.si
Subject: Re: [LUGOS] mgetty + callback


Zivjo Ales,

pa so tile viri manuali za modem ali mgetty navodila ?

V mojem policy.h imam definirano sledece:
#define MODEM_INIT_STRING       "ATS0=0Q0&D3&C1X3"

iz mgetty.8 man pagea:
       -n #   Tells mgetty to pick up the  phone  after  the  #th
              RING. Default is 1.
Kar bi lahko pomenilo, da steje RING stringe.

Tale mgetty ze deluje kaksni 2 leti na 8 linijah v kombinaciji
Cyclades multiserijske kartice in USR Sportsterjev.
Sklepam, da si verjetno bral navodila za modem.

Rok Krulec

Portoroz/Slovenia, 09.Jan 2002 @ 10:41 CET
Public GnuPG key @ http://rok.fpp.edu/pgp.key

On Tue, 8 Jan 2002, Ales Kosir wrote:

> Dne  Mon, 7 Jan 2002 08:15:24 +0100 (CET)
> je Rok Krulec <Rok.Krulec at fpp.edu> zapisal:
> > P.S.: S0 register more bit =0, saj se mgetty odzove na podlagi RING
> stringa.
> 
> Po mojih virih:
> 
> S0 auto answer ring number
> Register S0 determined the number of rings before the modem answers the
> call. The default is 0; that is, the modem will not auto-answer the calls.
> If S0 is set to 2, the modem will answer calls after the second ring.
> 
> S1 ring count
> Register S1 increases by one each time the modem detects a ring signal on
> the telephone line. It is cleared 8 seconds after the last ring. The
> register is enabled only when S0 is set to a non-zero value, that is, with
> auto-answer feature enabled.
> 
> Kar pomeni, da za takojsnji auto-answer nastavimo S0=1; S1 pa je register,
> ki ga obicajno preberemo, da zvemo stevilo zvonjenj pred odgovorom.
> 
> Lep pozdrav,
> Ales
> 



More information about the lugos-list mailing list