GL-X3000 SIM card switch needs a reboot to properly work

I am actually using latest 4.3.3 version, and if I try to switch to SIM card 2 I get stuck in a infinite loop of "modem ip different, now regain ip …" like this:

Wed Jun  7 10:50:10 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 10:50:10 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 10:50:10 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 10:50:10 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 10:50:10 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 10:50:10 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 10:50:10 2023 daemon.notice netifd: modem_0001_4 (17057): udhcpc: started, v1.33.2
Wed Jun  7 10:50:10 2023 daemon.notice netifd: modem_0001_4 (17057): udhcpc: sending discover
Wed Jun  7 10:50:10 2023 daemon.notice netifd: modem_0001_4 (17057): udhcpc: sending select for 10.15.195.xxx
Wed Jun  7 10:50:10 2023 daemon.notice netifd: modem_0001_4 (17057): udhcpc: lease of 10.15.195.xxx obtained, lease time 7200
Wed Jun  7 10:50:10 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 10:50:10 2023 user.notice mwan3[17034]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 10:50:10 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 10:50:11 2023 user.notice mwan3[17349]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 10:50:11 2023 user.notice mwan3[17349]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 10:50:13 2023 user.info mwan3rtmon[8947]: Detect rtchange event.
Wed Jun  7 10:50:14 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 10:50:20 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 10:50:20 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 10:50:20 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 10:50:20 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 10:50:20 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 10:50:20 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 10:50:20 2023 daemon.notice netifd: modem_0001_4 (18291): udhcpc: started, v1.33.2
Wed Jun  7 10:50:20 2023 daemon.notice netifd: modem_0001_4 (18291): udhcpc: sending discover
Wed Jun  7 10:50:20 2023 daemon.notice netifd: modem_0001_4 (18291): udhcpc: sending select for 10.15.195.xxx
Wed Jun  7 10:50:20 2023 daemon.notice netifd: modem_0001_4 (18291): udhcpc: lease of 10.15.195.xxx obtained, lease time 7200
Wed Jun  7 10:50:20 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 10:50:20 2023 user.notice mwan3[18268]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 10:50:21 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 10:50:21 2023 user.notice mwan3[18583]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 10:50:21 2023 user.notice mwan3[18583]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)

Only a reboot seems to fix this problem, but if I then try to switch back to SIM 1 I have the same infinite loop again and so I have to reboot again…

Hi Max3:

I have test it and it is OK.
modem ip different, now regain ip …’ is a normal prompt and does not affect SIM card switching.

It can’t be normal to have the modem offline every 10 seconds, I can’t surf until a reboot! Have you seen the log? I have a disconnection every 10 seconds or so in an infinite loop until a reboot…

Maybe I misunderstood that.
Do you mean that after the sim failover function is enabled, the sim card will be switched over frequently?

How did this issue come about?

When the IP address of the cellular is detected to change, the IP address is updated simultaneously.
And log information will prompt ’ modem ip different, now regain ip …

Yes, the problem is that the IP address is detected to change every 10 seconds after I manually switch from SIM1 to SIM2, and the modem continuosly disconnects and reconnect.
This is 1 minute log after switching, it goes like that forever (tested for 1 hour). Only a reboot or switching back to SIM1 fix that.

Wed Jun  7 15:17:02 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:17:02 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:17:02 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:17:02 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:17:02 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:17:02 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:17:02 2023 daemon.notice netifd: modem_0001_4 (20355): udhcpc: started, v1.33.2
Wed Jun  7 15:17:02 2023 daemon.notice netifd: modem_0001_4 (20355): udhcpc: sending discover
Wed Jun  7 15:17:02 2023 daemon.notice netifd: modem_0001_4 (20355): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:17:02 2023 daemon.notice netifd: modem_0001_4 (20355): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:17:02 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:17:02 2023 user.notice mwan3[20332]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:17:02 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:17:03 2023 user.notice mwan3[20648]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:03 2023 user.notice mwan3[20648]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:05 2023 user.info mwan3rtmon[9041]: Detect rtchange event.
Wed Jun  7 15:17:06 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:12 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:17:12 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:17:12 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:17:12 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:17:12 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:17:12 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:17:12 2023 daemon.notice netifd: modem_0001_4 (21678): udhcpc: started, v1.33.2
Wed Jun  7 15:17:12 2023 daemon.notice netifd: modem_0001_4 (21678): udhcpc: sending discover
Wed Jun  7 15:17:12 2023 daemon.notice netifd: modem_0001_4 (21678): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:17:12 2023 daemon.notice netifd: modem_0001_4 (21678): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:17:12 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:17:12 2023 user.notice mwan3[21655]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:17:13 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:17:13 2023 user.notice mwan3[21970]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:13 2023 user.notice mwan3[21970]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:16 2023 user.info mwan3rtmon[9041]: Detect rtchange event.
Wed Jun  7 15:17:16 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:22 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:17:22 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:17:23 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:17:23 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:17:23 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:17:23 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:17:23 2023 daemon.notice netifd: modem_0001_4 (22914): udhcpc: started, v1.33.2
Wed Jun  7 15:17:23 2023 daemon.notice netifd: modem_0001_4 (22914): udhcpc: sending discover
Wed Jun  7 15:17:23 2023 daemon.notice netifd: modem_0001_4 (22914): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:17:23 2023 daemon.notice netifd: modem_0001_4 (22914): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:17:23 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:17:23 2023 user.notice mwan3[22891]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:17:23 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:17:24 2023 user.notice mwan3[23207]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:24 2023 user.notice mwan3[23207]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:26 2023 user.info mwan3rtmon[9041]: Detect rtchange event.
Wed Jun  7 15:17:26 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:33 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:17:33 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:17:33 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:17:33 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:17:33 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:17:33 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:17:33 2023 daemon.notice netifd: modem_0001_4 (24152): udhcpc: started, v1.33.2
Wed Jun  7 15:17:33 2023 daemon.notice netifd: modem_0001_4 (24152): udhcpc: sending discover
Wed Jun  7 15:17:33 2023 daemon.notice netifd: modem_0001_4 (24152): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:17:33 2023 daemon.notice netifd: modem_0001_4 (24152): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:17:33 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:17:33 2023 user.notice mwan3[24129]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:17:33 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:17:34 2023 user.notice mwan3[24444]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:34 2023 user.notice mwan3[24444]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:36 2023 user.info mwan3rtmon[9041]: Detect rtchange event.
Wed Jun  7 15:17:37 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:43 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:17:43 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:17:43 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:17:43 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:17:43 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:17:43 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:17:43 2023 daemon.notice netifd: modem_0001_4 (25385): udhcpc: started, v1.33.2
Wed Jun  7 15:17:43 2023 daemon.notice netifd: modem_0001_4 (25385): udhcpc: sending discover
Wed Jun  7 15:17:43 2023 daemon.notice netifd: modem_0001_4 (25385): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:17:43 2023 daemon.notice netifd: modem_0001_4 (25385): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:17:43 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:17:43 2023 user.notice mwan3[25362]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:17:44 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:17:44 2023 user.notice mwan3[25677]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:44 2023 user.notice mwan3[25677]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:47 2023 user.info mwan3rtmon[9041]: Detect rtchange event.
Wed Jun  7 15:17:47 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:53 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:17:53 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:17:54 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:17:54 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:17:54 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:17:54 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:17:54 2023 daemon.notice netifd: modem_0001_4 (26620): udhcpc: started, v1.33.2
Wed Jun  7 15:17:54 2023 daemon.notice netifd: modem_0001_4 (26620): udhcpc: sending discover
Wed Jun  7 15:17:54 2023 daemon.notice netifd: modem_0001_4 (26620): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:17:54 2023 daemon.notice netifd: modem_0001_4 (26620): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:17:54 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:17:54 2023 user.notice mwan3[26597]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:17:54 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:17:55 2023 user.notice mwan3[26912]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:55 2023 user.notice mwan3[26912]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:17:57 2023 user.info mwan3rtmon[9041]: Detect rtchange event.
Wed Jun  7 15:17:57 2023 user.notice firewall: Reloading firewall due to ifup of modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:18:04 2023 user.notice root: modem ip different, now regain ip ...
Wed Jun  7 15:18:04 2023 daemon.notice netifd: Interface 'modem_0001_4' has lost the connection
Wed Jun  7 15:18:04 2023 daemon.notice netifd: Interface 'modem_0001_4' is now down
Wed Jun  7 15:18:04 2023 daemon.notice netifd: Interface 'modem_0001_4' is disabled
Wed Jun  7 15:18:04 2023 daemon.notice netifd: Interface 'modem_0001_4' is enabled
Wed Jun  7 15:18:04 2023 daemon.notice netifd: Interface 'modem_0001_4' is setting up now
Wed Jun  7 15:18:04 2023 daemon.notice netifd: modem_0001_4 (27871): udhcpc: started, v1.33.2
Wed Jun  7 15:18:04 2023 daemon.notice netifd: modem_0001_4 (27871): udhcpc: sending discover
Wed Jun  7 15:18:04 2023 daemon.notice netifd: modem_0001_4 (27871): udhcpc: sending select for 10.12.93.xx
Wed Jun  7 15:18:04 2023 daemon.notice netifd: modem_0001_4 (27871): udhcpc: lease of 10.12.93.xx obtained, lease time 7200
Wed Jun  7 15:18:04 2023 daemon.notice netifd: Interface 'modem_0001_4' is now up
Wed Jun  7 15:18:04 2023 user.notice mwan3[27844]: Execute ifdown event on interface modem_0001_4 (unknown)
Wed Jun  7 15:18:04 2023 user.notice firewall: Reloading firewall due to ifdown of modem_0001_4 ()
Wed Jun  7 15:18:05 2023 user.notice mwan3[28159]: Execute ifup event on interface modem_0001_4 (rmnet_mhi0)
Wed Jun  7 15:18:05 2023 user.notice mwan3[28159]: Starting tracker on interface modem_0001_4 (rmnet_mhi0)

IMPORTANT UPDATE:
I decided to try a third SIM (the one from my phone) and I don’t have such problem with that… so it should be an operator specific problem. Any idea how to debug that? Tha APN is the right one and it works just great alone…

1 Like

Try disabling the cellular connection tracking from the Multi-WAN UI. Test again all sims.

Already tried, no difference.

1 Like

I have one sim, inserted in the same slot all time and the connection is very stable.

Today thanks to some friends I manged to try basically any operator here in Italy. It seems that some of them doesn’t allow SIM switching. Basically all the SIM I tried work like a charm when used alone but 70% of them gives me problems when doing switching… All I can say is that the operator that gives me problems with SIM switching are the ones that change IP more frequently… (no problems with operators that change IP address every 24h… but problems with operators that change IP address every 4h or so)…

Thank you so much for the test.

It need to capture some data packets to check what’s going on.

wget http://download.gl-inet.com/tools/MT7981/qlog/qlog
chmod 755 qlog
qlog -s /tmp/mountd/disk1_part1/logs_$(date +%Y-%m-%d-%H-%M)

The data volume is a bit large, and an extra USB flash drive needs to be inserted.

Thanks!

I’ve insterted an USB flash drive, downloaded qlog but when doing
qlog -s /tmp/mountd/disk1_part1/logs_$(date +%Y-%m-%d-%H-%M) I am getting:

-ash: qlog: not found

‘qlog’ needs to move the /usr/bin directory。
Or ./qlog -s /tmp/mountd/disk1_part1/logs_$(date +%Y-%m-%d-%H-%M)

I see, thanks.
So I started Qlog and I then tried SIM switching a couple of times…
Here’s my logs: LINK

If you’re still having issues, downgrading to 4.3.0 solved everything for me.

Thanks but 4.3.0 is absolutely unstable for me, I have a complete disconnection everytime my operator change the IP address and this issue was resolved from version 4.3.1 :wink:
Anyway I only have problem in dual SIM configuration, otherwhise everything is rock stable with the latest release.

1 Like

Hi Max3:

What is the RM520N version?
Version can be viewed with the following AT instruction:

AT+QGMR

Thanks!

Version is RM520NGLAAR01A06M4G_01.001.01.001 .
Have you downloaded the log from my previous post? :wink:

Yes,I have downloaded the log and checking the information.

Thanks!

1 Like