From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH 2/2] atmodem: Add use of pin event *EPEV after sending PUK.
Date: Tue, 02 Nov 2010 16:28:40 +0100 [thread overview]
Message-ID: <1288711720.3322.177.camel@aeonflux> (raw)
In-Reply-To: <4CD02D20.5090502@gmail.com>
[-- 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
prev parent reply other threads:[~2010-11-02 15:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288711720.3322.177.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox