Ok my problem is that I cannot get chat to start up
the ppp link. The scripts dial in fine and it sends in
the password. After a few seconds the modem hangs up.
Note that if I dial in using minicom and manually
start ppppd eg pppd -detach /dev/ttyS1 & everything
works fine. The chat script never seems to even initiate
the ppp command at the other end after log-on which
leads me to believe that I am not logging in correctly.
I have double checked the prompts but the problem persists.
Any help would be greatly appreciated.
I am using kernel ver 2.0.25 with pppd 2.2
Here are my scripts:
/etc/ppp/ppp-on/dialer
-----------------------------------------------------------
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec /usr/sbin/chat -v \
TIMEOUT 10 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 30 \
OK ATDT$TELEPHONE \
CONNECT '' \
Annex '' \
login: $ACCOUNT \
assword: $PASSWORD \
>> ppp
-----------------------------------------------------------
/usr/sbin/ppp-on
#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command. However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=xxx-xxxx # The telephone number for the connection
ACCOUNT=login # The account name for logon (as in 'George Burns')
PASSWORD=pass # The password for this account (and 'Gracie Allen')
LOCAL_IP=0.0.0.0 # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0 # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in. Please use the absolute file name as the $PATH variable is not
# used on the connect option. (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
#
# I put most of the common options on this command. Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 38400 \
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
------------------------------------------------------------------------
<stuff deleted from log file>
Nov 26 19:15:29 scorpio chat[407]: send (ATH0^M)
Nov 26 19:15:30 scorpio chat[407]: timeout set to 30 seconds
Nov 26 19:15:30 scorpio chat[407]: expect (OK)
Nov 26 19:15:30 scorpio chat[407]: ^M
Nov 26 19:15:30 scorpio chat[407]: ATH0^M^M
Nov 26 19:15:30 scorpio chat[407]: OK -- got it
Nov 26 19:15:30 scorpio chat[407]: send (ATDTxxx-xxxx^M)
Nov 26 19:15:30 scorpio chat[407]: expect (CONNECT)
Nov 26 19:15:30 scorpio chat[407]: ^M
Nov 26 19:15:48 scorpio chat[407]: ATDTxxx-xxxx^M^M
Nov 26 19:15:48 scorpio chat[407]: CONNECT -- got it
Nov 26 19:15:48 scorpio chat[407]: send (^M)
Nov 26 19:15:48 scorpio chat[407]: expect (name:)
Nov 26 19:15:48 scorpio chat[407]: 9600^M
Nov 26 19:15:49 scorpio chat[407]: ^M
Nov 26 19:15:49 scorpio chat[407]: Annex Command Line Interpreter * Copyright (C) 1988, 1996 Xylogics, Inc.^M
Nov 26 19:15:49 scorpio chat[407]: ^M
Nov 26 19:15:49 scorpio chat[407]: Checking authorization, Please wait...^M
Nov 26 19:15:49 scorpio chat[407]: Annex username: -- got it
Nov 26 19:15:49 scorpio chat[407]: send (name^M)
Nov 26 19:15:49 scorpio chat[407]: expect (assword:)
Nov 26 19:15:49 scorpio chat[407]: name^M
Nov 26 19:15:49 scorpio chat[407]: Annex password: -- got it
Nov 26 19:15:49 scorpio chat[407]: send (pass^M)
Nov 26 19:15:50 scorpio pppd[404]: Serial connection established.
Nov 26 19:15:50 scorpio chat[407]: expect ( )
Nov 26 19:15:50 scorpio chat[407]: -- got it
Nov 26 19:15:51 scorpio pppd[404]: Using interface ppp0
Nov 26 19:15:51 scorpio pppd[404]: Connect: ppp0 <--> /dev/ttyS1
Nov 26 19:16:21 scorpio pppd[404]: Connection terminated.
Nov 26 19:16:21 scorpio pppd[404]: Exit.
---------------------------------------------------------------------------