Subject: Re: chat/PAP/ppp probs
To: Tristan Doherty <ristar@abacom.com>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 04/03/1997 15:16:18
> 
> Hi again,
> 
> 	Now that I have pretty much figured out chat and pppd, my problem
> is PAP, and how to make the smooth transition from the login: prompt to
> ppp. I don't know how this process works, and can't tailor a chat script to
> fit the bill. Here are the relevant files:
> 
> ppp-up:
> 
> #!/bin/sh
> 
> /usr/sbin/pppd /dev/tty00 1200 connect "/etc/ppp/chatfile" \
> +ua "/etc/ppp/ppp-login" +pap crtscts \
> defaultroute noipdefault modem

I think you're using +ua right, but man pppd says that +ua is obsolecent.
I think the new way is to use the "user" option to say what user name
to use, and to use a /etc/ppp/pap-secrets file.

> chatfile:
> 
> #!/bin/sh
> /usr/sbin/chat -v \
> "" "ATF" \
> "OK" "ATS0=0V1E1H0X4" \
> "OK" "ATDT8202404" \
> "ogin: " ""

Do you really want the "login" at the end? PAP will identify you
in its own way, after saying it wants to do PAP.

> pap-secrets:
> 
> * * <password>

Possably not needed given the +ua option, but a good thing to have.

> ppp-login:
> 
> <username>
> <password>
> 
> chat-error.log:
> 
> Apr  2 23:19:39 homer chat[241]: send (ATF^M)
> Apr  2 23:19:39 homer chat[241]: expect (OK)
> Apr  2 23:19:39 homer chat[241]: ATF^M^M
> Apr  2 23:19:39 homer chat[241]: OK -- got it
> Apr  2 23:19:39 homer chat[241]: send (ATS0=0V1E1H0X4^M)
> Apr  2 23:19:40 homer chat[241]: expect (OK)
> Apr  2 23:19:40 homer chat[241]: ^M
> Apr  2 23:19:40 homer chat[241]: ATS0=0V1E1H0X4^M^M
> Apr  2 23:19:40 homer chat[241]: OK -- got it
> Apr  2 23:19:40 homer chat[241]: send (ATDT8202404^M)
> Apr  2 23:19:40 homer chat[241]: expect (ogin: )
> Apr  2 23:19:40 homer chat[241]: ^M
> Apr  2 23:19:52 homer chat[241]: ATDT8202404^M^M
> Apr  2 23:19:52 homer chat[241]: CONNECT 1200^M
> Apr  2 23:19:59 homer chat[241]: *******************^M
> Apr  2 23:19:59 homer chat[241]: * INTERNET ABACOM *^M
> Apr  2 23:19:59 homer chat[241]: *******************^M
> Apr  2 23:19:59 homer chat[241]: ^M
> Apr  2 23:19:59 homer chat[241]: Les VRAIS leaders / The REAL leaders^M
> Apr  2 23:20:00 homer chat[241]: (819) 820-2929^M
> Apr  2 23:20:00 homer chat[241]: ^M
> Apr  2 23:20:00 homer chat[241]: Partenaire IStar Internet^M
> Apr  2 23:20:00 homer chat[241]: ^M
> Apr  2 23:20:00 homer last message repeated 2 times
> Apr  2 23:20:25 homer chat[241]: access2 login:
> Apr  2 23:20:25 homer chat[241]: alarm
> Apr  2 23:20:25 homer chat[241]: Failed
> 
> 
> 	As you can see from the ppp-up script, I use /etc/ppp/chatfile as
> my chat script, then give /etc/ppp/ppp-login as the file containing my user
> and pass for the +ua option (I'm not sure about the format of this file).
> Then I give the +pap option and the rest is pretty normal. It seems from
> the chat-error.log that everything works until it gets to the last line,
> then it fails. (I don't know what the "last message repeated 2 times"
> means.)

"last message.." means that the other side of the connection sent you a
few more carrage returns. Rather than print each message, if they are
the same, syslogd will compress them and say howmany times a message
is repeated.

> 	After running ppp-up, the modem dials, connects, and the DCD, OH,
> RTS, DTR and MR lights come on. After a few seconds, the RI light flashes
> once, and all the lights go off, except the HS and MR. That's when I get
> "Connect script failed" on the screen.
> 
> 	I'm almost there, and am determined to see this ppp thing through
> to the end, so please, any advice would be greatly appreciated.

Maybe get a chat script sample from your ISP. That way you can make sure
you end at the right point.

Take care,

Bill