Board logo

标题: PPPD移植+CDMA拨号 [打印本页]

作者: m1_ljp    时间: 2013-3-15 13:55     标题: PPPD移植+CDMA拨号

PPPD-2.4.1移植
./configuer

make CC="arm-linux-gcc"

得到chat ,pppd,pppdump,pppstats,复制到板上



·拨号脚本(注意文件路径)

# /etc/ppp/pap-secrets
# Secrets for authentication using PAP
# client        server  secret                  IP addresses
####### redhat-config-network will overwrite this part!!! (begin) ##########
####### redhat-config-network will overwrite this part!!! (end) ############
card           *    card

# /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
####### redhat-config-network will overwrite this part!!! (begin) ##########
####### redhat-config-network will overwrite this part!!! (end) ############
card            *    card



# /etc/ppp/peers/unicom
# this is ppp script for use chinaunicom's CDMA data service
#
ttyS1
115200
crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/chat/unicom'
debug
nodetach
ipcp-accept-local
ipcp-accept-remote
defaultroute
user card

# /etc/ppp/peers/unicom
# this is ppp script for use chinaunicom's CDMA data service
#
ttyS1
115200
crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/chat/unicom'
debug
nodetach
ipcp-accept-local
ipcp-accept-remote
defaultroute
user card



很郁闷很郁闷。

http://blog.chinaunix.net/u/270/showart_227618.html参考文章。

本来很简单的过程,以前CDMA是联通的,但是我用的卡是189...哎...

chap-secrets和pap-secrets内容改下就行了。

就因为CDMA现在变成电信的了,浪费了我5天的时间...只能怪我太粗心了。。。

拨上完的信息:

[root@Qiu soft]# pppd call unicom &
[root@Qiu soft]# Serial connection established.
using channel 3
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS1
rcvd [LCP ConfReq id="0x1" <asyncmap 0x0> <auth chap MD5> <magic 0x94591900> <pcomp> <accomp>]
sent [LCP ConfReq id="0x1" <asyncmap 0x0> <magic 0xef7706ba> <pcomp> <accomp>]
sent [LCP ConfAck id="0x1" <asyncmap 0x0> <auth chap MD5> <magic 0x94591900> <pcomp> <accomp>]
rcvd [LCP ConfAck id="0x1" <asyncmap 0x0> <magic 0xef7706ba> <pcomp> <accomp>]
rcvd [CHAP Challenge id="0x1" <a76125222fa5f883cdf17a36a51fac491b7cc5cc753b5718e344>, name = ""]
sent [CHAP Response id="0x1" <c2ae53db87f6f888662ebf0953cd837e>, name = "card"]
rcvd [CHAP Success id="0x1" ""]
sent [IPCP ConfReq id="0x1" <addr 0.0.0.0> <compress VJ 0f 01>]
sent [CCP ConfReq id="0x1" <deflate 15> <deflate(old#) 15> <bsd v1 15>]
rcvd [IPCP ConfReq id="0x1" <compress VJ 0f 00> <addr 115.168.76.17>]
sent [IPCP ConfAck id="0x1" <compress VJ 0f 00> <addr 115.168.76.17>]
rcvd [CCP ConfReq id="0x1" < 12 06 00 00 00 01>]
sent [CCP ConfRej id="0x1" < 12 06 00 00 00 01>]
rcvd [IPCP ConfNak id="0x1" <addr 120.41.78.131>]
sent [IPCP ConfReq id="0x2" <addr 120.41.78.131> <compress VJ 0f 01>]
rcvd [CCP ConfRej id="0x1" <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [CCP ConfReq id="0x2"]
rcvd [CCP ConfReq id="0x2"]
sent [CCP ConfAck id="0x2"]
rcvd [IPCP ConfAck id="0x2" <addr 120.41.78.131> <compress VJ 0f 01>]
local  IP address 120.41.78.131
remote IP address 115.168.76.17
rcvd [CCP ConfAck id="0x2"]
rcvd [CCP TermReq id="0x3"]
CCP terminated by peer
sent [CCP TermAck id="0x3"]
Compression disabled by peer.



[root@Qiu soft]# ping 202.108.22.43   (baidu,没DNS,我没用到)
PING 202.108.22.43 (202.108.22.43): 56 data bytes
64 bytes from 202.108.22.43: seq="0" ttl="52" time="5264".398 ms
64 bytes from 202.108.22.43: seq="1" ttl="52" time="4365".162 ms
64 bytes from 202.108.22.43: seq="2" ttl="52" time="3485".195 ms
64 bytes from 202.108.22.43: seq="3" ttl="52" time="2585".206 ms
64 bytes from 202.108.22.43: seq="4" ttl="52" time="1665".183 ms
64 bytes from 202.108.22.43: seq="5" ttl="52" time="765".202 ms
64 bytes from 202.108.22.43: seq="6" ttl="52" time="605".222 ms
64 bytes from 202.108.22.43: seq="7" ttl="52" time="605".220 ms
64 bytes from 202.108.22.43: seq="8" ttl="52" time="625".222 ms
64 bytes from 202.108.22.43: seq="9" ttl="52" time="605".226 ms




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0