Re: [MM] [PATCH] sim: retry SIM operations during initialization



On Thu, Aug 23, 2012 at 11:51 PM, Aleksander Morgado
<aleksander lanedo com> wrote:
>
>> The timeout + retries really tries to address flaky SIM operations on
>> some modems. We could limit the retries to certain error codes, but
>> that won't address flakiness, unfortunately :(
>>
>> We could let individual plugins to configure whether it should retry
>> on failed SIM operations. For a modem that does not support reading
>> IMSI (AT+CIMI), the plugin would set load_imsi / load_imsi_finish to
>> NULL to skip INITIALIZATION_STEP_IMSI altogether.
>>
>
> That is not the only reason in this case. We try to load IMSI and other
> SIM-related stuff before and after PIN unlocking. Loading IMSI may fail
> before SIM unlock, and succeed after SIM unlock (got that case here with
> a Gobi modem) [*]. So, before unlocking the PIN, we're sending AT+CIMI
> three times and in all we get an error. It is probably a good idea to
> retry these commands under certain circumstances, but not sure if they
> should be retried always, for every error. I fear that if we add those
> unconditional retries now they'll end up being there forever and we'll
> never know if they were always needed or not. Can we initially retry
> only if we get some expected error, and add more cases as we see them?
>
> Also, setting load_imsi/load_imsi_finish to NULL should only be done if
> all modems handled by the given plugin are known to have IMSI loading
> unsupported.
>
> [*] Probably we shouldn't try to load IMSI before PIN unlocking.
>
> --
> Aleksander

Let me see if there are certain error codes that may suggest a retry
is needed. My concern is that some modems may provide a flaky
response, which may not even include a valid error code when it fails
to read IMSI. But that should be handled in the modem plugins instead.
I think the MMSim interface should still validate the IMSI value
reported by +CIMI, so I've submitted a smaller patch just for that.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]