Hi Denis,

2010/7/14 Denis Kenzior <[email protected]>:
>> @@ -99,17 +102,35 @@ static void simpin_check(gboolean ok, GAtResult 
>> *result, gpointer user_data)
>>
>>       DBG("");
>>
>> -     /* Modem returns error if there is no SIM in slot */
>> +     /* Modem returns +CME ERROR: 10 if SIM is not ready. */
>> +     if (!ok && result->final_or_pdu &&
>> +             !strcmp(result->final_or_pdu, "+CME ERROR: 10")) {
>> +             g_timeout_add_seconds(1, init_simpin_check, modem);
>> +             return;
>> +     }
>> +
>> +     /* Modem returns ERROR if there is no SIM in slot. */
>
> What if the modem has no SIM present at all?  You might want to set a
> retry threshold so that we don't poll the modem into oblivion.

If there is no SIM, +CPIN? returns plain ERROR (as I try to explain in
the comment above).

+CME ERROR: 10 is returned while modem is busy trying to connect with
the SIM card.

I'll add a check to stop polling after 5 seconds.

-- 
Pekka.Pessi mail at nokia.com
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to