I followed all the steps as shown in the guide to connect my Rpi4 to an IoT-M network (twilio in the US over AT&T) through the cellular IoT hat using QMI and so far I have not been successful and have been stuck here:
root@raspberrypi:/home/pi/files/quectel-CM# sudo ./quectel-CM -s super
[07-01_01:00:31:926] Quectel_QConnectManager_Linux_V1.5.9
[07-01_01:00:31:929] Find /sys/bus/usb/devices/1-1.4 idVendor=0x2c7c idProduct=0x296, bus=0x001, dev=0x003
[07-01_01:00:31:929] Auto find qmichannel = /dev/cdc-wdm0
[07-01_01:00:31:929] Auto find usbnet_adapter = wwan0
[07-01_01:00:31:929] netcard driver = qmi_wwan, driver version = 22-Aug-2005
[07-01_01:00:31:930] Modem works in QMI mode
[07-01_01:00:31:940] cdc_wdm_fd = 7
[07-01_01:00:31:952] Get clientWDS = 1
[07-01_01:00:31:954] Get clientDMS = 1
[07-01_01:00:31:956] Get clientNAS = 1
[07-01_01:00:31:958] Get clientUIM = 1
[07-01_01:00:31:960] Get clientWDA = 1
[07-01_01:00:31:962] requestBaseBandVersion BG96MAR02A07M1G 1 [Jun 22 2018 06:00:00]
[07-01_01:00:31:970] requestGetSIMStatus SIMStatus: SIM_READY
[07-01_01:00:31:970] requestSetProfile[1] super///0
[07-01_01:00:31:986] requestGetProfile[1] super///0
[07-01_01:00:31:988] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
[07-01_01:00:31:990] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[07-01_01:00:31:990] ifconfig wwan0 down
[07-01_01:00:31:998] ifconfig wwan0 0.0.0.0
[07-01_01:00:32:018] requestSetupDataCall WdsConnectionIPv4Handle: 0x8338d690
[07-01_01:00:32:026] ifconfig wwan0 up
[07-01_01:00:32:033] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.30.1
No resolv.conf for interface wwan0.udhcpc
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
Note that I have been successful via the PPP method but only if I use /dev/ttyUSB2 and not ttyS0 or ttyUSB3 as suggested by the guide. Not exactly sure why.
pi@raspberrypi:~ $ sudo pon
pppd options in effect:
debug # (from /etc/ppp/peers/provider)
updetach # (from /etc/ppp/peers/provider)
dump # (from /etc/ppp/peers/provider)
noauth # (from /etc/ppp/peers/provider)
remotename 3gppp # (from /etc/ppp/peers/provider)
/dev/ttyUSB2 # (from /etc/ppp/peers/provider)
115200 # (from /etc/ppp/peers/provider)
lock # (from /etc/ppp/peers/provider)
connect chat -s -v -f /etc/chatscripts/chat-connect -T super # (from /etc/ppp/peers/provider)
disconnect chat -s -v -f /etc/chatscripts/chat-disconnect # (from /etc/ppp/peers/provider)
nocrtscts # (from /etc/ppp/peers/provider)
modem # (from /etc/ppp/peers/provider)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/provider)
novj # (from /etc/ppp/peers/provider)
novjccomp # (from /etc/ppp/peers/provider)
ipcp-accept-local # (from /etc/ppp/peers/provider)
ipcp-accept-remote # (from /etc/ppp/peers/provider)
ipparam 3gppp # (from /etc/ppp/peers/provider)
noipdefault # (from /etc/ppp/peers/provider)
ipcp-max-failure 30 # (from /etc/ppp/peers/provider)
defaultroute # (from /etc/ppp/peers/provider)
usepeerdns # (from /etc/ppp/peers/provider)
noccp # (from /etc/ppp/peers/provider)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
^M
OK
-- got it
send (ATE0^M)
expect (OK)
^M
^M
OK
-- got it
send (AT+QCFG="band",F,400A0E189F,A0E189F,1^M)
expect (OK)
^M
^M
OK
-- got it
send (AT+QCFG="nwscanseq",02,1^M)
expect (OK)
^M
^M
OK
-- got it
send (AT+QCFG="nwscanmode",3,1^M)
expect (OK)
^M
^M
OK
-- got it
send (AT+QCFG="iotopmode",0,1^M)
expect (OK)
^M
^M
OK
-- got it
send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
BG96^M
Revision: BG96MAR02A07M1G^M
^M
SubEdition: V08^M
^M
+CSQ: 22,99^M
^M
+COPS: 0,0,"AT&T Twilio",8^M
^M
+CGREG: 0,4^M
^M
OK
-- got it
send (AT+CGDCONT=1,"IP","super",,0,0^M)
expect (OK)
^M
^M
OK
-- got it
send (ATD*99#^M)
expect (CONNECT)
^M
^M
CONNECT
-- got it
Script chat -s -v -f /etc/chatscripts/chat-connect -T super finished (pid 983), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa0977ce5> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x10 <asyncmap 0x0> <auth chap MD5> <magic 0x473bd206> <pcomp> <accomp>]
No auth is possible
sent [LCP ConfRej id=0x10 <auth chap MD5>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xa0977ce5> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x11 <asyncmap 0x0> <magic 0x473bd206> <pcomp> <accomp>]
sent [LCP ConfAck id=0x11 <asyncmap 0x0> <magic 0x473bd206> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0xa0977ce5]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0x12 magic=0x473bd206]
rcvd [LCP EchoRep id=0x0 magic=0x473bd206 a0 97 7c e5]
rcvd [IPCP ConfReq id=0xa]
sent [IPCP ConfNak id=0xa <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1 <addr 100.64.12.89> <ms-dns1 8.8.8.8> <ms-dns2 8.8.4.4>]
sent [IPCP ConfReq id=0x2 <addr 100.64.12.89> <ms-dns1 8.8.8.8> <ms-dns2 8.8.4.4>]
rcvd [IPCP ConfReq id=0xb]
sent [IPCP ConfAck id=0xb]
rcvd [IPCP ConfAck id=0x2 <addr 100.64.12.89> <ms-dns1 8.8.8.8> <ms-dns2 8.8.4.4>]
Could not determine remote IP address: defaulting to 10.64.64.64
not replacing default route to wlan0 [192.168.1.1]
local IP address 100.64.12.89
remote IP address 10.64.64.64
primary DNS address 8.8.8.8
secondary DNS address 8.8.4.4
Also, is it normal to see a lot of delay and loss when initializing a PPP connection for the first time?
pi@raspberrypi:~ $ ping -I ppp0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 100.64.15.95 ppp0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=21 ttl=113 time=27337 ms
64 bytes from 8.8.8.8: icmp_seq=22 ttl=113 time=26334 ms
64 bytes from 8.8.8.8: icmp_seq=23 ttl=113 time=25337 ms
64 bytes from 8.8.8.8: icmp_seq=24 ttl=113 time=24336 ms