Fwd: Sim added / extracted not detected
Alejandro Vega
alexvega48 at gmail.com
Wed Oct 16 14:38:43 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).
> >>
>
> >What modem are you using? We don't support SIM hotplug events on every
> > device out there. If I'm not mistaken, it's only available/enabled for
> > Telit and all MBIM based devices for now.
>
At the moment I am trying to achieve this with a EM7455 Sierra Wireless
modem.
>
>
> >> 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)
> >>
>
> >Looks like the modem you're using doesn't support SIM hotplug, because
> >the "forced disconnection" seen here is not totally correctly handled.
> >The SIM removal does disconnect the connection, but ModemManager
> >thinks it is still registered in the network, because it didn't handle
> >any SIM removal event reported by the device.
>
> Yes, I agree with that, it is totally like that. This event is not handled
/ reported by the device.
> >> 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 ?
>
> >For devices for which SIM hotplug is supported (Telit and all MBIM as
> >said earlier), if you remove the SIM card the "modem object" will
> >disappear from the bus, and reappear as a new object (new "modem
> >index") with "failed" state and sim-missing SIM status. E.g. you would
> >see this:
>
> > /org/freedesktop/ModemManager1/Modem/0: State changed, 'connecting'
> > --> 'connected' (Reason: User request)
> >> [SIM REMOVED]
>
> >/org/freedesktop/ModemManager1/Modem/0/org/freedesktop/ModemManager1/Modem/0
> >disappears from bus
> >// MM re-probes the device without the SIM
> >/org/freedesktop/ModemManager1/Modem/1 appears with "failed" state and
> >"SIM missing"
>
Ok, yes, that is exactly what I am expecting to see. I would be pleased if
you could confirm me that the modem I am using does not support this
feature.
What solution / workaround do you suggest to achieve this functionality ?
Is there any ?
Thank you very much.
--
> Aleksander
> https://aleksander.es
>
--
Regards,
Alejandro Vega
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191016/7ccc7900/attachment.html>
More information about the ModemManager-devel
mailing list