在ARM平台上实现4G模块的PPP拨号上网,参考网上的资料和自己的理解,从一无所知到开发完成花了一周多。最后看到ARM板ping通时甚是高兴,现将此过程整理如下。当然,除此之外要做的工作还有很多。
4G模块使用的SIMTECH的SIM7100C,SIM7100C带有UART和USB接口,在考虑速度上我们使用USB接口和ARM进行通信。所以向linux内核添加3G模块的驱动(USB转串口驱动)和PPP协议的支持,然后编译内核并下载到开发板。
工作量主要包括两部分,一般在模块厂商Guide中都会有:Linux驱动层的支持
模块启停脚本调试
1.编译内核
◇大容量存储驱动
> Device Drivers >USB support
make ARCH=arm menuconfig配置USB驱动:USB Mass Storage support
[*] USB Mass Storage verbose debugRealtek Card Reader support
[*] Realtek Card Reader autosuspend support Datafab Compact Flash Reader support
◇USB驱动
> Device Drivers >USB supportInventra Highspeed Dual Role Controller (TI, ADI, ...)
MUSB Mode Selection (Dual Role mode)--->
Platform Glue Layer (TI DSPS platforms) --->MUSB DMA mode (Disable DMA (always use PIO))--->
USB Serial Converter support --->[*] USBGeneric Serial Driver USBdriver for GSM and CDMA modems
◇PPP驱动
> Device Drivers >Network device support PPP (point-to-point protocol) support PPP BSD-Compress compressionPPP Deflate compression
[*] PPP filteringPPP MPPE compression (encryption)
[*] PPP multilink supportPPP over Ethernet PPP support forasync serial ports PPP support forsync tty portsSLIP (serial line) support
[*] CSLIP compressed headers
2.交叉编译libusb
下载usblib库和libusb-compat
root@zhaoxc-VBox:/opt/usb-tools/libusb-1.0.20# mkdir install
configure: error:"udev support requested but libudev not installed"(解决:添加--disable-udev)
root@zhaoxc-VBox:/opt/usb-tools/libusb-1.0.20# ./configure --host=arm-none-linux-gnueabi --prefix=/opt/usb-tools/libusb-1.0.20/install --disable-udev
root@zhaoxc-VBox:/opt/usb-tools/libusb-1.0.20# make
root@zhaoxc-VBox:/opt/usb-tools/libusb-1.0.20# make install