diff options
author | Anthony Viallard <viallard@syscom-instruments.com> | 2013-03-22 11:36:17 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2013-04-01 21:38:26 -0500 |
commit | 8650c1019ae5f4cf779364ae02a711f6db12ba2c (patch) | |
tree | e0945031edd991e24da193a5d895affee7c88c96 /drivers/atmodem/sim.c | |
parent | b0ad1ecb8fff1eac095eeff39ad50022c6bb8997 (diff) |
sim: Add SIMCOM SIM card ready quirk
SIM is busy right after pin is entered. Use the quirk which
add a CPIN? pooling check until having "CPIN: READY" answer.
Diffstat (limited to 'drivers/atmodem/sim.c')
-rw-r--r-- | drivers/atmodem/sim.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c index 4448e3da..f97f5b87 100644 --- a/drivers/atmodem/sim.c +++ b/drivers/atmodem/sim.c @@ -1252,10 +1252,17 @@ static void at_pin_send_cb(gboolean ok, GAtResult *result, 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 + * got a "+CME ERROR: 14" for the "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, |