PPP works with manual connection, but not with chat script

PPP works with manual connection, but not with chat script

Post by Jay Kruemck » Sun, 05 Jan 1997 04:00:00



I have a problem getting pppd to connect to my ISP when I use a chat
script, but not if I dial the ISP using minicom and start pppd manually.

I am running (Slackware) Linux kernel 2.0.0 (with IP masqerade patches),
pppd version 2.2 on a 486 '66 with a no-name internal 28.8 modem.

The chat script negotiates the login sequence correctly, but pppd never
seems to be able to read data from the ISP. The command I am using is:

/usr/sbin/pppd debug kdebug 7 mru 1300 connect \
"/usr/sbin/chat -vf /etc/ppp/ISPDIALUP.chat" /dev/cua0 38400 \
crtscts modem defaultroute lock

The chat script looks like:
        ABORT   'BUSY'
        ABORT   'NO ANSWER'
        ABORT 'RINGING\r\n\r\nRINGING\r'
        ATZ             'OK-+++\c-OK'
        ATH0
        TIMEOUT         30
        OK              ATDT999-9999
        CONNECT         '\d \d'
        TIMEOUT         20
        username        zork
        password--password     xyzzy
        TIMEOUT         20
        keys:           '\d 11'

The "11" tells the ISP to start up a ppp connection.

The last part of the debug information (from /var/adm/debug) looks like:

Jan  4 09:14:25 dagger pppd[595]: sent [LCP ConfReq id=0x2 <mru 1300>
<asyncmap
0x0> <magic 0x11ebc68> <pcomp> <accomp>]
Jan  4 09:14:28 dagger kernel: ppp: write frame, count = 28
Jan  4 09:14:28 dagger kernel: FF 03 C0 21 01 02 00 18 ...!....
Jan  4 09:14:28 dagger kernel: 01 04 05 14 02 06 00 00 ........
Jan  4 09:14:28 dagger kernel: 00 00 05 06 01 1E BC 68 .......h
Jan  4 09:14:28 dagger kernel: 07 02 08 02             ....
Jan  4 09:14:28 dagger kernel: ppp_dev_xmit_lower: fcs is c3e2
Jan  4 09:14:28 dagger kernel: ppp_dev_xmit: writing 55 chars
Jan  4 09:14:28 dagger kernel: ppp_tty_read: called buf=0805a48e nr=1504
Jan  4 09:14:28 dagger kernel: ppp_tty_read: no data (EAGAIN)
Jan  4 09:14:28 dagger pppd[595]: sent [LCP ConfReq id=0x2 <mru 1300>
<asyncmap
0x0> <magic 0x11ebc68> <pcomp> <accomp>]
Jan  4 09:14:31 dagger kernel: ppp_tty_read: called buf=0805a48e nr=1504
Jan  4 09:14:31 dagger kernel: ppp_tty_read: no data (EAGAIN)
Jan  4 09:14:31 dagger kernel: ppp_tty_ioctl: get flags: addr bffffab0
flags f000010

It looks like the ppp_tty_read never seems to get any data inbound from
the
ISP yet I know that the ppp negotiation works ok if I dial the ISP using
minicom, and start up pppd without using a chat script.

I have tried using /dev/modem, /dev/cua0, varying the mru size, varying
the
connect speed, hacking the chat script but nothing seems to work. Can
anyone
shed some light on my problem?

        Thanks
------------------------------------------------------------------------
Jay Kruemcke

 
 
 

PPP works with manual connection, but not with chat script

Post by Mikkel L. Ellerts » Tue, 07 Jan 1997 04:00:00




Quote:>I have a problem getting pppd to connect to my ISP when I use a chat
>script, but not if I dial the ISP using minicom and start pppd manually.

>I am running (Slackware) Linux kernel 2.0.0 (with IP masqerade patches),
>pppd version 2.2 on a 486 '66 with a no-name internal 28.8 modem.

>The chat script negotiates the login sequence correctly, but pppd never
>seems to be able to read data from the ISP. The command I am using is:

>/usr/sbin/pppd debug kdebug 7 mru 1300 connect \
>"/usr/sbin/chat -vf /etc/ppp/ISPDIALUP.chat" /dev/cua0 38400 \
>crtscts modem defaultroute lock

>The chat script looks like:
>        ABORT   'BUSY'
>        ABORT   'NO ANSWER'
>        ABORT 'RINGING\r\n\r\nRINGING\r'
>        ATZ             'OK-+++\c-OK'
>        ATH0
>        TIMEOUT         30
>        OK              ATDT999-9999
>        CONNECT         '\d \d'
>        TIMEOUT         20
>        username        zork
>        password--password     xyzzy
>        TIMEOUT         20
>        keys:           '\d 11'

>The "11" tells the ISP to start up a ppp connection.

I can see a posible problem in your chat script - you should probably
change it slightly.

        ABORT   'BUSY'
        ABORT   'NO ANSWER'
        ABORT 'RINGING\r\n\r\nRINGING\r'
        ""               ATZ
        'OK-+++\c-OK'    ATH0
        TIMEOUT         30
        OK              ATDT999-9999
        CONNECT         '\d \d'
        TIMEOUT         20
        username        zork
        password--password     xyzzy
        TIMEOUT         20
        keys:           '\d 11'

The normal sequence in chat scripts is trigger, responce.  The "" means
don't wait for a trigger.  This way your modem will get reset properly.
I bet it takes a while before the modem starts dialing with your sctipt.

Another posible problem - do you run mgetty, getty_ps, or getty on
/dev/cua0 or /dev/ttyS0?  If so, do pppd and your getty program agree
on the name/location of the lock file?  The stock versions of pppd and
mgetty do not.  If that is the case, then the getty program will grab
all the output from the modem, and try processing it looking for an
incomming connection.  Not at all what you want.  I had this problem
with RedHat 4.0 and mgetty untill I changed mgetty to look in the right
place for it's lock file...

I hope this helps!

--