atmodem: Add use of pin event *EPEV after sending PUK.
PATCH 2/2 atmodem: Add use of pin event *EPEV after sending PUK.
From: Marit Henriksen <[email protected]>
The MBM/STE modems send the unsolicited result code *EPEV to report when the PIN code has been inserted and accepted.
--- drivers/atmodem/sim.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/atmodem/sim.c +10 -0
@@ -671,6 +671,16 @@ static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, at_xsim_notify, FALSE, cbd, g_free);return ; +case OFONO_VENDOR_MBM : +/* +* On the MBM modem, AT+CPIN? keeps returning SIM PIN +* for a moment after successful AT+CPIN="..", but then +* sends *EPEV when that changes. +*/ + sd->ready_id =g_at_chat_register (sd->chat,"*EPEV" , + at_epev_notify, + FALSE, cbd, g_free); +return ; } done:
Signature · 1 line
1.7.0.4
Hi Marit,
Quoted 2 lines
The MBM/STE modems send the unsolicited result code *EPEV to report when the PIN code has been inserted and accepted.
I almost thought so, but I was not sure when adapting this for IFX.
Quoted 9 lines
drivers/atmodem/sim.c +1
-0@@ -671,6 +671,16 @@ static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, at_xsim_notify, FALSE, cbd, g_free);return ; +case OFONO_VENDOR_MBM :
drivers/atmodem/sim.c static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, · line 684
Quoted 10 lines
drivers/atmodem/sim.c +9
-0+/* +* On the MBM modem, AT+CPIN? keeps returning SIM PIN +* for a moment after successful AT+CPIN="..", but then +* sends *EPEV when that changes. +*/ + sd->ready_id =g_at_chat_register (sd->chat,"*EPEV" , + at_epev_notify, + FALSE, cbd, g_free); +return ; }
Denis, I think we can merge the PIN entering and PUK entering code paths into one. No need to keep them separate.
Regards
Marcel
Quoted 21 lines · Marcel Holtmann
Hi Marit,
Quoted 2 lines
The MBM/STE modems send the unsolicited result code *EPEV to report when the PIN code has been inserted and accepted.
I almost thought so, but I was not sure when adapting this for IFX.
Quoted 14 lines
drivers/atmodem/sim.c +6
-0@@ -671,6 +671,16 @@ static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, at_xsim_notify, FALSE, cbd, g_free);return ; +case OFONO_VENDOR_MBM : +/* +* On the MBM modem, AT+CPIN? keeps returning SIM PIN +* for a moment after successful AT+CPIN="..", but then +* sends *EPEV when that changes. +*/
Quoted 9 lines
drivers/atmodem/sim.c static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, · line 684
Quoted 5 lines
drivers/atmodem/sim.c +4
-0+ sd->ready_id =g_at_chat_register (sd->chat,"*EPEV" , + at_epev_notify, + FALSE, cbd, g_free); +return ; }Denis, I think we can merge the PIN entering and PUK entering code paths into one. No need to keep them separate.
Or refactor the EPEV registration into a separate function. But either is fine with me.
Regards,
-Denis
Hi Denis,
Quoted 29 lines
Quoted 19 lines
Quoted 2 lines
The MBM/STE modems send the unsolicited result code *EPEV to report when the PIN code has been inserted and accepted.
I almost thought so, but I was not sure when adapting this for IFX.
Quoted 14 lines
drivers/atmodem/sim.c +6
-0@@ -671,6 +671,16 @@ static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, at_xsim_notify, FALSE, cbd, g_free);return ; +case OFONO_VENDOR_MBM : +/* +* On the MBM modem, AT+CPIN? keeps returning SIM PIN +* for a moment after successful AT+CPIN="..", but then +* sends *EPEV when that changes. +*/ Quoted 9 lines
drivers/atmodem/sim.c static void at_pin_send_puk_cb(gboolean ok, GAtResult *result, · line 684
Quoted 5 lines
drivers/atmodem/sim.c +4
-0+ sd->ready_id =g_at_chat_register (sd->chat,"*EPEV" , + at_epev_notify, + FALSE, cbd, g_free); +return ; }Denis, I think we can merge the PIN entering and PUK entering code paths into one. No need to keep them separate.
Quoted 2 lines
Or refactor the EPEV registration into a separate function. But either is fine with me.
I actually meant combining at_pin_send_puk_cb and at_pin_send_cb into one function. Since their code should now be identical.
Regards
Marcel