Getty and PPP

Harald Becker ralda at gmx.de
Tue Sep 27 21:27:28 UTC 2011


 Hallo Peter!

On 26.09.2011 19:41, Peter LaDow wrote:
> getty -i -h -n -I 'ATE0Q1&D2&C1S0=1\015' -l /usr/bin/startppp 115200 /dev/ttyS1
>
> Is there any reason that getty would not wait?  I don't have the '-L'
> so it seems it should wait for carrier detect.

If you use -I with getty, the port is opened immediately and thus
ignores DCD. Standard getty functionality differs from mgetty which uses
manual modem answer, hence you can't do modem init with standard getty
and wait for DCD. The differences are hidden deep in Unix serial port
programming practices (Too much for explanation here).

Try the following:

- Initialize your modem for auto answer and write settings into flash
memory of modem (use a program like minicom or Busybox microcom for this)
- use getty without -L and without -I !!!
- when getty is started the DTR shall raise and your modem shall
initialize and switch to auto answer mode (automatic modem reaction to
DTR raise is to load config from internal flash)
- the port open in getty shall now wait until DCD is raised by the modem
(no -L)
- when a call arrives the modem shall answer and raise the DCD on
successful connection
- now the port open in getty succeeds and starts your ppp script (which
may use active mode)

The usual purpose of getty -I is terminal initialization (for local
lines) ... NOT for modem initialization (one of the major mistakes).

--
Harald



More information about the busybox mailing list