Subject: Re: pppd weird stuff..
To: Sean Murphy <033197m@acadiau.ca>
From: Robert Alexander Baxter <alex@santa.asf.alaska.edu>
List: netbsd-help
Date: 08/07/1998 14:01:52
Sean Murphy wrote:
> 
> I've finally got my 386 set up (1.3.2) as a gateway/router for my local
> network.  I'm trying to set it up so that when my 386 dials up, it routes
> internet packets to/from the appropriate system on the network.  That bit
> seems to be working fine.  The only problem I have is getting the darn
> thing to dial up.  I've been fiddling with pppd for quite some time now,
> but whenever it dials up, it makes its squelchy connect noise, stops, and
> starts to redial again.  I've tried setting the timeout values to way
> higher to see if that was the problem.  It wasn't.  I'm about out of
> ideas, anyone else have a clue for me?
> 

Hello, may I see your chat script?

Here is the line I use to start pppd:

   pppd /dev/tty02 115200 crtscts defaultroute connect /root/uacn.sh

Here is the contents of /root/uacn.sh:

   #!/bin/sh
   rc=4
   while [ $rc != 0 ]; do
        chat -v -f /root/uacn.txt
        rc=$?
   done
   exit 0

That file runs keeps running my chat script until
it gives a return code of 0, which means success.

Here is the contents of /root/uacn.txt (annotated):

   ABORT BUSY			<-- quit if busy dial tone
   ABORT "NO CARRIER"		<-- quit if no dial tone
   "" ATZ			<-- reset modem
   OK AT&F&C1&D2M		<-- set to factory default, plus some xtra
   OK ATDT4740771		<-- dial my ISP (my work/university)
   CONNECT \r			<-- send [RETURN] after connecting
   name> foobar			<-- "Username>" prompt and my (not my real) username
   word> spanky			<-- "Password>" prompt and (not my real) password
   > c\sppp			<-- varying prompt always ends with ">"
   				    and "c ppp" ("\s" means [SPACE]) connects

I hope the email server doesn't wrap these lines and
mess up the text...

Hope this helps (please post your scripts for
more specific help),
 -Alex (:-)
  alex@santa.asf.alaska.edu