Subject: bin/6102: pppd 'cdtrcts' broken
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/04/1998 14:13:43
>Number:         6102
>Category:       bin
>Synopsis:       cdtrcts option in pppd is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep  4 12:20:00 1998
>Originator:     Frederick Bruckman

>Release:        September 3, 1998
System: NetBSD 1.3G NetBSD 1.3G (FB) #96: Sun Aug 30 11:30:21 CDT 1998 mac68k

	pppd fails to recognize the 'cdtrcts' option altogether. As below:

Sep  4 11:52:50 fb pppd[195]: In file /etc/ppp/options: unrecognized option 'cdtrcts'

	Prior to September 3rds changes, the option was recognized.
	(Although it didn't necessarily work that well--same workaround applies.
	Apparently, "chat" would relinquish the port with 'crtscts' set, 
	then "pppd" would not be able to set 'cdtrcts'. This is a
	characteristic of the the serial device. You can do this:

	root-> stty -f /dev/tty00 crtscts -cdtrcts

	and this

	root-> stty -f /dev/tty00 -crtscts cdtrcts

	but not this!

	root-> stty -f /dev/tty00 crtscts -cdtrcts
	root-> stty -f /dev/tty00 cdtrcts
	stty: tcsetattr: Invalid argument

	The port has to be open by some process, .e.g. "pppd", for any
	of this to work, of course.)

	Assuming that everyone is happy with the present behavior of
	the serial ports, and with chat, the desired behavior, in the
	presence of the 'cdtrcts' option, is to set the the port that
	way only after the 'connect' script completes.

	Worth considering, is the idea that the 'connect' command
	should be called with the "right" handshaking (for the way
	your cable is wired) to begin with.

	Run "ppd" with 'cdtrcts' in the options file. Presumably, it
	would do the same thing on the command line or in one of the
	other "options" files.
	You can set up the port with the connect script, and then
	simply omit any handshaking options from the pppd command line
	or options files. Substitute something like this for your
	present "connect" option, wherever that normally lives.

	connect "(chat -v -f /etc/ppp/chats/enteract && 
	stty -f /dev/tty00 clocal -crtscts cdtrcts speed 38400)"

	That needs to be all on one line. Also, don't set your modem to come
	up with "&D0", instead, include "AT&F1&C1&D0..." in your chat script.

	There are other requirements, of course, that aren't part of
	the fix. If you need the 'cdtrcts' option, you probably
	already know that you need a specially wired cable, 
	you also need 'clocal' in pppd options, and you need a "disconnect"
	script to ensure that the phone hangs up.