I’ve made some progress: EM12-G RIL integration with Android 10 NXP iMX8M, part 2
- The signal strength does not mean that the module can access the Internet. You can try to use wwan0 to ping the website first to see if the packet can be pinged
smarc_mx8mq:/ # ip a | grep wwan0 -A5
9: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1358 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 36:99:50:80:ec:8c brd ff:ff:ff:ff:ff:ff
inet 10.95.207.21/30 brd 10.95.207.23 scope global wwan0
valid_lft forever preferred_lft forever
inet6 fe80::3499:50ff:fe80:ec8c/64 scope link
valid_lft forever preferred_lft forever
smarc_mx8mq:/ # ip route show
10.95.207.20/30 dev wwan0 proto kernel scope link src 10.95.207.21
We can add it:
smarc_mx8mq:/ # ip route add default via 10.95.207.22 dev wwan0
smarc_mx8mq:/ # ip route show
default via 10.95.207.22 dev wwan0
10.95.207.20/30 dev wwan0 proto kernel scope link src 10.95.207.21
but the far side doesn’t ping:
smarc_mx8mq:/ # ping 10.95.207.22
PING 10.95.207.22 (10.95.207.22) 56(84) bytes of data.
From 10.95.207.21: icmp_seq=1 Destination Host Unreachable
From 10.95.207.21: icmp_seq=2 Destination Host Unreachable
From 10.95.207.21: icmp_seq=3 Destination Host Unreachable
^C
--- 10.95.207.22 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3071ms
pipe 4
- Use AT+COPS? and AT+CEREG? commands to query the betting network status.
chris@cyan:~$ grep -i AT+COPS quectel_debug_log/*radio*
03-05 02:53:47.447 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:47.450 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:47.453 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:47.457 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:48.119 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:48.125 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:48.133 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,2;+COPS?
03-05 02:53:48.139 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,2;+COPS?
03-05 02:53:48.237 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:48.245 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:52.243 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:52.246 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:52.293 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:53.680 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,2;+COPS?
03-05 02:53:56.807 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:56.814 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:54:06.935 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:54:06.940 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
chris@cyan:~$ grep -i AT+CEREG quectel_debug_log/*radio*
chris@cyan:~$
AT+COPS?
+COPS: 0,2,"23420",7
OK
AT+CEREG?
+CEREG: 0,1
OK