All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giacinto Cifelli <gciofono@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/6] src/modem: notify lte driver before going online
Date: Fri, 12 Oct 2018 08:19:56 +0200	[thread overview]
Message-ID: <CAKSBH7ESwVXx0V90HuBYVK_xfBOASxpnJ5qJ+hR9ocTVxnuWzw@mail.gmail.com> (raw)
In-Reply-To: <00e1adb6-6a3a-f6ca-82b8-454ef14085e4@southpole.se>

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

On Fri, Oct 12, 2018 at 8:17 AM Jonas Bonn <jonas@southpole.se> wrote:
>
>
>
> On 12/10/18 05:04, Giacinto Cifelli wrote:
> > Hi,
> >
> > On Thu, Oct 11, 2018 at 10:19 PM Jonas Bonn <jonas@southpole.se> wrote:
> >>
> >>
> >> On 10/10/18 08:54, Giacinto Cifelli wrote:
> >>> ---
> >>>    src/modem.c | 2 ++
> >>>    1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/src/modem.c b/src/modem.c
> >>> index 9e254482..74dbe7ad 100644
> >>> --- a/src/modem.c
> >>> +++ b/src/modem.c
> >>> @@ -729,6 +729,8 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *user)
> >>>        case OFONO_SIM_STATE_READY:
> >>>                modem_change_state(modem, MODEM_STATE_OFFLINE);
> >>>
> >>> +             ofono_lte_set_reg_info(modem);
> >>> +
> >> modem_change_state(...OFFLINE) results in the post_sim() implementation
> >> being called.  The drivers that implement the lte atom all call
> >> ofono_lte_create() there.
> >>
> >> Your .._set_reg_info function checks for the existence of the atom and
> >> does some work.  As such, why not just merge the contents of
> >> ofono_lte_set_reg_info() into the at_lte_probe function instead... from
> >> there, it's more obvious what's going on.
> > The point is that the function must be called before set_online
> > (following), and not after post_sim, even if they happen to be
> > together.
>
> set_online only happens in the following line if the modem is "always
> online", which is generally not the case.  For other modems, set_online
> happens elsewhere.
>
> > This is how it works for gprs-context: before activating the context,
> > apn and auth are set.
> >
> > It isn't so obvious to me that the probe function does the work. It is
> > in general the first one to be called, then there is a chance to set
> > the properties one by one, and eventually they are transferred to the
> > modem.
>
> Between "enable" and "online", you have a window to change the settings.
>
> For modems that are "always online", you pretty much have to go
> "enabled/online", perhaps failing to do so(?), change the settings,
> "disable" and "reenable" the modem.  Ugly, yes, but that's the way
> things look right now.
>
> Twiddling the LTE settings just results in context reconfiguration
> (CGDCONT)... this, presumably, does not have any effect on any already
> established context... correct me if I'm wrong.  As such, the changes
> don't really take effect until you've gone offline/online again, anyway.
>
> /Jonas

I have decided to go for the direct application. I am changing the code now.
This part is therefore no longer applicable.

Giacinto

  reply	other threads:[~2018-10-12  6:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  6:54 [PATCH 1/6] lte-api: protocol and authentication properties Giacinto Cifelli
2018-10-10  6:54 ` [PATCH 2/6] lte.h: added proto and authentication handling Giacinto Cifelli
2018-10-10  6:54 ` [PATCH 3/6] src/lte: " Giacinto Cifelli
2018-10-11 20:07   ` Jonas Bonn
2018-10-12  2:57     ` Giacinto Cifelli
2018-10-12  3:43   ` Denis Kenzior
2018-10-12  6:36     ` Giacinto Cifelli
2018-10-12 17:47       ` Denis Kenzior
2018-10-10  6:54 ` [PATCH 5/6] atmodem/lte: " Giacinto Cifelli
2018-10-11 19:51   ` Jonas Bonn
2018-10-12  2:54     ` Giacinto Cifelli
2018-10-12  3:56   ` Denis Kenzior
2018-10-12  4:56     ` Giacinto Cifelli
2018-10-10  6:54 ` [PATCH 4/6] src/modem: notify lte driver before going online Giacinto Cifelli
2018-10-11 20:19   ` Jonas Bonn
2018-10-12  3:04     ` Giacinto Cifelli
2018-10-12  6:17       ` Jonas Bonn
2018-10-12  6:19         ` Giacinto Cifelli [this message]
2018-10-10  6:54 ` [PATCH 6/6] Gemalto contributors Giacinto Cifelli
2018-10-12  4:10   ` Denis Kenzior
2018-10-12  4:15     ` Giacinto Cifelli
2018-10-11 19:07 ` [PATCH 1/6] lte-api: protocol and authentication properties Jonas Bonn
2018-10-12  2:41   ` Giacinto Cifelli
2018-10-12  4:06     ` Denis Kenzior
2018-10-12  4:13       ` Giacinto Cifelli

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=CAKSBH7ESwVXx0V90HuBYVK_xfBOASxpnJ5qJ+hR9ocTVxnuWzw@mail.gmail.com \
    --to=gciofono@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.