Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH 1/3] mbm: fix initial polling for sim
Date: Thu, 19 Aug 2010 10:41:44 +0200	[thread overview]
Message-ID: <1282207304.23399.162.camel@localhost.localdomain> (raw)
In-Reply-To: <1282207087-16257-1-git-send-email-Pekka.Pessi@nokia.com>

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

Hi Pekka,

> There seems to be no specific error codes returned when SIM is missing. Poll
> at least 5 times upon an error and give up after that.
> ---
>  plugins/mbm.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/plugins/mbm.c b/plugins/mbm.c
> index 6f71553..bebf5aa 100644
> --- a/plugins/mbm.c
> +++ b/plugins/mbm.c
> @@ -108,10 +108,8 @@ static void simpin_check(gboolean ok, GAtResult *result, gpointer user_data)
>  
>  	DBG("");
>  
> -	/* Modem returns +CME ERROR: 10 if SIM is not ready. */
> -	if (!ok && result->final_or_pdu &&
> -			!strcmp(result->final_or_pdu, "+CME ERROR: 10") &&
> -			data->cpin_poll_count++ < 5) {
> +	/* Modem returns an error if SIM is not ready. */
> +	if (!ok && data->cpin_poll_count++ < 5) {
>  		data->cpin_poll_source =
>  			g_timeout_add_seconds(1, init_simpin_check, modem);

maybe the STE modem is a bit more specific here than the MBM one. Which
MBM modem did you test this with?

Regards

Marcel



  parent reply	other threads:[~2010-08-19  8:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19  8:38 [PATCH 1/3] mbm: fix initial polling for sim Pekka.Pessi
2010-08-19  8:38 ` [PATCH 2/3] mbm: retry modem init Pekka.Pessi
2010-08-19  8:38   ` [PATCH 3/3] mbm: register gprs as STE to utilize STE quirks Pekka.Pessi
2010-08-19  8:45     ` Marcel Holtmann
2010-08-20 12:14       ` Marcel Holtmann
2010-08-19  8:43   ` [PATCH 2/3] mbm: retry modem init Marcel Holtmann
2010-08-19  8:41 ` Marcel Holtmann [this message]
2010-08-19  8:59   ` [PATCH 1/3] mbm: fix initial polling for sim Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-08-19 14:49     ` Pekka Pessi

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=1282207304.23399.162.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --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