SIM7600X&&A7600X PPP拨号上网
来自Waveshare Wiki
- 检查网络
AT+CPIN? AT+CFUN? AT+CSQ AT+CNMP? AT+CPSI? AT+CGREG? AT+COPS?
- 切换到root账号
sudo su
- 安装ppp
sudo apt-get install ppp
- 进入/etc/ppp/peers目录,
cd /etc/ppp/peers
- 创建gprs文件
sudo nano gprs
将下面文本复制到 gprs (如果需要USB拨号,把ttyUSB2改为ttyS0,SIM7000X仅支持ttyUSB2拨号)内容如下:
user "myusername@realm" #connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T ********" connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs" /dev/ttyS0 #/dev/ttyAMA0 #/dev/ttyUSB2 # Speed of the serial line. 115200 nocrtscts debug nodetach ipcp-accept-local ipcp-accept-remote # Assumes that your IP address is allocated dynamically by the ISP. noipdefault # Try to get the name server addresses from the ISP. usepeerdns # Use this connection as the default route. defaultroute # Makes pppd "dial again" when the connection is lost. persist # Do not ask the remote to authenticate. noauth
- PPP拨号
sudo pppd call gprs &
- 查看ppp0网卡
ifconfig
- 测试联网
sudo ping -I ppp0 www.baidu.com
- 如不能联网,可以用如下指令获取IP和联网
sudo dhclient -v ppp0 sudo apt-get install udhcpc sudo udhcpc -i ppp0 sudo route add -net 0.0.0.0 ppp0