Hey!

> Earlier this year, I contributed a feature to detect (e)SIM profile
> switches on Quectel modems (commit d98597e43).
>
> In our use case, we'd like to extend profile switch detection to a
> larger selection of modems. In practice, this means detecting when a
> REFRESH proactive command is invoked by the SIM card (as specified in
> SGP.22). As far as I know, there's no generic way to do this (things
> like ICCID polling would probably be too intrusive). But QMI should have
> the required functionality, so at least this could be extended to
> support QMI based modems that implement the required messages.
>
> QMI has QMI_UIM_REFRESH_REGISTER/QMI_UIM_REFRESH_REGISTER_ALL messages
> that can be used for subscribing events whenever a file on SIM needs
> to be refreshed, after which the subscriber receives QMI_UIM_REFRESH_IND
> when a file is changed. If this is applied e.g. to the EF containing
> ICCID, profile switches should be reliably detectable.
>
> So, basically, I suppose the following changes in MM/libqmi would be
> needed to support this:
> - libqmi: Support for the needed QMI_UIM messages.
> - MM: On QMI based modems, attempt to register refresh events on init.
> - MM: When a refresh event is received, trigger the SIM hot-swap logic
>    to cause complete refresh of the SIM state in MM.
>
> I haven't yet tested this in practice (even at PoC level), but before
> starting to work on this feature, I'd like to hear comments: does this
> sound feasible and if things work well in practice, would the feature be
> welcome to be merged to MM?
>
> The underlying motivation here is that eSIM cards are increasingly being
> used in IoT applications and as Linux is an important IoT SW platform,
> we'd like them to work as smoothly as possible there. There remains
> other work to be done, but getting profile switches to work as fluently
> as possible would be a good starting point.
>

This all looks good to me, an eSIM profile switch should be to MM's
eyes like a SIM hotswap or a SIM slot change.

If you're planning to work on this please base your work on top of the
following MR, which introduces multi-SIM support for QMI devices (so
that you don't get too many conflicts if this MR gets in before you
finish): 
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/330

-- 
Aleksander
https://aleksander.es
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to