MBIM: Value of IMSI is not updated after SIM is unlocked with PIN code
The value of SIM IMSI stays empty after the SIM card is unlocked with correct PIN code.
It is because SIM info are cached on MBIM modems and Subscriber Ready Status command is not issued after SIM unlock:
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/blob/main/src/mm-sim-mbim.c#L375
These cached values could be reset with SYNC_NEEDED signal introduced to handle quick sync after suspend !843 (merged) but I don't know the correct place for this fix.
I've observed this issue makes it impossible to unlock SIM card if it was replaced during suspend.
In such case, SIM becomes locked and IMSI cannot be read but cached value is also empty as it was not updated after unlock.
Durign quick sync, cached IMSI <none> value is compared with new <none> value and ModemManager is not aware of any change in PIN lock status.
One way to fix it is !935 (closed) but it may be overkill.
On QMI modems, change of IMSI is observed after SIM is unlocked and modem is released (#679).
[modem19] SIM imsi has changed: <none> -> XXXXXXXXXXXXXX
After this issue is fixed, MBIM modems may behave similarly to QMI but currently IMSI change is not detected:
[modem0] SIM imsi has not changed