____________________________________
| |
| 开发板 s3c2410 |
| 开发主机 VMware ubuntu10.10 |
| 移植内核 linux-2.6.22.6 |
| 3G模块 中兴 MG3732 |
| SIM卡 联通3G |
| pppd ppp-2.4.4 |
|____________________________________|
内核配置:
-> Device Drivers
x -> USB support
x -> USB Serial Converter support
x -> USB Serial Converter support (USB_SERIAL [=y])
-> Device Drivers
x -> Network device support
x -> Network device support (NETDEVICES [=y])
<*> PPP (point-to-point protocol) support
[*] PPP multilink support (EXPERIMENTAL)
[*] PPP filtering
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
<*> PPP Deflate compression
<*> PPP BSD-Compress compression
<*> PPP MPPE compression (encryption) (EXPERIMENTAL)
<*> PPP over Ethernet (EXPERIMENTAL)
PS:该配置仅为支持pppd拨号上网的配置,开发板其他驱动另需配置
让内核识别MG3732:(不同3G模块添加的数据不一样,具体咨询模块公司,当是方法是一致的)
在/driver/usb/serial/ 下的option.c
添加pid,vid 如下:
{ USB_DEVICE(0x19d2, 0xffff) },
{ USB_DEVICE(0x19d2, 0xfffe) },
{ USB_DEVICE(0x19d2, 0xfffd) },
{ USB_DEVICE(0x19d2, 0xfffc) },
{ USB_DEVICE(0x19d2, 0xfffb) },
{ USB_DEVICE(0x19d2, 0xfff1) },
{ USB_DEVICE(0x19d2, 0xfff6) },
{ USB_DEVICE(0x19d2, 0xfff7) },
{ USB_DEVICE(0x19d2, 0xfff8) },
{ USB_DEVICE(0x19d2, 0xfff9) },
{ USB_DEVICE(0x19d2, 0xffee) },
{ USB_DEVICE(0x19d2, 0xffed) },
{ USB_DEVICE(0x19d2, 0xffeb) },
{ USB_DEVICE(0x19d2, 0xffec) },
当驱动加载成功后,且插入3G模块,在/dev/目录下可以看到几个ttyUSB0,ttyUSB1等的字符设备文件.
pppd:
下载地址:http://www.linuxfromscratch.org/blfs/view/6.3/basicnet/ppp.html
解压 ppp-2.4.4.tar.gz
执行脚本产生Makefile等文件:./configure
用开发板的交叉编译工具链编译: make CC=arm-linux-gnu-gcc (工具链需要在/etc/bin目录下存在)
将ppp-2.4.4/chat/chat ppp-2.4.4/pppd/pppd 复制到开发板文件系统/usr/sbin
脚本:
在开发板文件系统里建立/etc/ppp/peers文件夹,下面所创建出的脚本都存放在该路径
创建拨号选项脚本: vi wcdma
1 noauth
2 debug
3 connect '/usr/sbin/chat -v -f /etc/ppp/peers/wcdma-chat-connect'
4 /dev/ttyUSB3
5 115200
6 defaultroute
7 noipdefault
8 novj
9 novjccomp
| |
| 开发板 s3c2410 |
| 开发主机 VMware ubuntu10.10 |
| 移植内核 linux-2.6.22.6 |
| 3G模块 中兴 MG3732 |
| SIM卡 联通3G |
| pppd ppp-2.4.4 |
|____________________________________|
内核配置:
-> Device Drivers
x -> USB support
x -> USB Serial Converter support
x -> USB Serial Converter support (USB_SERIAL [=y])
-> Device Drivers
x -> Network device support
x -> Network device support (NETDEVICES [=y])
<*> PPP (point-to-point protocol) support
[*] PPP multilink support (EXPERIMENTAL)
[*] PPP filtering
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
<*> PPP Deflate compression
<*> PPP BSD-Compress compression
<*> PPP MPPE compression (encryption) (EXPERIMENTAL)
<*> PPP over Ethernet (EXPERIMENTAL)
PS:该配置仅为支持pppd拨号上网的配置,开发板其他驱动另需配置
让内核识别MG3732:(不同3G模块添加的数据不一样,具体咨询模块公司,当是方法是一致的)
在/driver/usb/serial/ 下的option.c
添加pid,vid 如下:
{ USB_DEVICE(0x19d2, 0xffff) },
{ USB_DEVICE(0x19d2, 0xfffe) },
{ USB_DEVICE(0x19d2, 0xfffd) },
{ USB_DEVICE(0x19d2, 0xfffc) },
{ USB_DEVICE(0x19d2, 0xfffb) },
{ USB_DEVICE(0x19d2, 0xfff1) },
{ USB_DEVICE(0x19d2, 0xfff6) },
{ USB_DEVICE(0x19d2, 0xfff7) },
{ USB_DEVICE(0x19d2, 0xfff8) },
{ USB_DEVICE(0x19d2, 0xfff9) },
{ USB_DEVICE(0x19d2, 0xffee) },
{ USB_DEVICE(0x19d2, 0xffed) },
{ USB_DEVICE(0x19d2, 0xffeb) },
{ USB_DEVICE(0x19d2, 0xffec) },
当驱动加载成功后,且插入3G模块,在/dev/目录下可以看到几个ttyUSB0,ttyUSB1等的字符设备文件.
pppd:
下载地址:http://www.linuxfromscratch.org/blfs/view/6.3/basicnet/ppp.html
解压 ppp-2.4.4.tar.gz
执行脚本产生Makefile等文件:./configure
用开发板的交叉编译工具链编译: make CC=arm-linux-gnu-gcc (工具链需要在/etc/bin目录下存在)
将ppp-2.4.4/chat/chat ppp-2.4.4/pppd/pppd 复制到开发板文件系统/usr/sbin
脚本:
在开发板文件系统里建立/etc/ppp/peers文件夹,下面所创建出的脚本都存放在该路径
创建拨号选项脚本: vi wcdma
1 noauth
2 debug
3 connect '/usr/sbin/chat -v -f /etc/ppp/peers/wcdma-chat-connect'
4 /dev/ttyUSB3
5 115200
6 defaultroute
7 noipdefault
8 novj
9 novjccomp