All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 0/2] Add ResetProperties method to ConnectionContext interface
Date: Mon, 23 Feb 2015 09:47:40 -0600	[thread overview]
Message-ID: <54EB4B9C.3060505@gmail.com> (raw)
In-Reply-To: <CAAVgdeFqOXKC+8=ce-g6Yg4gE+TuxhAOLkxxFqnfzPt6nV5bgA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3308 bytes --]

Hi Tommi,

 >> Why don't you just remove the settings file and restart oFono?
> oFono handles many other services so restarting would have undesirable effects.
> For a moment clients would think there is no telephony at all: no SIM,
> no cellular signal strength, no voice/emergency calls, no SIM ATK etc.
>

Which is probably OK given that you're resetting cellular settings. 
Unless you expect the user to know / have control over very fine-grained 
details.

>>> Deactivation of the context is obviously mandatory. The reasoning for placing
>>> this into ofono is handling client requests consistently and avoiding race
>>> conditions. Using this approach ofono does not re-activate the context, that's
>>> done by ConnMan or whatever connection manger the system uses.
>>>
>> I'm not so sure that this is a good idea.  A 'live' reset of the
>> settings just seems wrong to me.  Why would you ever want to do that
>> anyway?  If something is working, why bother resetting the settings?
> Generally speaking I agree with the point of view. The main point was
> not the 'live' part, but to allow running provisioning again, e.g. if
> user has set wrong ones.

Then this has to be done with Powered = False as a prerequisite.  And 
you need some way to tell ConnMan what is happening and why.  Since 
someone still has to go in and activate the new contexts afterwards.

> FYI a MMS context may be active using a correct APN but messages don't
> flow due to a wrong proxy. In such a case context remains active for
> some time.

I don't get it, if the proxy is wrong, it must have been provisioned 
that way.  How is re-provisioning going to help?  Either way, it sounds 
like you want the UI to reset a particular context's settings, not 
everything.

>
>> oFono supports arbitrary number of contexts, so your UI can always add
>> more.  So if you need to re-provision, let your UI handle this.  The UI
>> should be capable of reading the provisioning database anyway in order
>> to handle duplicates, etc.
> When ofono already implements the initial provisioning logic it is not
> tempting to duplicate it but instead trigger it again.

Not tempting, no.  Provisioning is there to handle simple cases.  E.g. 
user receives new device, turns it on and gets connected.  If you want 
the user to mess with the settings, or if your database might contain 
ambiguous information, then you need to write a proper UI.  One that can 
read the provisioning database as well and present choices to the user.

> (A more suitable name for the new method could be  "ProvisiongContext"
> or similar.)
> If reverting provisioned settings is done by creating a new empty
> context, one would still want to run ofono provisioning for that
> (ofono restart not an option).

The problem is there's really no mapping between what the provisioning 
database returns and what the settings are right now.  You can sort of 
kludge around by comparing the context type, but you might be 
over-writing the wrong context.

The better way is to wipe all existing settings and re-populate.  But 
that would require quite a bit of ContextRemoved, ContextAdded signals 
to keep the clients consistent.

Might be easier to just re-boot the gprs atom.

Regards,
-Denis

  reply	other threads:[~2015-02-23 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 12:31 Re: [PATCH 0/2] Add ResetProperties method to ConnectionContext interface Tommi Kenakkala
2015-02-23 15:47 ` Denis Kenzior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-02-19 11:59 Tommi Kenakkala
2015-02-20 16:00 ` 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=54EB4B9C.3060505@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.