HELP with Modem initial.: Modem stops cooperating with ppp

HELP with Modem initial.: Modem stops cooperating with ppp

Post by Markus Kohl » Wed, 26 Feb 1997 04:00:00



Hi!

I have some rather strange situation and I cannot find any bug. My
ppp-script starts to run and initializes the modem (ATZ). The first
time usually everything works fine! The second, third, forth ... time
sometimes it works, sometimes not (I have not found any
rule). Sometimes you still here the modem click of the initialization,
sometimes not. Mostly after having sent the ATZ, the modem does not
reply with the OK-answer, so Linux keeps expecting OK (expect(OK))
until the timeout occurs, which sets an alarm. Sometimes the expected
OK occurs and pppd sends the dial string waiting for the next reply of
the modem and* up than. And sometimes the modem really starts
to dial. I used the AT%TCB command to prevent the modem from delaying
the dial. And I tried several timeouts from 10 to 500000 sec.

Who on earth is controlling this "sometimes-modem"? Anyone who had this
effect or knows the answer, please let me know. I suppose, it is a
problem of modem initialization.

In the following I put the options and ppp.chat/ppp-script and the
messages-logfile.


Thanks for all the help

Markus

-------------- The error messages of /var/log/messages (some examples) -------

Here the script even sent the dial string and the modem echoed the
dial string but it did not dial - so there was no CONNECT and a
timeout occured -> alarm:

Feb 25 00:41:27 nelson pppd[1897]: pppd 2.2.0 started by markus, uid 500
Feb 25 00:41:28 nelson chat[1899]: abort on (NO CARRIER)
Feb 25 00:41:28 nelson chat[1899]: abort on (BUSY)
Feb 25 00:41:28 nelson chat[1899]: abort on (NO DIALTONE)
Feb 25 00:41:28 nelson chat[1899]: abort on (ERROR)
Feb 25 00:41:28 nelson chat[1899]: send (+++ATZ^M)
Feb 25 00:41:29 nelson chat[1899]: timeout set to 10 seconds
Feb 25 00:41:29 nelson chat[1899]: expect (OK)
Feb 25 00:41:30 nelson chat[1899]: +++ATZ^M^M
Feb 25 00:41:30 nelson chat[1899]: OK -- got it
Feb 25 00:41:30 nelson chat[1899]: send (AT%TCBDT<telephone number>^M)
Feb 25 00:41:31 nelson chat[1899]: expect (CONNECT)
Feb 25 00:41:31 nelson chat[1899]: ^M
Feb 25 00:41:41 nelson chat[1899]: AT%TCBDT<telephone number>^M
Feb 25 00:41:41 nelson chat[1899]: alarm
Feb 25 00:41:41 nelson chat[1899]: Failed
Feb 25 00:41:41 nelson pppd[1897]: Connect script failed
Feb 25 00:41:41 nelson pppd[1897]: Exit.

Here the script failed by timeout expecting OK after initialization (ATZ):

Feb 25 00:44:24 nelson pppd[1941]: pppd 2.2.0 started by markus, uid 500
Feb 25 00:44:25 nelson chat[1943]: abort on (NO CARRIER)
Feb 25 00:44:25 nelson chat[1943]: abort on (BUSY)
Feb 25 00:44:25 nelson chat[1943]: abort on (NO DIALTONE)
Feb 25 00:44:25 nelson chat[1943]: abort on (ERROR)
Feb 25 00:44:25 nelson chat[1943]: send (+++ATZ^M)
Feb 25 00:44:26 nelson chat[1943]: timeout set to 45 seconds
Feb 25 00:44:26 nelson chat[1943]: expect (OK)
Feb 25 00:45:11 nelson chat[1943]: +++ATZ^M
Feb 25 00:45:11 nelson chat[1943]: alarm
Feb 25 00:45:11 nelson chat[1943]: Failed
Feb 25 00:45:11 nelson pppd[1941]: Connect script failed
Feb 25 00:45:11 nelson pppd[1941]: Exit.
Feb 25 00:45:30 nelson syslog: Warning - secret file /etc/ppp/pap-secrets has world and/or group access

Here it worked perfectly:

Feb 25 00:45:31 nelson pppd[1953]: pppd 2.2.0 started by markus, uid 500
Feb 25 00:45:32 nelson chat[1955]: abort on (NO CARRIER)
Feb 25 00:45:32 nelson chat[1955]: abort on (BUSY)
Feb 25 00:45:32 nelson chat[1955]: abort on (NO DIALTONE)
Feb 25 00:45:32 nelson chat[1955]: abort on (ERROR)
Feb 25 00:45:32 nelson chat[1955]: send (+++ATZ^M)
Feb 25 00:45:32 nelson chat[1955]: timeout set to 45 seconds
Feb 25 00:45:32 nelson chat[1955]: expect (OK)
Feb 25 00:45:34 nelson chat[1955]: +++ATZ^M^M
Feb 25 00:45:34 nelson chat[1955]: OK -- got it
Feb 25 00:45:34 nelson chat[1955]: send (AT%TCBDT<telephone number>^M)
Feb 25 00:45:34 nelson chat[1955]: expect (CONNECT)
Feb 25 00:45:34 nelson chat[1955]: ^M
Feb 25 00:46:01 nelson chat[1955]: AT%TCBDT<telephone number>^M^M
Feb 25 00:46:01 nelson chat[1955]: CONNECT -- got it
Feb 25 00:46:01 nelson chat[1955]: send (^M)
Feb 25 00:46:02 nelson chat[1955]: expect (ogin:)
Feb 25 00:46:02 nelson chat[1955]:  115200/REL^M
Feb 25 00:46:04 nelson chat[1955]: ^M

etc.

--------------------------- my /etc/ppp/options-file -----------------
# /etc/ppp/options (NO PAP/CHAP)
#
# Prevent pppd from forking into the background
# Kommentiert man diese Option aus, dann geht ppp-uni in den
# Hintergrund, ansonsten kann man es z.B. mit Ctrl-C abbrechen.
-detach
# If you are using a STATIC IP number, edit the 0.0.0.0 part of the
# following line to your static IP number. Hier Ihre Adresse eintragen.
129.217.63.xxx:
#
# use the modem control lines
modem
# use uucp style locks to ensure exclusive access to the serial device
lock
# use hardware flow control
crtscts
# create a default route for this connection in the routing table
defaultroute
# do NOT set up any "escaped" control sequences
asyncmap 0
# use a maximum transmission packet size of 552 bytes
mtu 1500
# use a maximum receive packet size of 552 bytes
mru 1500
# Add a default route to the system routing tables, using the peer as
# the gateway, when IPCP negotiation is successfully completed.  This
# entry is removed when the PPP connection is broken.
defaultroute
#
#-------END OF SAMPLE /etc/ppp/options (no PAP/CHAP)

----------- my /etc/ppp/ppp.chat script ----------------
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
/usr/sbin/chat -v                \
        ABORT "NO CARRIER"       \
        ABORT BUSY               \
        ABORT "NO DIALTONE"      \
        ABORT ERROR              \
        "" +++ATZ                \
        TIMEOUT 45               \
        OK AT%TCBDT$TELEPHONE    \
        CONNECT ""               \
        ogin:--ogin: \\q$ACCOUNT \
        assword: $PASSWORD

------------- my /etc/ppp/ppp script --------------
#!/bin/sh
#
# /etc/ppp/ppp-up
#
# Aufbau einer PPP Verbindung
#
#
# 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=<telephone number>
# Vermutlich haben Sie den Account Pmueller oder mueller oder so?
ACCOUNT=Mueller
PASSWORD=<Ihr Passwort>
# Ihre Rechnernummer:
LOCAL_IP=129.217.63.xxx # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=129.217.4.51  # Remote IP address if desired. Normally 0.0.0.0
#
DEVICE=/dev/modem
#
SPEED="115200"
#
# Export them so that they will be available to 'ppp-on-dialer'
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.chat
DEBUG=debug
#
# Check, whether modem locked
#
if [ -f /var/lock/LCK..modem ]; then
    echo Modem locked -- please wait
elif [ -f /var/run/ppp0.pid ]; then
    echo PPP line still occupied -- please wait
else
    #
    # Initiate the connection
    #
    if [ -z "$1" ]; then
        echo nix drin in $1
        exec /usr/sbin/pppd $DEBUG $DEVICE $SPEED \
            $LOCAL_IP:$REMOTE_IP \
            connect $DIALER_SCRIPT
    else
        echo in param1 steht: $1
        exec /usr/sbin/pppd $DEBUG $DEVICE $SPEED \
            $LOCAL_IP:$REMOTE_IP \
            connect $DIALER_SCRIPT ipparam $1
    fi
fi

 
 
 

1. HELP! Linux/PPP Stopped Recognizing Modem!

I just installed OSS to get some sort of MIDI support for my sound driver
(AWE64), and I've run into a problem. The sound works fine now, but pppd
won't recognize my modem. I keep getting told, essentially, that it can't
open the modem device. I did recompile the kernel, but I didn't change
anything: everything relating to networking is still there.

My modem is a Maxtech 56K modem, which I had running flawlessly via the use
of isapnptools. But even though I've poured over isapnp.conf, and it seems
to work fine, nothing changes. Anyone have any suggestions of what I may
have overlooked?

-----

 "You don't look different              |   |||__|||       |||__|||
  But you have changed                  |    \/  \/         \/  \/
  I'm looking through you               |    (2500)         (BPOR)
  You're not the same!"                 |     \__/           \__/  
   - Beatles, "I'm Looking Through You" |
                                        |  2500 posts ~ Post of Reason
 ALL UNSOLICITED E-MAILERS WILL BE SHOT |  to alt.games.final-fantasy!

2. LI04040404... or LI ?

3. modem wont cooperate

4. kernel: hda: irq timeout

5. Querying modem-to-modem speed of PPP connection.

6. Can't get Dell PS2 mouse to work

7. Cable modem..56 modem dial up, 500K cable modem download stream...

8. Q: what/where is "X includes"

9. Modems, modems, modems

10. Modem, modem, modem, ... setup

11. modems modems modems

12. Modem, modem, modem

13. Where to find Kermit, X-Modem, Y-Modem, & Z-Modem Source