modems, getty

Tim Endres time at oxtrap.aa.ox.com
Wed Feb 7 09:13:39 AEST 1990


This topic needs a little more discussion.
The way the distribution getty for A/UX works is as follows:
  . getty is invoked by init with parameters from inittab.
  . getty resolves the parameters and gets more from /etc/gettydefs.
  . getty call open() on the serial line (/dev/.....).
    This asserts the DTR line on the port.
  . open() BLOCKS until the CARRIER DETECT comes high.
    This is a result of using "modem" control on the device which can
    be specified with "stty modem". This also causes Kermit to hang if
    the modem is not yet connected, which is why "stty -modem" exists.
  . When the CARRIER DETECT line is asserted, the open() call succeeds
    and getty proceeds with the login: prompt.

Now, if you either (1) don't have modem control set [a gettydefs parm]
-or- (2) your cable does not pass the CD line properly, then getty's
open() succeeds immediately, and the modem gets the *command* login:
which of course it does not like so it says "ERROR" which, of course,
gets a "password:" from the spawned login process. Finally, the login
attempt of ERROR with password ERROR fails, and the cycle repeats
itself causing the "blinking lights" problem many people have.

Another problem exists when the modem (as many HAYES like to do)
asserts CD all the time on its own. This is provided for brain dead
applications that can not deal with the fact that CD is low. This is
usually a DIP switch setting on the Hayes.

Finally, if you can not get getty to block on CD, then you can use the
technique of putting the modem into "quiet" mode, thus avoiding the
input from the modem (i.e. RING, RING, CONNECT). This is not an
optimal solution, but it gets the job done most of the time.

Also, drop of DTR should drop a connection and should reset the modem
if possible. Further, calls should not be accepted with DTR low.

[Cathy, I tried e-mail, but it bounced.]
tim.



More information about the Comp.unix.aux mailing list