pppd error using cdma modem
I meet a problem using pppd, My CDMA module is WAVECOM Q2358C,and my dailing scripts as follows:
-----------------------------------------------------------------------------------------
#/etc/ppp/peers/cdma
# Most gprs phones don't reply to LCP echo's
lcp-echo-failure 0
lcp-echo-interval 0
# Keep pppd attached to the terminal:
# Comment this to get daemon mode pppd
nodetach
# Debug info from pppd:
# Comment this off, if you don't need more info
debug
#kdebug 7
# Show password in debug messages
show-password
# Connect script:
# scripts to initialize the GPRS modem and start the connection,
# wvdial command is for Orange SPV while other phones should work with #chat
connect /etc/ppp/peers/cdma-connect-chat
#connect "/usr/bin/wvdial --chat --config /etc/ppp/peers/cdma-wvdial.conf"
# Disconnect script:
# AT commands used to 'hangup' the GPRS connection.
disconnect /etc/ppp/peers/cdma-disconnect-chat
# Serial device to which the GPRS phone is connected:
# /dev/ttyS0 for serial port (COM1 in Windows),
/dev/ttyS0 # serial port 1
# Serial port line speed
# fast enough
115200
# Hardware flow control:
# Use hardware flow control with cable, Bluetooth and USB but not with IrDA.
#crtscts # serial cable, Bluetooth and USB, on some occations with IrDA #too
nocrtscts # IrDA
# Ignore carrier detect signal from the modem:
local
mtu 1600
mru 1600
# IP addresses:
# - accept peers idea of our local address and set address peer as 10.0.0.1
# (any address would do, since IPCP gives 0.0.0.0 to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else
#:10.0.0.0
# pppd must not propose any IP address to the peer!
noipdefault
# Accept peers idea of our local address
ipcp-accept-local
ipcp-accept-remote
# Add the ppp interface as default route to the IP routing table
#defaultroute
# Newer pppd's also support replacing the default route, if one is
# already present, when the GPRS connetion should be set as the default #route
# to the network
#replacedefaultroute
# DNS servers from the phone:
# some phones support this, some don't.
usepeerdns
# ppp compression:
# ppp compression may be used between the phone and the pppd, but the
# serial connection is usually not the bottleneck in GPRS, so the
# compression is useless (and with some phones need to disabled before
# the LCP negotiations succeed).
novj
nobsdcomp
novjccomp
#nopcomp
#noaccomp
nodeflate
# The phone is not required to authenticate:
noauth
# Username and password:
# If username and password are required by the APN, put here the username
# and put the username-password combination to the secrets file:
# /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP
# authentication. See pppd man pages for details.
# Example, Radiolinja operator pap-secrets:
# "rlnet" * "internet" *
user CARD
password "CARD"
# The persist tries to reopen the connection if it is dropped. This
# is usefull for example with a Nokia 7650 which only manages to
# 'dial' with every second attempt or when the network likes to drop the
# connection every now and then. It's not fun when the over-night
# 'apt-get dist-upgrade -d -y' fails constantly...
# The persist tries to reopen the connection if it is dropped. This
# is usefull for example with a Nokia 7650 which only manages to
# 'dial' with every second attempt or when the network likes to drop the
# connection every now and then. It's not fun when the over-night
# 'apt-get dist-upgrade -d -y' fails constantly...
persist
#maxfail 99
# Asyncmap:
# some phones may require this option.
asyncmap 0xa0000
#asyncmap 0
# No magic:
# some phones may require this option.
#nomagic
passive
# Require PAP authentication:
# some phones may require this option.
#require-pap
#require-chap
#logfile /mnt/ppp241/logg
-----------------------------------------------------------------------------------------
#/etc/ppp/peers/cdma-connect-cdma
#!/bin/sh
#
# The actual chat script:
exec /usr/sbin/chat \
TIMEOUT 1000 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
TIMEOUT 15 \
SAY "Press CTRL-C to close the connection at any stage!"
\
SAY "\ndefining PDP context...\n" \
OK ATH \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
TIMEOUT 15 \
SAY "Press CTRL-C to close the connection at any stage!"
\
SAY "\ndefining PDP context...\n" \
OK ATH \
OK 'AT+CGDCONT=1,"IP","unicom"' \
'' AT&D0
OK ATDT'#777' \
TIMEOUT 30 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"
------------------------------------------------------------------------------------------
After running #'pppd call cdma ', the resluts as follows:
[root@localhost peers]# pppd call cdma
Press CTRL-C to close the connection at any stage!
defining PDP context...
rAT
OK
Serial connection established.
using channel 17
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0xa0000> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0xa0000> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0xa0000> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <mru 1600> <asyncmap 0xa0000> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <mru 1600> <asyncmap 0xa0000> <pcomp> <accomp>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
IPCP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 "No network protocols running"]
rcvd [LCP TermReq id=0x2 "No network protocols running"]
sent [LCP TermAck id=0x2]
rcvd [LCP TermAck id=0x2]
Connection terminated.
Sending break to the modem
PDP context detached
Serial link disconnected.
--------------------------------------------------------------------------------------------
if I use pap authentication,that is replace the '#require-pap' with 'require-pap', the result is
[root@localhost peers]# pppd call cdma
Press CTRL-C to close the connection at any stage!
defining PDP context...
rAT
OK
Serial connection established.
using channel 19
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0xa0000> <auth pap> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0xa0000> <auth pap> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0xa0000> <auth pap> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <mru 1600> <asyncmap 0xa0000> <auth pap> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <mru 1600> <asyncmap 0xa0000> <auth pap> <pcomp> <accomp>]
sent [PAP AuthReq id=0x1 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x2 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x3 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x4 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x5 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x6 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x7 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x8 user="CARD" password="CARD"]
sent [PAP AuthReq id=0x9 user="CARD" password="CARD"]
sent [PAP AuthReq id=0xa user="CARD" password="CARD"]
sent [LCP TermReq id=0x2 "Authentication failed"]
rcvd [LCP TermReq id=0x2 "Authentication failed"]
sent [LCP TermAck id=0x2]
rcvd [LCP TermAck id=0x2]
Connection terminated.
Sending break to the modem
PDP context detached
Serial link disconnected.
---------------------------------------------------------------------------------------------
It seems that after the pppd program passing througn LCP, the modem
can't receive any acknowledge from the ISP, which is China Unicom,
the login number is '#777', both the login name and password are 'CARD'.
There should be some mistakes bur I am unable to find it out.
Eagerly Waiting for a response!
Thanks!
Regards
Xiaonian Liu
|