From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 2/3] modem: add EmergencyMode property
Date: Wed, 10 Nov 2010 08:25:28 -0600 [thread overview]
Message-ID: <4CDAAB58.20000@gmail.com> (raw)
In-Reply-To: <4CDAA8E0.3040403@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 3034 bytes --]
Hi Andras,
>> So we have to be a bit careful here. You can't simply call
>> modem_change_state here. This results in calling the post_online
>> method, which populates the atoms that function when the radio is on.
>> Instead you need to call the set_online driver method directly.
>>
>> Also, you probably do not want to populate the online atoms in an
>> emergency call situation. Each atom driver / atom will perform
>> initialization procedures when they're newly added. This can
>> potentially interfere with the voice call setup time, and not desirable.
>> Not to mention that if we're actually in an emergency situation with
>> the SIM removed or PIN locked, we do not want to populate the atoms in
>> the first place.
>>
>> So the modem 'ONLINE_STATE' has to be slightly de-coupled from whether
>> the radio is 'online'.
>>
>>
> Good point, thanks. I am going to call directly the modem driver
> set_online function with my own callback.
>
> Now the question is whether modem->online should be toggled
> according to the radio state changes? I think yes, and have the
> change signaled on D-Bus (modem "Online" poperty).
That makes sense to me, yes.
>
> There is another question then, when to notify the modem online
> watchers, supposedly whenever modem->online changes, including
> the changes triggered by the emergency call case.
In the current structure this is just fine. So let us run with it for
now and see what happens. In the future we might find something a bit
more complicated is required, but we cross that bridge when we come to it.
>
>>> +}
>>> +
>>> +void ofono_modem_dec_emergency_mode(struct ofono_modem *modem)
>>> +{
>>> + DBusConnection *conn = ofono_dbus_get_connection();
>>> + const char *path = ofono_modem_get_path(modem);
>>> + gboolean state = FALSE;
>>> +
>>> + modem->emergency_mode--;
>>> + if (modem->emergency_mode)
>>> + return;
>>> +
>>> + ofono_dbus_signal_property_changed(conn, path,
>>> + OFONO_MODEM_INTERFACE,
>>> + "EmergencyMode",
>>> + DBUS_TYPE_BOOLEAN,
>>> + &state);
>>>
>> Here you should turn the radio off if it was off before starting the
>> emergency call.
>>
>>
>
> The rationale behind leaving the radio on after emergency calls
> was to have the theoretical possibility the emergency call center
> to call you back (when SIM card is present...). If this is an unrealistic
> scenario, I'll disable the radio after emergency calls in case it was off
> before the call.
>
That is a fair point, however, just silently leaving us Online might not
be a good idea.
I suggest finding out how exactly this is supposed to work. E.g. can we
get away with starting an X minute timeout every time we leave emergency
mode and go offline automatically? This timeout would obviously have to
be canceled if the user sets Online manually.
Regards,
-Denis
next prev parent reply other threads:[~2010-11-10 14:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 8:56 [PATCH 0/3] Emergency Calls (2nd round) Andras Domokos
2010-11-09 8:59 ` [RFC PATCH 1/3] modem: add modem online-offline watch Andras Domokos
2010-11-09 10:31 ` Marcel Holtmann
2010-11-09 14:26 ` Denis Kenzior
2010-11-09 8:59 ` [RFC PATCH 2/3] modem: add EmergencyMode property Andras Domokos
2010-11-09 14:37 ` Denis Kenzior
2010-11-10 14:14 ` Andras Domokos
2010-11-10 14:25 ` Denis Kenzior [this message]
2010-11-10 17:59 ` Marcel Holtmann
2010-11-09 9:00 ` [RFC PATCH 3/3] voicecall: add emergency call handling Andras Domokos
2010-11-09 14:52 ` 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=4CDAAB58.20000@gmail.com \
--to=denkenz@gmail.com \
--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 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.