AncheNO
Secondo me AT+CFUN=1,1 da solo non è sufficiente a coprire tutti gli scenari di blocco che stiamo osservando.
È vero che teoricamente è un “full reset del modem”, ma nella pratica su questi setup (Zyxel + EG18 + MBIM/QMI) spesso agisce solo sul baseband radio, senza riallineare tutto lo stack di gestione del traffico lato router.
Infatti non coinvolge direttamente:
driver USB/QMI/MBIM lato sistema
demone DHCP (udhcpc)
routing/NAT e stato della WAN nel firmware Zyxel
eventuali stati incoerenti dello stack WAN
Per questo motivo può capitare che il comando venga eseguito correttamente, ma il sistema sopra il modem rimanga in uno stato parzialmente incoerente.
Nel mio caso lo sblocco reale avviene solo quando viene riattivata tutta la catena (interfaccia WAN + DHCP + attach), non solo il reset radio.
Per dare un riferimento concreto, questo è l’output reale di uno SMART CFUN eseguito tramite lo script atcmd (con watchdog disattivato per evitare interferenze):
`
root@LTE5398-M904:~# atcmd -C
Executing SMART CFUN restart procedure...
Watchdog blocked (created by this script)
Send: "AT+CFUN=1,1"...
OK
Restarting modem...
Send: "AT+CFUN=0" (Radio OFF)...
OK
Send: "AT+CFUN=1" (Radio ON)...
Waiting for the device /dev/ttyUSB2 to be ready...
Device /dev/ttyUSB2 is ready!
Checking if the modem responds to "AT" command...
Attempt 1 of 20... Modem not responding yet.
OK
Checking SIM status (AT+CPIN?)...
+CPIN: READY
OK
SIM status: READY
Restarting WAN interface wan...
Send: "ubus call network.interface.wan down"...
Send: "ubus call network.interface.wan up"...
Waiting (60)sec...
Modem sanity check (AT+CIMI)...
Modem sanity check OK (IMSI present)
Checking Network Registration status (AT+CEREG?)...
+CEREG: 0,1
OK
Modem registered on LTE network.
Waiting for interface wwan0...
Interface wwan0 is ready.
Checking PDP IP address...
+CGPADDR: 1,"10.x.y.z"
OK
PDP IP address detected: 10.x.y.z
Checking IPv4 on interface...
Interface wwan0 has IPv4 address: 10.x.y.z
Starting Ping test on interface wwan0...
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=117 time=54.414 ms
64 bytes from 8.8.8.8: seq=1 ttl=117 time=43.207 ms
64 bytes from 8.8.8.8: seq=2 ttl=117 time=52.778 ms
64 bytes from 8.8.8.8: seq=3 ttl=117 time=52.628 ms
64 bytes from 8.8.8.8: seq=4 ttl=117 time=52.376 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 43.207/51.080/54.414 ms
PING 9.9.9.9 (9.9.9.9): 56 data bytes
64 bytes from 9.9.9.9: seq=0 ttl=57 time=47.892 ms
64 bytes from 9.9.9.9: seq=1 ttl=57 time=61.196 ms
64 bytes from 9.9.9.9: seq=2 ttl=57 time=47.320 ms
64 bytes from 9.9.9.9: seq=3 ttl=57 time=46.204 ms
64 bytes from 9.9.9.9: seq=4 ttl=57 time=45.919 ms
--- 9.9.9.9 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 45.919/49.706/61.196 ms
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=54 time=51.827 ms
64 bytes from 1.1.1.1: seq=1 ttl=54 time=51.264 ms
64 bytes from 1.1.1.1: seq=2 ttl=54 time=51.050 ms
64 bytes from 1.1.1.1: seq=3 ttl=54 time=50.835 ms
64 bytes from 1.1.1.1: seq=4 ttl=54 time=49.641 ms
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 49.641/50.923/51.827 ms
At least one ping succeeded, LTE connectivity OK.
SMART CFUN completed successfully
Watchdog unblocked
`
Come si vede, il modem torna operativo, ma la recovery include diversi passaggi oltre al semplice CFUN (restart WAN, verifica IP, sanity check, ecc.).
Lo script che ho usato è questo:
https://github.com/compact21/openwrt-script/blob/main/atcmd