Skip to contentSkip to conversation

atmodem: Poll SIM state after entering PIN

PATCH In review Cedric Jehasse 2 participants 2 messages Nov 9, 2012 – Nov 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atmodem: Poll SIM state after entering PIN

From: Cedric Jehasse <[email protected]>

Encountered a problem of CME ERROR 14: SIM busy on Alcatel and Huawei modem. The Huawei modem has a ^SIMST unsollicited sim state indication, but not all Huawei modems support this.
So poll the SIM state, as was already done for ZTE modems.

---
 drivers/atmodem/sim.c    |    2 ++
 drivers/atmodem/vendor.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
drivers/atmodem/sim.c +2 -0
index ea3b180..9f05f4b 100644
@@ -1179,6 +1179,8 @@ static void at_pin_send_cb(gboolean ok, GAtResult *result,
 							FALSE, cbd, g_free);
 		return;
 	case OFONO_VENDOR_ZTE:
+	case OFONO_VENDOR_ALCATEL:
+	case OFONO_VENDOR_HUAWEI:
 		/*
 		 * On ZTE modems, after pin is entered, SIM state is checked
 		 * by polling CPIN as their modem doesn't provide unsolicited
drivers/atmodem/vendor.h +1 -0
index 80aed3e..0532d10 100644
@@ -41,4 +41,5 @@ enum ofono_vendor {
 	OFONO_VENDOR_SIMCOM,
 	OFONO_VENDOR_ICERA,
 	OFONO_VENDOR_WAVECOM_Q2XXX,
+	OFONO_VENDOR_ALCATEL
 };
Signature · 1 line
1.7.1
#1 lore raw

Hi Cedric,

Quoted 10 lines · Cedric Jehasse

From: Cedric Jehasse<[email protected]>

Encountered a problem of CME ERROR 14: SIM busy on Alcatel and Huawei modem. The Huawei modem has a ^SIMST unsollicited sim state indication, but not all Huawei modems support this.
So poll the SIM state, as was already done for ZTE modems.

---
  drivers/atmodem/sim.c    |    2 ++
  drivers/atmodem/vendor.h |    1 +
  2 files changed, 3 insertions(+), 0 deletions(-)

Patch has been applied, however I broke it up into two commits per our Patch Submission Guidelines. See HACKING.

Regards,
-Denis