Hi Bertrand,
> This is wrong code. So in case CFUN=1 fails, you still go ahead
and
> query the SIM state. That is rather pointless and might result on
> unforseen feedback from the modem.
>
> In addition you do not handle the set_powered in case ^SYSINFO fails or
> you have polled max attempts.
>
> Now looking over this. I do not like this at all. Please do not copy any
> code from Huawei plugin and write this from scratch based on actual
> traces and the documentation.
I totally agree, I will rework this part.
I will set the powered flag after CFUN, and use the SYSINFO to broadcast SIM info
(available or not).
please post OFONO_AT_DEBUG traces to the mailing list first.
If you wanna handle some fake CDMA SIM states, then we might need a
simplified SIM atom driver for CDMA as well. Or something only CDMA
specific.
Otherwise the check for a valid CDMA SIM, ROM SIM or whatever they call
it should be done during the enable callback handling. If it is not
there, then it is not there. Nothing you can do about it anyway. Failing
the modem enabling seems to be the best approach in my book.
Regards
Marcel