Dear All
I am having dificulty connecting to my ISP. Iam using Redhat 5.1 2.2.2
with a Hayes Accura 56k Speakerphone (it's not been upgraded to V90). I
have followed the PPP How To to the stage where I can :
i) Dial out using minicom, login and then quit without resetting the
modem.
ii) Start pppd with "pppd �d �detach /dev/ttyS0 38400 &"
iii) Ping various servers, use my browser etc as per usual.
However, when I then try and automate this process using the following
ppp-on and ppp-on-dialer scripts:
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=9,333333# The telephone number for the connection
ACCOUNT=my_acc # The account name for logon (as in 'George Burns')
PASSWORD=my_pwd # 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 /dev/ttyS0 38400 \
$LOCAL_IP:$REMOTE_IP \
connect $DIALER_SCRIPT
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 3 \
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 '' \
ogin:--ogin: $ACCOUNT \
assword: $PASSWORD
the following occurs:
i) Modem dials out.
ii) As soon as the modem at the other end answers the connection is
broken (by which end I don't know)
The message log is as follows:
Apr 27 14:23:37 testserver pppd[418]: pppd 2.3.3 started by root, uid 0
Apr 27 14:23:39 testserver chat[419]: timeout set to 3 seconds
Apr 27 14:23:39 testserver chat[419]: abort on (\nBUSY\r)
Apr 27 14:23:39 testserver chat[419]: abort on (\nNO ANSWER\r)
Apr 27 14:23:39 testserver chat[419]: abort on
(\nRINGING\r\n\r\nRINGING\r)
Apr 27 14:23:39 testserver chat[419]: send (rAT^M)
Apr 27 14:23:39 testserver chat[419]: expect (OK)
Apr 27 14:23:39 testserver chat[419]: rAT^M^M
Apr 27 14:23:39 testserver chat[419]: OK
Apr 27 14:23:39 testserver chat[419]: -- got it
Apr 27 14:23:39 testserver chat[419]: send (ATH0^M)
Apr 27 14:23:39 testserver chat[419]: timeout set to 30 seconds
Apr 27 14:23:39 testserver chat[419]: expect (OK)
Apr 27 14:23:39 testserver chat[419]: ^M
Apr 27 14:23:39 testserver chat[419]: ATH0^M^M
Apr 27 14:23:39 testserver chat[419]: OK
Apr 27 14:23:39 testserver chat[419]: -- got it
Apr 27 14:23:39 testserver chat[419]: send (ATDT9,333333^M)
Apr 27 14:23:39 testserver chat[419]: expect (CONNECT)
Apr 27 14:23:39 testserver chat[419]: ^M
Apr 27 14:24:09 testserver chat[419]: alarm
Apr 27 14:24:09 testserver pppd[418]: Connect script failed
Apr 27 14:24:09 testserver chat[419]: Failed
Apr 27 14:24:10 testserver pppd[418]: Exit.
It occurred to me that the set up string minicom was using (at s7=45 s0=0
l1 v1 x4 &c1 e1 q0 &s0)was different to the factory default so tried :
i) just initialising the modem from minicom and then running ppp-on � no
joy. Not sure if chat's ATH0 resets modem.
ii) I also tried issuing the ATZ command in minicom and then dialing in
manually, logging on etc. This all works fine.
This leads me to suspect its not a modem setting problem(???)
Can anyone help? Has anyone else had this problem? Could anyone suggest
how to further isolate the cause of this? I apologise if I've included
too much info.
Many thanks in advance.
Paul