<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm not sure I've seen this with other modems, but it really does seem<br>



unfortunate. Reading this information so late just makes useless any<br>
attempt to e.g. try to match connection settings to IMSI (which would be<br>
useful to decide which SIM-PIN to automatically send). But anyway, if<br>
possible, I think we should probably try to implement this and provide<br>
proper values whenever we can get them.<br>
<br>
Reading SIM-related read-only properties is attempted twice now: during<br>
the initialization phase, even if SIM-PIN is required; and also when<br>
re-running the initialization phase after sending SIM-PIN. We could<br>
definitely add a third try after going into full functionality mode<br>
(e.g. CFUN=1), but if so I'd suggest to do it in such a way that we let<br>
plugins decide when they want to do it. Some plugins will never load<br>
e.g. IMSI well even in the two attempts that we currently do, so we<br>
shouldn't retry it a third time just to see it fail. A boolean property<br>
in the MMIfaceModem interface could help, stating whether<br>
mm_sim_initialize() should be called as an additional step after<br>
ENABLING_STEP_SET_POWER_STATE.<br>
<br>
In which modem(s) have you seen this?<br>
<div><div><br></div></div></blockquote><div><br></div><div>The issue may be trickier than that. The modem has the SIM interface de-activated but incorrectly reports CPIN Ready. If that's fixed, ModemManager will fail to determine the SIM lock state and put the modem in the failed state. I guess, on a per plugin basis, we may need to do:</div>

<div><br></div><div>1. After checking the current CFUN state, change to CFUN=1 if it isn't</div><div>2. Perform the CPIN? check and load ICCID, IMSI, etc</div><div>3. At the end of the initialization, restore the CFUN state</div>

<div><br></div><div>However, that certainly increases the modem initialization and enabling time.</div>
</div></div></div>