Sim change event

Aleksander Morgado aleksander at aleksander.es
Thu May 21 08:25:14 UTC 2020


Hey!

> Can you please suggest what is best way to change SIM card when using mmcli?
> My task is to execute some USSD codes on as many SIM cards as
> possible, I tried to use script with --3gpp-ussd-initiate and
> --3gpp-ussd-respond and it works, but I don't know how to change SIM
> card as fast as possible.
> Replugging device takes few minutes and it registers in the system as
> new modem (2,3,4, etc.) every time.
> --reset command has same drawbacks
> Does that depend on hardware? I'm using huawei E3531 in stick mode.

Yes, it depends on hardware, not all modem support SIM hot plugging,
and even if they do, ModemManager doesn't support all the modems that
support hotplugging. Currently hotplugging is working for at least
Telit devices and all MBIM devices IIRC. I doubt that the E3531
supports hotplugging, but not sure.

Why do you say that registering as a new modem (2,3,4..) is a problem?
That can be avoided using the sysfs path to refer to the modem, or
"naming" the device with a USB tag. In git master, mmcli also allows
using "mmcli -m any" to refer to the first modem found in the system;
if you only have one it'll work for you.

>
> I'm also interested if your software supports "router mode" usb
> modems, I have qualcomm devices
> https://www.aliexpress.com/item/483621882.html
> But they don't work with mmcli.
>

A modem that works in "router mode" will usually expose only a HTTP
webadmin for human users to use, no "machine friendly" control port.
In this case, ModemManager cannot do anything. That device you pointed
out is very likely working like that. Other modems out there like e.g.
notably the u-blox TOBY-L2/L4 for example work in router mode, but
they do provide an AT channel to communicate with the device, so
ModemManager can use them easily.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list