OpenWRT doesn't handle modem's IP renewal

Hi people.
Perhaps someone has faced the same problem as me.
I have a Quectel modem connected to an OpenWRT 23.05.4 router using the MBIM protocol. Sometimes my Megafon mobile operator changes network settings (IP, DNS,...), which are processed by the modem, but not propagated to the router, which leads to loss of network connection.

After renewal the modem shows the following settings:

AT+CGPADDR
+CGPADDR: 1,"10.97.149.3"

While the router still has the old IP:

root@Router:~# ifconfig wwan0
wwan0     Link encap:Ethernet  HWaddr 78:02:F8:FA:44:95
          inet addr:10.195.192.158  Bcast:10.195.192.159  Mask:255.255.255.252

Also resolv.conf.auto file is empty:

root@Router:~# ll /tmp/resolv.conf.d/resolv.conf.auto
-rw-r--r--    1 root     root             0 Sep  6 19:11 /tmp/resolv.conf.d/resolv.conf.auto

While usually it contains DNS IPs.
The modem also shows:

AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

While usually it shows:

AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 2,"IP","internet","0.0.0.0",0,0,0,0

After restarting the WAN (LTE) interface, the problem persists, but the error message "PIN code rejected" appears, though the PIN code is not installed on the SIM card.
Only router reboot or modem reset (AT+CFUN=1,1) helps, until next IP renewal from provider. Has anyone solved this problem before?
Regards.

Tried different connection mode?

I've tried only QMI before, but had same issue. Haven't tried ECM though. There must be some kernel modules/apps installed for it to work?

OpenWRT guide:
https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle
vendor says to use ECM exactly in your case. If you have mobile phone in same network as modem check in android/ios possible APN names, usually one is with public IP and another with ip6. OpenWRT works much better having public IP o n WAN.

1 Like

My APN is "internet". I read that document before, but tried it only with QMI and MBIM. Should try to use ECM also.
Thanx for help.

In principle netifd should generate address change ubus event and firewall reloads.

I've reconfigured modem and router to use ECM, will check how it works. No issues so far )

Cover it with wire mesh glove or steel bucket for a minute or two to trigger reconnection.

It did reconnect already, have checked with
AT+CGPADDR

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.