Any PPP/chat gurus out there ?

Any PPP/chat gurus out there ?

Post by sbala.. » Thu, 28 Nov 1996 04:00:00



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.
------------------------------------------------------------------------------

 
 
 

Any PPP/chat gurus out there ?

Post by B.A.McCau.. » Fri, 29 Nov 1996 04:00:00


You don't need any PPP/chat gurus!

Quote:>#!/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

">>" is a shell meta character, you must quote it.

--

 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ | http://wcl-l.bham.ac.uk/~bam/


 
 
 

1. PPP/CHAT: chat won't chat with modem, why?

I've been trying to get a dynamic IP connection to work via ppp, and I
think I've narrowed the problem down to the chat program.  chat
doesn't seem to be getting any responses from the modem.  I've been
trying to figure out what's going on by running chat from the command
line (can this work?), but no luck.  For example,


gives the following error messages:

Mar  9 11:43:49 rezkbox chat[1285]: timeout set to 3 seconds
Mar  9 11:43:49 rezkbox chat[1285]: send (^MAT^M^M)
Mar  9 11:43:49 rezkbox chat[1285]: expect (OK)
Mar  9 11:43:52 rezkbox chat[1285]: alarm
Mar  9 11:43:52 rezkbox chat[1285]: send (+++)
Mar  9 11:43:52 rezkbox chat[1285]: expect (OK)
Mar  9 11:43:55 rezkbox chat[1285]: alarm
Mar  9 11:43:55 rezkbox chat[1285]: Failed

I really don't know what's going on.  I'm also a bit confused about
the chat program; it's supposed to communicate with the modem, but how
does it even know which serial port the modem is on?

Any ideas?

-- Charles Rezk

2. System Admin./ Career Position/ Excellent Opp/ ILL

3. ppp in chat mode, how to debug chat script

4. is it true ?

5. PPP/Chat: Working chat script Linux==>SCO?

6. ps2 mouse, I know...

7. Netra ppp chat modem-chat

8. Are we hitting a NIS limit?

9. PPP: Modified chat for two chat scripts

10. named configuartion in a ppp setup - time outs

11. Can't Get PPP Working - Chat (ppp-on) script won't dial

12. Can't ppp w/ courier, can chat, can ppp w/ slow modem

13. w.r.t. ppp(d)/chat what does "ppp:frame with bad fcs, excess=6f6a" mean?