From: Christopher Vogl <christopher.vogl@hale.at>
To: ofono@ofono.org
Subject: Re: [PATCH 1/8] telit: notify sim inserted when sim ready
Date: Mon, 20 Aug 2012 16:34:45 +0200 [thread overview]
Message-ID: <50324B05.1080807@hale.at> (raw)
In-Reply-To: <5028FFC6.2030807@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]
Hi Denis,
On 13/08/12 15:23, Denis Kenzior wrote:
> Hi Christopher,
>
> On 08/13/2012 08:16 AM, Christopher Vogl wrote:
>>
>> static void switch_sim_state_status(struct ofono_modem *modem, int
>> status)
>> {
>> struct telit_data *data = ofono_modem_get_data(modem);
>> @@ -238,16 +223,13 @@ static void switch_sim_state_status(struct
>> ofono_modem *modem, int status)
>> break;
>> case 1:
>> DBG("SIM inserted");
>> - /* We need to sleep a bit */
>> - data->sim_inserted_source = g_timeout_add_seconds(1,
>> - sim_inserted_timeout_cb,
>> - modem);
>> break;
>> case 2:
>> DBG("SIM inserted and PIN unlocked");
>> break;
>> case 3:
>> DBG("SIM inserted and ready");
>> + ofono_sim_inserted_notify(data->sim, TRUE);
>> break;
>> }
>
> According to Telit documentation 1 is inserted, 2 is inserted and pin
> unlocked, 3 is unlocked and phonebook ready. How do you plan on
> handling PIN-locked SIMs? You can't run commands such as EnterPin
> until the sim is at least inserted.
Yes you are perfectly right, I can't do it that way. Working with an
unlocked PIN is not always a good idea.
>
> You might need to do the same thing as we did for e.g. IFX and STE.
> notify sim insertion on #QSS: 1, and only return from CPIN once #QSS:
> 3 has been sent. See drivers/atmodem/sim.c at_epev_notify() or
> at_xsim_notify() for an example.
This works fine in case the PIN is locked, but has the unpleasant side
effect that I receive a timeout when calling the D-Bus method to enter
the PIN because #QSS: 3 takes so long (e.g. 32 seconds from entering the
PIN until a #QSS: 3).
If the PIN is unlocked I will never get to at_pin_send_cb(), where
+XSIM, *EPEV or #QSS are registered, and ofono will step to post-sim
phase (where sms and phonebook atoms are created) immediately without
waiting for #QSS: 3.
Regards,
Christopher
--
Scanned by MailScanner.
next prev parent reply other threads:[~2012-08-20 14:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 13:16 [PATCH 1/8] telit: notify sim inserted when sim ready Christopher Vogl
2012-08-13 13:23 ` Denis Kenzior
2012-08-20 14:34 ` Christopher Vogl [this message]
2012-08-20 14:50 ` Denis Kenzior
2012-08-20 15:20 ` Christopher Vogl
2012-08-20 15:42 ` Denis Kenzior
2012-08-22 14:24 ` [PATCH] sim: return from CPIN when SIM unlocked for telit Christopher Vogl
2012-08-22 14:24 ` [PATCH] telit: sim status notification without polling Christopher Vogl
2012-08-23 14:21 ` Denis Kenzior
2012-08-23 16:00 ` Christopher Vogl
2012-08-23 17:37 ` Denis Kenzior
2012-08-24 10:26 ` Christopher Vogl
2012-08-28 15:19 ` Christopher Vogl
2012-08-28 14:53 ` Denis Kenzior
2012-08-29 15:01 ` [PATCH] telit: enable extended sim status notification Christopher Vogl
2012-08-30 14:46 ` Denis Kenzior
2012-08-22 23:44 ` [PATCH] sim: return from CPIN when SIM unlocked for telit Denis Kenzior
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=50324B05.1080807@hale.at \
--to=christopher.vogl@hale.at \
--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