Raspberry Pi to EC20 module
1、下载串口助手
sudo apt-get install minicom
2、配置串口
- Type sudo minicom
- Press ctrl+A, release and then press Z
- Type O
- Select Serial port setup
- Press A, modify the serial port name /dev/ttyUSB2
- Save and exit
3、安装驱动识别程序
sudo apt-get install usb-modeswitch usb-modeswitch-data
4、安装拨号软件
sudo apt-get install wvdial
5、修改拨号配置
- Type sudo vim /etc/wvdial.conf
- Modified to the following form
[Dialer lan]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = at+cgdcont=1,"ip","3gnet"
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB2
ISDN = 0
Phone = *99#
Password = card
Username = card
APN settings : Specifically, it is China Mobile or China Unicom or Telecom is Init3 Phone. It is slightly different and the others are basically the same. Here is Telecom.
Move: at+cgdcont=1,"ip","cmnet"
Unicom: at+cgdcont=1,"ip","3gnet"
Telecom: at+cgdcont=1,"ip","ctnet"
Dial :
Mobile: 99 1# or 98 1#
China Unicom: *99#
Telecommunications: #777
6、拨号
sudo wvdial lan
7、修改路由表
route add -net 0.0.0.0 gw 10.64.64.64 dev ppp0