原创 PPPD移植+CDMA拨号

2009-8-5 17:47 9597 7 8 分类: MCU/ 嵌入式

·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


 

PARTNER CONTENT

文章评论1条评论)

登录后参与讨论

用户186932 2010-4-5 20:21

请教您个问题可以吗? 我可以将两台机器直接连起来用pppd拨号建立他们的 ppp连接吗??? 我是一台linux下pppd服务器,另一台在xp下,用串口连接起来,在xp下拨号另一台。。。 请问可以吗?
相关推荐阅读
用户1679196 2009-09-04 16:17
两个linux按键驱动之二 read(定时器去抖动)
//相比之下poll更为实用,但是这个代码实在太具有代表性了...涉及了下面几个知识。代码很大部分是linux设备驱动开发详解的内容。/*1、阻塞读取,队列概念2、睡眠等待中断产生3、定时器产生及相应...
用户1679196 2009-09-04 16:08
两个linux按键驱动之一 poll(未去抖动)
//驱动//未加去抖动//通过poll判断是否可读来得到中断值#include <linux/module.h> #include <linux/kernel.h>#inclu...
用户1679196 2009-09-04 09:39
select 使用
以下来自网络搜索:Linux下select调用的过程:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:offi...
用户1679196 2009-09-03 14:52
Linux设备驱动之定时器
Linux内核中定义了一个timer_list结构,我们在驱动程序中可以利用之: #include<linux/timer.h> struct timer_list { struct li...
用户1679196 2009-08-28 17:38
loff_t *ppos是什么东东
ssize_t generic_file_read(struct file * filp, char * buf, size_t count, loff_t *ppos) 这是一个文件读函数 我们很容...
用户1679196 2009-08-12 17:30
linux 延时函数几个资料
http://www.cppblog.com/CppExplore/archive/2008/04/02/46111.html一、 基础知识1、时间类型。Linux下常用的时间类型有4个:time_t...
EE直播间
更多
我要评论
1
7
关闭 站长推荐上一条 /3 下一条