正在使用的调制解调器:SIM5310 连接到基于 ARM 的主板。
root@cm-debian:~# uname -a
Linux cm-debian 4.4.0-cm-t335-5.1-00030-gd350d89-dirty #29 SMP Sat Nov 4 19:18:48 PDT 2017 armv7l GNU/Linux
我目前正在使用 minicom 初始化聊天,而不是使用脚本。
使用 AT 命令我可以看到已分配 IP 地址
at+cgpaddr
+CGPADDR: 1,"176.13.98.14"
+CGPADDR: 2,"0.0.0.0"
使用 AT ping 8.8.8.8 也有效:
at+cping="8.8.8.8",1
OK
+STIN: 25
+STIN: 25
+CPING: 1,8.8.8.8,64,484,255
+CPING: 1,8.8.8.8,64,394,255
+CPING: 1,8.8.8.8,64,392,255
+CPING: 1,8.8.8.8,64,771,255
+CPING: 3,4,4,0,392,771,510
更多信息请见:
at+cgatt?
+CGATT: 1# packet domain attached
at+cgact?
+CGACT: 1,1 # PDP context is activated
+CGACT: 2,0
ati
Manufacturer: SIMCOM INCORPORATED
Model: SIMCOM_SIM5310
Revision: SIM5310_V1.5
IMEI: 359768030163686
+GCAP: +CGSM,+DS,+ES
以下是 pppd 的输出
root@cm-debian:~# pppd -detach noauth noipdefault debug usepeerdns /dev/ttyO1 115200 ipcp-accept-local ipcp-accept-remote
using channel 36
Using interface ppp0
Connect: ppp0 <--> /dev/ttyO1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4748d05c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x50 <asyncmap 0x0> <auth pap> <magic 0x15c05db> <pcomp> <accomp>]
No auth is possible
sent [LCP ConfRej id=0x50 <auth pap>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4748d05c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x51 <asyncmap 0x0> <magic 0x15c05db> <pcomp> <accomp>]
sent [LCP ConfAck id=0x51 <asyncmap 0x0> <magic 0x15c05db> <pcomp> <accomp>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0x52 magic=0x15c05db]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
IPCP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 "No network protocols running"]
sent [LCP TermReq id=0x3 "No network protocols running"]
Connection terminated.
Modem hangup
尝试使用 pap 空白用户/密码身份验证:
root@cm-debian:~# pppd -detach user "" password "" noipdefault debug usepeerdns /dev/ttyO1 115200 ipcp-accept-local ipcp-accept-remote
using channel 37
Using interface ppp0
Connect: ppp0 <--> /dev/ttyO1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9300f3d> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x53 <asyncmap 0x0> <auth pap> <magic 0x15fa3e3> <pcomp> <accomp>]
sent [LCP ConfAck id=0x53 <asyncmap 0x0> <auth pap> <magic 0x15fa3e3> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x9300f3d> <pcomp> <accomp>]
sent [PAP AuthReq id=0x1 user="" password=<hidden>]
rcvd [LCP DiscReq id=0x54 magic=0x15fa3e3]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
IPCP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 "No network protocols running"]
sent [LCP TermReq id=0x3 "No network protocols running"]
Connection terminated.
Modem hangup
禁用标头压缩等:
root@cm-debian:~# pppd -detach user "" password "" novj noccp novjccomp noipdefault debug usepeerdns /dev/ttyO1 115200 ipcp-accept-local ipcp-accept-remote
using channel 38
Using interface ppp0
Connect: ppp0 <--> /dev/ttyO1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x670e49b4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x55 <asyncmap 0x0> <auth pap> <magic 0x161ece0> <pcomp> <accomp>]
sent [LCP ConfAck id=0x55 <asyncmap 0x0> <auth pap> <magic 0x161ece0> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x670e49b4> <pcomp> <accomp>]
sent [PAP AuthReq id=0x1 user="" password=<hidden>]
rcvd [LCP DiscReq id=0x56 magic=0x161ece0]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
IPCP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 "No network protocols running"]
sent [LCP TermReq id=0x3 "No network protocols running"]
Connection terminated.
Modem hangup
更新:
我可以使用以下属性获取 ms-wins IP 地址:注意:这种情况偶尔会发生,大多返回 0.0.0.0 wins 地址
root@cm-debian:~# pppd -detach user "" password "" debug usepeerdns /dev/ttyO1 115200
using channel 52
Using interface ppp0
Connect: ppp0 <--> /dev/ttyO1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x6f1654a4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x76 <asyncmap 0x0> <auth pap> <magic 0x18a9792> <pcomp> <accomp>]
sent [LCP ConfAck id=0x76 <asyncmap 0x0> <auth pap> <magic 0x18a9792> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x6f1654a4> <pcomp> <accomp>]
sent [PAP AuthReq id=0x1 user="" password=<hidden>]
rcvd [LCP DiscReq id=0x77 magic=0x18a9792]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
IPCP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 "No network protocols running"]
sent [LCP TermReq id=0x3 "No network protocols running"]
Connection terminated.
Modem hangup
有任何想法吗?
答案1
在 at+cgdcont 中使用“sphone”代替“internetg”