Hi Pekka,

> @@ -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.

Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to