Re: ttyS1 hangs, cua1 works fine

Gert Doering (gert@greenie.muc.de)
Sun, 29 Mar 1998 21:49:05 +0200 (MEST)


Hi,

mlord wrote:
> > > > /dev/ttyS1 works *once* after each boot,
> > > > but when I then kill pppd, it never works again.
> > > > /dev/cua1 doesn't care -- always works fine.
> > ...
> ...
> > After stopping pppd, I can no longer examine the ttyS1 settings.
>
> UPDATE: I hacked the source code for stty
> to open /dev/ttyS1 with O_NONBLOCK, which works,

... it's supposed to :-)

> and now see the following after pppd stops:

> speed 115200 baud; rows 92; columns 80; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
> eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase =
> ^W;
> lnext = ^V; flush = ^O; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread -clocal crtscts
^^^^^^^

That's the problem - clocal is not set, thus the DCD line is honoured, and
thus an open("/dev/ttyS*", ...) will block until the carrier line changes
state to "active". With CLOCAL set, the signal is ignored (completely).

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert.doering@physik.tu-muenchen.de

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu