* [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK.
@ 2010-11-02 15:10 Marit Henriksen
2010-11-02 15:14 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Marit Henriksen @ 2010-11-02 15:10 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
From: Marit Henriksen <marit.henriksen@stericsson.com>
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(-)
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index 94658f2..3abd1d8 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -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:
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK.
2010-11-02 15:10 [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK Marit Henriksen
@ 2010-11-02 15:14 ` Marcel Holtmann
2010-11-02 15:24 ` Denis Kenzior
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2010-11-02 15:14 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]
Hi Marit,
> 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.
> diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
> index 94658f2..3abd1d8 100644
> --- a/drivers/atmodem/sim.c
> +++ b/drivers/atmodem/sim.c
> @@ -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;
> }
Denis, I think we can merge the PIN entering and PUK entering code paths
into one. No need to keep them separate.
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK.
2010-11-02 15:14 ` Marcel Holtmann
@ 2010-11-02 15:24 ` Denis Kenzior
2010-11-02 15:28 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Denis Kenzior @ 2010-11-02 15:24 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
On 11/02/2010 10:14 AM, Marcel Holtmann wrote:
> Hi Marit,
>
>> 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.
>
>> diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
>> index 94658f2..3abd1d8 100644
>> --- a/drivers/atmodem/sim.c
>> +++ b/drivers/atmodem/sim.c
>> @@ -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;
>> }
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK.
2010-11-02 15:24 ` Denis Kenzior
@ 2010-11-02 15:28 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-11-02 15:28 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
Hi Denis,
> >> 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.
> >
> >> diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
> >> index 94658f2..3abd1d8 100644
> >> --- a/drivers/atmodem/sim.c
> >> +++ b/drivers/atmodem/sim.c
> >> @@ -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;
> >> }
> >
> > 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.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-02 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 15:10 [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK Marit Henriksen
2010-11-02 15:14 ` Marcel Holtmann
2010-11-02 15:24 ` Denis Kenzior
2010-11-02 15:28 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.