Subject: Re: TTY/Modem help???
To: None <netbsd-help@NetBSD.ORG>
From: None <jduncan@papyrus-inc.com>
List: netbsd-help
Date: 07/16/1997 14:19:08
> 
> Here's my idea:
> 
>         cat /dev/tty00 < initfile
> 

pppd will use the "chat" companion program to initialize the modem as
needed when it starts up. Chat is the simplest form of modem control,
and the documentation is obvious. (man 1 chat) Just remember to use the
null string ("") as the first expected response in the chat file.

I'd say that a pppd options file would be your best way.

> 
>         tty00   "/usr/libexec/getty std.57600"  vt100 off secure
> 
> or something similar. I'm not sure how to set the speed at which the modem

This is good. USR modems will autodetect the speed to talk at. You may
get some more efficiency at 115200bps, but that puts more load on the
processor.

But
> then, running pppd seems to require root access. Hm...
> 

This is true... FreeBSD has a user-mode ppp, but the last time I looked
into a port, I didn't really feel like doing it. The problem with pppd
is that it won't die after it's been started. 

try a script like this as "/etc/ppp/options"

	57600
	modem
	persist
	+chap
	+pap
	crtscts
	login
	connect "chat -f /etc/ppp/chat-file"

and the chat script should look something like:

	ABORT ERROR
	TIMEOUT 5
	""
	ATZ
	OK
	TIMEOUT 0
	""
	RING
	""
	RING
	ATA
	CONNECT

For the connection on the PC side, it should be able to run either
a w95 or trumpet winsock connection without too much tinkering. Set the
devil to authenticate using pap, and give it a login and password that
exist in the unix /etc/passwd. 

If this doesn't work, it's probably related to the line "TIMEOUT 0"
which I think disables timing out, but it might not.

If pppd gets out of control or something, type "kill -9
/var/run/ppp0.pid"

Have fun -

extern "C" __declspec ( dllimport ) VOID WINAPI _john_duncan ();