Open Source Telephony
 help / color / mirror / Atom feed
From: Piotr Haber <gluedig@gmail.com>
To: ofono@ofono.org
Subject: [PATCH] telit: register SIM if it goes straight to ready
Date: Wed, 08 Feb 2017 10:25:37 +0100	[thread overview]
Message-ID: <20170208092537.26073-1-gluedig@gmail.com> (raw)

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

SIM without PIN goes straight to state 3 (INSERTED and READY)
on some modem/firmware versions.
---
 plugins/telit.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/plugins/telit.c b/plugins/telit.c
index 19898f95..b194b65a 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -175,6 +175,11 @@ static void switch_sim_state_status(struct ofono_modem *modem, int status)
 		}
 		break;
 	case 3:	/* SIM inserted, SMS and phonebook ready */
+		if (data->have_sim == FALSE) {
+			ofono_sim_inserted_notify(data->sim, TRUE);
+			data->have_sim = TRUE;
+		}
+
 		if (data->sms_phonebook_added == FALSE) {
 			ofono_phonebook_create(modem, 0, "atmodem", data->chat);
 			ofono_sms_create(modem, 0, "atmodem", data->chat);
-- 
2.11.0


             reply	other threads:[~2017-02-08  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08  9:25 Piotr Haber [this message]
2017-02-08 16:55 ` [PATCH] telit: register SIM if it goes straight to ready 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=20170208092537.26073-1-gluedig@gmail.com \
    --to=gluedig@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