AM335x 添加 HUAWEI MU609 Mini PCIe Module,并用pppd 启动相关设备
-
kernel 的配置
kernel 3.2.0
make menuconfig
Device Drivers --->
[*] USB support --->
<*> USB Serial Converter support --->
<*> USB driver for GSM and CDMA modems
kernel 3.2.0
make menuconfig
Device Drivers --->
[*] Network device support --->
// 将这里面所有的ppp 的支持多选上
USB Network Adapters --->
< > CDC Ethernet support (smart devices such as cable modems)
< > CDC EEM support
< > CDC NCM support
kernel 3.2.0
vim drivers/usb/serial/option.c
#define HUAWEI_PRODUCT_E353 0x1573
// 这个宏改为 0x1573
// 重新编译
// 将模块插好
-
buildroot 的配置
make menuconfig
Target packages --->
Networking applications --->
[*] pppd
[ ] filtering
[*] radius
-
pppd 启动脚本的配置
// 在文件系统的 /etc 目录下,创建 ppp 目录
// 在 /etc/ppp 目录下创建 peers 目录
# vim /etc/ppp/peers/gprs
#/etc/ppp/peers/gprs
# This is pppd script for China Mobile, used GPRS Module
# Usage: root>pppd call gprs
/dev/ttyUSB0
115200
nocrtscts
modem
#noauth
debug
#nodetach
#hide-password
usepeerdns
noipdefault
defaultroute
user "cmnet"
0.0.0.0:0.0.0.0
ipcp-accept-local
#ipcp-accept-remote
#lcp-echo-failure 12
#lcp-echo-interval 3
#noccp
#novj
#novjccomp
#persist
#connect '/usr/sbin/chat -s -v -f /etc/ppp/gprs-connect-chat'
connect '/usr/sbin/chat -v -s -f /etc/ppp/gprs-connect-chat'
#disconnect '/bin/chat -v -f /etc/ppp/gprs-disconnect-chat'
# vim etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
"cmnet" * "cmnet" *
# vim etc/ppp/gprs-connect-chat
#/etc/ppp/gprs-connect-chat
# chat script for China Mobile, used GPRS module.
TIMEOUT 15
ABORT "DELAYED"
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
ABORT "NO CARRIER"
TIMEOUT 40
'' AT
OK ATS0=0
OK ATE0V1
OK AT+CGDCONT=1,"IP","CMNET"
OK ATDT*99***1#
CONNECT ''
-
启动pppd 服务器
pppd call gprs &
-
查看启动后的网络文件节点
Read The Fucking Source Code