Open Source Telephony
 help / color / mirror / Atom feed
From: Anthony Viallard <viallard@syscom-instruments.com>
To: ofono@ofono.org
Subject: [PATCH 3/4] SIMCOM SIM card ready quirk
Date: Fri, 22 Mar 2013 11:36:17 +0100	[thread overview]
Message-ID: <1363948578-24128-3-git-send-email-viallard@syscom-instruments.com> (raw)
In-Reply-To: <1363948578-24128-1-git-send-email-viallard@syscom-instruments.com>

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

Add a quirk for waiting SIM availability.

SIM is busy right after pin is entered. Use the quirk which
add a CPIN? pooling check until having "CPIN: READY" answer.

diff -pruN ofono-1.12.orig/drivers/atmodem/sim.c ofono-1.12/drivers/atmodem/sim.c
--- ofono-1.12.orig/drivers/atmodem/sim.c	2013-01-23 11:38:22.959609087 +0100
+++ ofono-1.12/drivers/atmodem/sim.c	2013-01-23 11:57:52.602608948 +0100
@@ -1023,12 +1023,18 @@ static void at_pin_send_cb(gboolean ok,
 							FALSE, cbd, g_free);
 		return;
 	case OFONO_VENDOR_ZTE:
 	case OFONO_VENDOR_ALCATEL:
 	case OFONO_VENDOR_HUAWEI:
+	case OFONO_VENDOR_SIMCOM:
 		/*
 		 * On ZTE modems, after pin is entered, SIM state is checked
 		 * by polling CPIN as their modem doesn't provide unsolicited
 		 * notification of SIM readiness.
+		 *
+		 * On SIMCOM modems, SIM is busy after pin is entered (we've
+		 * got an "+CME ERROR: 14" at "AT+CPIN?" request) and ofono
+		 * don't catch the "+CPIN: READY" message sent by the modem
+		 * when SIM is ready. So, use extra CPIN to check the state.
 		 */
 		sd->sim_state_query = at_util_sim_state_query_new(sd->chat,
 						2, 20, sim_state_cb, cbd,

  parent reply	other threads:[~2013-03-22 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 10:36 [PATCH 1/4] SIMCOM plugin driver Anthony Viallard
2013-03-22 10:36 ` [PATCH 2/4] SIMCOM AT+CNMI quirk Anthony Viallard
2013-04-02  2:35   ` Denis Kenzior
2013-03-22 10:36 ` Anthony Viallard [this message]
2013-04-02  2:39   ` [PATCH 3/4] SIMCOM SIM card ready quirk Denis Kenzior
2013-03-22 10:36 ` [PATCH 4/4] SIMCOM signal strength reporting quirk Anthony Viallard
2013-04-02  2:40   ` Denis Kenzior
2013-04-02  2:33 ` [PATCH 1/4] SIMCOM plugin driver 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=1363948578-24128-3-git-send-email-viallard@syscom-instruments.com \
    --to=viallard@syscom-instruments.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