一、开发环境简介
开发系统: Ubuntu 14.04
内核版本:linux 3.10
4G模块:ME909-821和ME909-120
模块接口:pcle
SIM卡:联通
二、内核驱动配置
需向linux内核中添加4G模块USB驱动和ppp网络协议的支持要向,让内核支持USB驱动和ppp拨号相关配置。
2.2.1. USB串口驱动编译配置项
Device Drivers —>
[] USB support —>
[] USB Serial Converter support —>
<> USB driver for GSM and CDMA modems
将GSM/CDMA modems功能开启。
2.2.2. PPP拨号的相关配置项
Device Drivers —>
[] Network device support —>
[] PPP(point-to-point protocol) support
并在[] PPP(point-to-point protocol) support下选中
<> PPP BSD-Compress compression
<> PPP Deflate compression
[] PPP filtering
<> PPP MPPE compression (encryption)
[] PPP multilink support
<> PPP over Ethernet
<> PPP on L2TP Access Concentrator
<> PPP on PPTP Network Server
<> PPP support for async serial ports
<> PPP support for sync tty ports
编译内核,插入4G模块,使用 ls /dev/ttyUSB* 命令检查有无4G相关驱动虚拟出来的 /dev/ttyUSB0 、/dev/ttyUSB1 、/dev/ttyUSB2 、/dev/ttyUSB3 、/dev/ttyUSB4 五个USB设备。
三、软件安装和ppp程序准备
3.1 下载源码包
从https://download.samba.org/pub/ppp/ppp-2.4.4.tar.gz 下载ppp-2.4.4.tar.gz源代码包,我用的这个版本,你们也可以用其他的版本。
3.2 解压编译
tar xzf ppp-2.4.4.tar.gz
cd ppp-2.4.4
./configure