Clifford Kite <[EMAIL PROTECTED]> wrote:
> The problem is that apparently neither pppd or dip correctly resets the
> serial terminal attributes. You can do "stty -a < /dev/ttySx" to get these
> attributes while pppd is connected to your ISP. You can also use stty to
> display the attributes after the minicom trick too, without a PPP
> connection.
>
> Several of the settings are different in the output of stty for the two
> cases, but in particular there is a "clocal" attribute after the minicom
> trick but it's "-clocal" during the PPP connection. If you do
> "stty -clocal < /dev/ttySx" after the minicom trick then both chat and
> subsequent stty commands hang again. You can find brief explanations of
> allthe device file settings that stty shows in "man tcsetattr" .
The tty is set -clocal so that we notice when the modem hangs up.
When the tty is set -clocal, an open will hang waiting for the carrier
detect (CD) signal unless the O_NDELAY flag is set in the open call.
(That's how pppd opens it.)
pppd does try to restore the terminal parameters that the tty had when
pppd first opened it. But the way the Linux tty stuff works is that
once the modem has signalled a hangup (by dropping CD), you can't do a
single thing with the open file descriptor you have to the tty except
close it. So pppd can't restore the terminal parameters (it would
have to close and reopen the tty, which it doesn't do).
The BSD stty program takes a -f flag as in:
stty -a -f /dev/ttyxx
which opens the tty with the O_NDELAY flag, which is the Right Thing
for stty since you would never want stty to wait for CD.
Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]