atmodem: Poll SIM state after entering PIN
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
@@ -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
@@ -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
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