Subject: Re: crtscts on /dev/tty00
To: Harry <Harry.Weppner@gmx.net>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 12/03/1997 18:22:05
> Hi there!

Hello.

> Shouldnt the command
> 
> weppner@little# stty -a -f /dev/tty00 crtscts
> ispeed 0 baud; ospeed 57600 baud; 0 rows; 0 columns;
> lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
>         -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
>         -extproc
> iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
>         brkint -inpck -ignpar -parmrk
> oflags: opost onlcr -ocrnl oxtabs
> cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
>                                                         ^^^^^^^^
>         -cdtrcts
> cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
>         eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
>         min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
>         stop = ^S; susp = ^Z; time = 0; werase = ^W;
> 
> enable crtscts on the selected port!? Am I doing something wrong!?

Kinda, and yes.

1) for some reason I do NOT understand, stty shows you the settings on
the port BEFORE it applies the settings you pass. So you won't see
what you're setting.

Also, the serial port's settings get reset each time it goes from
closed to open. So you can't stty -f /dev/tty0X settings   and have them
stick for the next use. So if you stty -f /dev/tty0X something, and then
stty -e -f /dev/tty0X, you won't see your changes unless something else
(like a cat /dev/tty0X) kept the port open.

2) You want cdtrcts, not crtscts, for your problem. crtscts only does
outbound flow control (we hush when requested), not inbound flow
control (asking the other side to hush).

> I have been investigating why my ppp link would report errors such as:
> 
> zstty0: 6 silo overflows, 0 ibuf floods

Good. These messages indicate you have a 1.3 kernel. Your above messages
indicate you have a 1.3 stty. A 1.3 pppd knows about cdtrcts in addition
to crtscts (and it should also be in the man page). :-)

> ppp0: bad fcs 1585
> ppp0: VJ uncompress failed on type comp
> ppp0: VJ uncompress failed on type comp
> ppp0: bad fcs 4d35
> ppp0: bad fcs be1
> ppp0: VJ uncompress failed on type comp
> ppp0: VJ uncompress failed on type comp
> ppp0: VJ uncompress failed on type comp
> zstty0: 3 silo overflows, 0 ibuf floods
> ppp0: bad fcs ee29
> ppp0: bad fcs e995
> ppp0: bad fcs a362
> ppp0: bad fcs efdd
> ppp0: packet too big
> zstty0: 5 silo overflows, 0 ibuf floods
> 
> 
> My etc/ppp/options file looks like this:
> 
> /dev/tty00 57600
> crtscts
> kdebug 1
> noipdefault
> nopcomp
> novj
> nobsdcomp 
> noccp
> nodeflate
> noipx
> novjccomp
> defaultroute
> holdoff 10
> idle 360
> lock
> lcp-echo-interval 30
> lcp-echo-failure 10
> name pweppn01
> connect "chat -f /etc/ppp/ppp-dial"

Change "crtscts" to "cdtrcts" and it should work.

Take care,

Bill