Sim added / extracted not detected

Alejandro Vega alexvega48 at gmail.com
Wed Oct 16 11:16:29 UTC 2019


Hello,

I am developing an application which makes use of the libmm-glib high level
API and I have been making some tests and I have not been able to detect
when a SIM is added or removed (I know its not very common to add/extract
it on runtime but I want to be aware of this in my app).

Whenever the SIM is removed the only change I can notice in the modem
manager is that the modem transitions from *connected *to *registered
**. *Monitoring
the modem with mmcli I see the following:

        /org/freedesktop/ModemManager1/Modem/0: State changed, 'connecting'
--> 'connected' (Reason: User request)
*[SIM REMOVED]*
        /org/freedesktop/ModemManager1/Modem/0: State changed, 'connected'
--> 'registered' (Reason: User request)

It is true that if I relaunch/restart or I restart the modem manager and
the sim is missing the modem status reports *failed *and the sim status is
*sim-missing*. However,  I believe this status should be reported without
the need of restarting either the modem or the ModemManager. Is this
possible ?
Am I doing something wrong ? Is there any way I could be aware of sim
additions / removals without restarting the modem ?

Thank you very much.

Regards,
Alejandro Vega
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191016/ecae23cb/attachment.html>


More information about the ModemManager-devel mailing list