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



> For (1), the 'Modem' interface has a generic 'modem_after_sim_unlock'
> step which allows plugin implementations to provide a method to (try to)
> ensure that the SIM access is valid. Some plugins may just provide a N
> second timeout to be run in that step. I didn't want to provide a
> generic implementation of that step, as that would affect every modem
> out there, but maybe it's not a bad idea after all... a 3s timeout after
> PIN unlock could solve most of the issues; or not.
>
> Regarding (2), not sure what to do with that. Maybe that specific modem
> requires a longer time to settle down after sim unlock; so a longer wait
> time needed? This specific case is hard to handle, as the modem does not
> tell 'sim not ready' errors or the like that we can detect and act upon.
>
> Why don't you add the N second timeout after sim unlock and see how it
> behaves? Check for other plugins already doing it.

IIUC, modem_after_sim_unlock is only called (via
restart_initialize_idle) when the SIM lock state transitions out from
LOCKED. So we will need some plugin specific handling after getting
CPIN READY for an unlocked SIM and before initializing MMSim.

Adding some delay (e.g. 3s) after CPIN READY does seem to make
subsequent SIM operations (reading ICCID, IMSI, etc) more reliable. I
need more experimental data to determine how long the delay should be
for the modems I have.


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