Change SIM card in EG25-G

Hi,

I have a RPI4 with openwrt installed and connected to a mini-pcie modem (via USB).

Everything works great except for changing the SIM cards. I have been testing the router and modules with 2 different SIM cards and providers but it takes ages to have the modem up and running again. I restart, the modem, the interface, power down the unit, etc etc. and eventually it connects to the new provider.

My question: What is the proces of changing the SIM card in the modem and does it also support the swap function as discribed here?

Thnx for the help.

When I run the command dmesg after changing the SIM it constantly goes from:"

cdc_mbim 1-1.2:1.4 wwan0: register 'cdc_mbim' at usb-0000:01:00.0-1.2, CDC MBIM, xx:xx:xx:d7:f2:53

to

cdc_mbim 1-1.2:1.4 wwan0: unregister 'cdc_mbim' usb-0000:01:00.0-1.2, CDC MBIM

in my logread -f I see this log entry:
mbim[13272] Subscriber registration failed (code 2)

anyone?

I tihnk you need to check the SIM hotplug feature.
Please check the AT

AT+QSIMDET?

And the hardware design of the SIM.

Hi,

Thnx for the reply, entering that code gives me:

Type [C-a] [C-h] to see available commands
Terminal ready
AT+QSIMDET?
+QSIMDET: 0,0

OK

when using the same SIM card it works without problems and connect directly when starting up but when I insert another SIM (other provider) and change the settings in openwrt (MBIM) it takes ages before the card is accepted and have to do multiple restarts, delete and add interface.

Sometimes I thing it has to do with DNS but after changing that the same problem happens. And after a while it suddenly connects.

It means that the SIM hotplug is not enabled.
If you change the SIM card without restating the module, the module cannot detect the SIM card.

This is not working correctly. It looks like mbim APN settings settings are stored in the modem so that when I change the SIM card it does not connect to the right provider.

I tested it with the command above but still no good result. I tested with another modem and got instant connection (initially) but also after a few changes I got similar problems changing SIM’s

Is there a standard mathod of changing SIM’s? or do I have to delete profiles or something?

Could another mode perhaps solving the issue, I now have MBIM?

Do you mean that once you switch the SIM card, the module will actually restart?
I don’t see any relationship with MBIM mode. If the module is restarted, the serial number you see with mmcli -L will change.

I think my workflow for changing SIM cards is not efficient, and I need to be more patient with the process. Simply swapping SIM cards and restarting the router (modem) doesn’t seem to work—it often results in a non-functional modem.

It appears the router stores provider configuration if I don’t follow the correct procedure when changing SIM cards resulting in not getting connected and frustrated.

Here’s the process that seems to work for me, though I’m unsure if it’s a standard procedure:

  1. Disable the active interface.
  2. Power off the router.
  3. Swap the SIM card.
  4. Enable the new interface for the new SIM card.
  5. Wait for 5 minutes before testing the connection.

Any other approach seems to cause issues, where the modem repeatedly attempts to connect but can’t get the interface operational. Do you know if this is the recommended workflow, or if there’s a better way to handle SIM card changes?

If the hardware and software of this device cannot be modified, then you need to shut down the device before changing the card.
If you are the R&D engineer of this device, then we should enable the hot swap function of the SIM card.