ppp拨号上网
来源:互联网 发布:手机系统数据怎么清理 编辑:程序博客网 时间:2024/04/29 07:54
1:编译工具:arm-elf-gcc -v gcc version 2.95.3
开发版 : 杭州立宇泰公司的 armsys44b0
2: 编译内核使支持ppp
make menuconfig
network device support
ppp support
ppp multilink support
ppp support for async serial ports
ppp support for sync tty ports
ppp deflate compression
ppp BSD_compress compression
ppp over Ethernet
SLIP(serial line )support
CSLIP compressed headers
3:编译拨号工具pppd chat,选择:
network application
pppd
rp-pppoe
miscellanenous application
chat
4: 建立设备节点
ppp,c,108,0
5: 创建resolv.conf文件,配置dns(可以不设,在/etc/ppp/options 选项中使用 usepeerdns )
/etc/ppp/resolv.conf
nameserver 211.136.20.203
nameserver 211.136.17.107
6:创建拨号脚本(脚本在redhat9下成功拨号移植到开发板上去的)
/bin : ppp-on
ppp-off
/etc/ppp:
pap-secrets
chap-secrets
options
如果想要在开发板察看调试信息,那么将syslogd 编译进内核。进入uclinux后,可以在/var/log/messages处察看调试信息。
另外,以下是我总结出的一些容易出错的LOG信息。
“Lcp : timeout sending config-requests”
这种情况一般是没有连接上server,所以出错的情况有很多种,比如拨的号码填写错误,串口,波特率是否正确 等
“authentication 相关的”
在rh9的下,默认是“auth”,所以,认证用户名,密码都不能为空
(貌似cdma采用的是chap认证方式,gprs采用的是pap认证方式 )
“lcp terminated by peer”
一般情况下是认证失败导致的,检查options ,pap-secrets,chap-secrets等文件
“connect scripts failed”
这样的错误,一般是由connect 选项引起的,检查你的脚本路径,串口,波特率是否正确。
还有一种错误信息是在chat 会话中出现的 比如
sending( )
expected ()
alarm
这样的情况得检查chat 会话。
最后一种情况 : “Serial line is looped back.“
如果你遇到这种情况,那就证明你运气实在太好了 - -! ,要解决这个问题,可以检查串口驱动,串口的连接.另外,在chat会话后加上"~",也许是你解决问题的办法.
-mn no magic
或者改波特率,有的moden对波特率有特别的限制。
总之,拨号前一定要明白ppp实现原理,所以,ppp-howto,FAQ是必须得看得,我想,如果你真的看懂了howto,FAQ,那么,拨号就是一件很简单的事了.
附:脚本
==============================================================================
#ppp-on 脚本
#!/bin/sh
TELEPHONE=*99***1#
LOCAL_IP=0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
exec /bin/pppd debug lock modem nocrtscts /dev/ttyS1 9600 /
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP /
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
=============================================================================
#ppp-on-dialer
#!/bin/sh
exec /bin/chat -v/
TIMEOUT3/
ABORT'/nBUSY/r'/
ABORT'/nNO ANSWER/r'/
ABORT'/nRINGING/r/n/r/nRINGING/r'/
''/rAT/
'OK-+++/c-OK'ATH0/
TIMEOUT30/
OKATDT*99***1#/
CONNECT''/
============================================================================
# options
/dev/ttyS1
9600
debug
kdebug 7
nocrtscts
modem
auth
-chap
noipdefault
defaultroute
user john_doe
lock
===========================================================================
#pap-secrets
# Secrets for authentication using PAP
# clientserversecretIP addresses
john_doe * "" *
==========================================================================
#chap-secrets
# Secrets for authentication using CHAP
# clientserversecretIP addresses
==========================================================================
开发版 : 杭州立宇泰公司的 armsys44b0
2: 编译内核使支持ppp
make menuconfig
network device support
ppp support
ppp multilink support
ppp support for async serial ports
ppp support for sync tty ports
ppp deflate compression
ppp BSD_compress compression
ppp over Ethernet
SLIP(serial line )support
CSLIP compressed headers
3:编译拨号工具pppd chat,选择:
network application
pppd
rp-pppoe
miscellanenous application
chat
4: 建立设备节点
ppp,c,108,0
5: 创建resolv.conf文件,配置dns(可以不设,在/etc/ppp/options 选项中使用 usepeerdns )
/etc/ppp/resolv.conf
nameserver 211.136.20.203
nameserver 211.136.17.107
6:创建拨号脚本(脚本在redhat9下成功拨号移植到开发板上去的)
/bin : ppp-on
ppp-off
/etc/ppp:
pap-secrets
chap-secrets
options
如果想要在开发板察看调试信息,那么将syslogd 编译进内核。进入uclinux后,可以在/var/log/messages处察看调试信息。
另外,以下是我总结出的一些容易出错的LOG信息。
“Lcp : timeout sending config-requests”
这种情况一般是没有连接上server,所以出错的情况有很多种,比如拨的号码填写错误,串口,波特率是否正确 等
“authentication 相关的”
在rh9的下,默认是“auth”,所以,认证用户名,密码都不能为空
(貌似cdma采用的是chap认证方式,gprs采用的是pap认证方式 )
“lcp terminated by peer”
一般情况下是认证失败导致的,检查options ,pap-secrets,chap-secrets等文件
“connect scripts failed”
这样的错误,一般是由connect 选项引起的,检查你的脚本路径,串口,波特率是否正确。
还有一种错误信息是在chat 会话中出现的 比如
sending( )
expected ()
alarm
这样的情况得检查chat 会话。
最后一种情况 : “Serial line is looped back.“
如果你遇到这种情况,那就证明你运气实在太好了 - -! ,要解决这个问题,可以检查串口驱动,串口的连接.另外,在chat会话后加上"~",也许是你解决问题的办法.
-mn no magic
或者改波特率,有的moden对波特率有特别的限制。
总之,拨号前一定要明白ppp实现原理,所以,ppp-howto,FAQ是必须得看得,我想,如果你真的看懂了howto,FAQ,那么,拨号就是一件很简单的事了.
附:脚本
==============================================================================
#ppp-on 脚本
#!/bin/sh
TELEPHONE=*99***1#
LOCAL_IP=0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
exec /bin/pppd debug lock modem nocrtscts /dev/ttyS1 9600 /
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP /
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
=============================================================================
#ppp-on-dialer
#!/bin/sh
exec /bin/chat -v/
TIMEOUT3/
ABORT'/nBUSY/r'/
ABORT'/nNO ANSWER/r'/
ABORT'/nRINGING/r/n/r/nRINGING/r'/
''/rAT/
'OK-+++/c-OK'ATH0/
TIMEOUT30/
OKATDT*99***1#/
CONNECT''/
============================================================================
# options
/dev/ttyS1
9600
debug
kdebug 7
nocrtscts
modem
auth
-chap
noipdefault
defaultroute
user john_doe
lock
===========================================================================
#pap-secrets
# Secrets for authentication using PAP
# clientserversecretIP addresses
john_doe * "" *
==========================================================================
#chap-secrets
# Secrets for authentication using CHAP
# clientserversecretIP addresses
==========================================================================
- ppp拨号上网
- linux PPP拨号上网
- ppp拨号上网(1)
- ppp拨号上网(2)
- 【原创】ppp拨号上网总结
- sim900GPRS模块ppp拨号上网
- SIM5360E模块ppp拨号上网
- Linux下PPP拨号上网设置
- 使用wvdial启动ppp协议拨号上网
- linux下ppp拨号上网
- 嵌入式linux移植ppp拨号上网脚本
- 使用wvdial启动ppp协议拨号上网
- gprs模块在linux下ppp拨号上网
- Linux系统下通过PPP拨号上网
- sim900芯片—GPRS模块ppp拨号上网
- sim900芯片—GPRS模块ppp拨号上网
- linux gprs模块 sim900芯片 ppp拨号上网
- linux下GPRS模块ppp拨号上网
- About Java
- 网站各个模块价格!
- 五个小故事:宽容/靠自己/鲨鱼与鱼/神迹/钓竿
- 垃圾收集趣史(转)
- 一次编辑 GridView 的所有行[转自:孟子E章]
- ppp拨号上网
- ORACLE表空间的相关操作
- 计算utf8下的字节数
- 网站套餐
- 西门子笔试[2006.11.23]
- 河南地区人才网大扫描
- 雅虎公司C#笔试题
- ORACLE恢复方案
- C语言中可变参数的用法