Detecting SIM REFRESH events
Aleksander Morgado
aleksander at aleksander.es
Fri Aug 28 15:01:16 UTC 2020
Hey!
> >> Any ideas which modems do actually support QMI slot status? I
> >> would like to try if slot status changes could also be used for this
> >> purpose.
> >
> > The Sierra Wireless EM7565 at least supports those; the Dual SIM
> > Single Standby support
> > (https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/330)
> > relies on slot status messages.
>
> Thanks, seems that at least newer Sierra modems support it and I
> happened to have WP7607 handy which does support it.
>
> I have the code close to ready now, mostly a little more testing needed.
>
> There is quite a lot of code, as I've implemented two fallbacks for
> older modems that have more limited QMI support. In the draft I've made,
> the event registration is performed within load_sim_slots() method
> using the following logic:
>
> - Before Get Slot Status, QMI subscription of physical slot status
> change events is done using Register Events QMI message.
> - If Get Slot Status succeeds (indicating that the modem really
> supports physical slot status), no more is done and SIM slot
> scan continues as before. (This happens e.g. on Sierra WP7607.)
> - If Get Slot Status fails with an error indicating the command is
> not supported, then:
> * Register Refresh All message is invoked. If it's successful
> (e.g. on Quectel EG25), then return from load_sim_slots.
> * If Register Refresh All fails, use the plain Register Refresh
> function with the ICCID file. This works e.g. on Sierra
> MC8305. The file change notification itself is not interesting,
> but only UICC Reset type of REFRESH will trigger SIM swap check.
>
That looks very good to me.
> Before I can submit the code for review, merging the multi-sim support
> (MR !330) is needed first, so any idea when it could be merged? :-)
>
Let's get it merged right away, we can always discuss it post-merge if
anyone has comments on the new APIs implemented.
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list