在ARM+LINUX上使用pppd拔号上网(GPRS)流程
busybox的命令帮助页面有这样一段话:
引用:
LIBC NSS
When used with glibc, the BusyBox networking applets will similarly require that you install at least some of the glibc NSS stuff (in particular, /etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, and /lib/libresolv*).
于是把arm-linux工具链的lib目录下的 libnss_dns* , libnss_files* , libresolv* 拷贝到ARM目标板的/lib下。可以ping域名啦
/etc/ppp # ping www.163.com
PING www.163.com (221.204.240.161): 56 data bytes
64 bytes from 221.204.240.161: seq=0 ttl=46 time=641.269 ms
64 bytes from 221.204.240.161: seq=1 ttl=46 time=435.801 ms
64 bytes from 221.204.240.161: seq=2 ttl=46 time=446.776 ms
64 bytes from 221.204.240.161: seq=3 ttl=46 time=381.381 ms
64 bytes from 221.204.240.161: seq=4 ttl=46 time=468.495 ms
--- www.163.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 381.381/474.744/641.269 ms
3) 如何实现拔号与中国联通的3G 联网?
换用TELIT公司的UC864-E, 使用USB连接方式。指定串口为ttyUSB0
对于ppp方面,只需要更改4个脚本中的少量内容
a. 更改options脚本
把gprsoptions更名为g3options, 把里面的这一行参数/dev/ttyS4 更改为/dev/ttyUSB0,
把connect /etc/ppp/chat -s -v -f /etc/ppp/gprs-connect-chat
更改为connect /etc/ppp/chat -s -v -f/etc/ppp/g3-connect-chat
b. 更改chat脚本
TIMEOUT 15
ABORT \nBUSY\r
ABORT \nNO ANSWER\r
ABORT \nRINGING\r\n\r\nRINGING\r
# AT
#OK-+++\c-OK ATH0
TIMEOUT 40
\rAT
OK AT+FLO=0
OK ATS0=0
OK ATE0V1
OK AT+CGDCONT=1,"IP","UNINET"#UNINET是代表中国联通网的意思
#OK AT+CGDCONT=1,"IP","CMNET"
OK ATDT*99*1#
CONNECT
c. 更改pap-secrets
# Secrets for authentication using PAP
# client server secret IP addresses
#cmnet * cmnet * #如果是中国移动GPRS就用cmnet
uninet * uninet * #如果是中国联通3G就用uninet
d. 更改chap-secrets
同上pap-secrets
ARMLINUXpppd拔号上 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)