Subject: Re: getty/modem issue
To: Adam Glass <adam@zembu.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-misc
Date: 09/30/2000 17:05:25
On Sat, Sep 30, 2000 at 01:02:48AM -0700, Adam Glass wrote:
> Greetings. I'm using NetBSD 1.5 Alpha on a Dell Inspiron 3800 laptop
> with an external Zoom modem. I'm using getty to answer the phone and
> accept logins on /dev/tty00, and spit out a login banner with getty's
> "if" token. The modem correctly auto-answers reliably, and carrier
> sequences are negotiated, and lights blink and all seems well.
> Unfortunately, about 50% of the time, the call gets disconnected *right*
> after the connection sequence completes, and right when getty is
> supposed to send the issue file.
>
> On a hunch, I guessed that this was the result of getty sending the file
> too soon, interrupting the not-quite-completed connection. Lacking
> sufficient experience to debug the source code vis-a-vis CD/DSR signals
> and such, I simply put a one second pause into the getty source at the
> point where it's going to send the "if" file. (Is there a way to do
> this without modifying the source? I couldn't find a way.) Anyway,
> inserting a one second pause made the login sequence work correctly 100%
> of the time -- no more premature disconnections.
>
> Has anyone else experienced anything like this? I searched the archives
> but didn't find anything...
Yes, I've seen it with a USR sportster 56k. The modem asserts CD some time
after it prints the "CONNECT" string, so if the program tries to read from
the modem rigth after it gets CONNECT, it gets EOF because CD isn't asserted.
I guess the same problem can happens with write instead of read.
My solution was similar to yours: a small delay before reading.
Maybe we could add some hook to getty to specify the delay in /etc/ttys ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
--