Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] mbm: poll SIM status when initializing
Date: Wed, 14 Jul 2010 11:00:17 -0500	[thread overview]
Message-ID: <4C3DDF11.4070505@gmail.com> (raw)
In-Reply-To: <1279122224-5274-1-git-send-email-Pekka.Pessi@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

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

  reply	other threads:[~2010-07-14 16:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 15:43 [PATCH] mbm: poll SIM status when initializing Pekka.Pessi
2010-07-14 16:00 ` Denis Kenzior [this message]
2010-07-14 16:15   ` Pekka Pessi
  -- strict thread matches above, loose matches on Subject: below --
2010-07-14 16:28 Pekka.Pessi
2010-07-14 16:40 ` Denis Kenzior
2010-07-15 14:05   ` Pekka.Pessi
2010-07-15 14:20     ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C3DDF11.4070505@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox