From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 8/8] Fix gprs_netreg_update behaviour if PPP connection active
Date: Sun, 17 Feb 2019 22:00:28 -0600 [thread overview]
Message-ID: <d8ef35d1-2ffa-29f9-35a2-ad01e1fc3938@gmail.com> (raw)
In-Reply-To: <20190215121142.28163-9-philippedeswert@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3438 bytes --]
Hi Tommi,
On 02/15/2019 06:11 AM, philippedeswert(a)gmail.com wrote:
> From: Tommi Rekosuo <tommi.rekosuo@treon.fi>
>
> If a PPP connection is active, the modem can't detach before
> the PPP connection has been disabled. This can happen if
I don't believe this is true for every modem. What exactly is your
modem doing here? A log might be a good start.
> RoamingAllowed is changed when connection is active.
Note that on LTE, oFono shouldn't really issue a detach when
RoamingAllowed is toggled. Roaming on LTE cannot work in the same way
as on 3G.
27.007 still sort of mandates that a +CGATT on LTE should trigger a
detach from PS, and that would obviously trigger a full disconnect and
reconnect. So oFono core should be fixed not to do that if you want to
support roaming on LTE properly.
This was discussed earlier here (and maybe in a few other threads)
https://lists.ofono.org/pipermail/ofono/2018-September/018514.html
https://lists.ofono.org/pipermail/ofono/2018-September/018535.html
> This leaves connman in undefined state as the context
> 'Active' state is not propagated properly and connman
> still thinks we are connected. > ---
> src/gprs.c | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/src/gprs.c b/src/gprs.c
> index f1146d06..9df273b1 100644
> --- a/src/gprs.c
> +++ b/src/gprs.c
> @@ -1547,18 +1547,26 @@ static void release_active_contexts(struct ofono_gprs *gprs)
> {
> GSList *l;
> struct pri_context *ctx;
> + DBusConnection *conn;
> + dbus_bool_t value;
>
> for (l = gprs->contexts; l; l = l->next) {
> struct ofono_gprs_context *gc;
>
> ctx = l->data;
>
> - if (ctx->active == FALSE)
> + DBG("Context id: %d", ctx->context.cid);
> +
> + if (ctx->active == FALSE) {
> + DBG("Context not active");
> continue;
> + }
This seems to be debug code and is extraneous. If you really want this
for some reason, then use a separate commit
>
> /* This context is already being messed with */
> - if (ctx->pending)
> + if (ctx->pending) {
> + DBG("Context in pending state");
> continue;
> + }
as above
>
> gc = ctx->context_driver;
>
> @@ -1567,6 +1575,11 @@ static void release_active_contexts(struct ofono_gprs *gprs)
>
> /* Make sure the context is properly cleared */
> release_context(ctx);
> + value = ctx->active;
> + conn = ofono_dbus_get_connection();
> + ofono_dbus_signal_property_changed(conn, ctx->path,
> + OFONO_CONNECTION_CONTEXT_INTERFACE,
> + "Active", DBUS_TYPE_BOOLEAN, &value);
release_active_contexts isn't really meant to send any signals. It is
meant to clean up and syncronize state between gprs and gprs_context
drivers.
I suspect you need to give a bit more information about what is actually
going on. As mentioned earlier, RoamingAllowed on LTE is a bit of a mess.
> }
> }
>
> @@ -1688,6 +1701,13 @@ static void gprs_netreg_update(struct ofono_gprs *gprs)
> return;
> }
>
> + /* If PPP session if active it needs to be disconnected
> + * before the driver can send at commands */
> + if (!attach) {
> + DBG("Release active contexts");
> + release_active_contexts(gprs);
> + }
> +
> gprs->flags |= GPRS_FLAG_ATTACHING;
>
> gprs->driver_attached = attach;
>
Regards,
-Denis
prev parent reply other threads:[~2019-02-18 4:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 12:11 [PATCH 0/8] [RFC] Support for serial u-blox NB-IoT modems philippedeswert
2019-02-15 12:11 ` [PATCH 1/8] ublox-serial: add new plugin for u-blox philippedeswert
2019-02-16 12:25 ` Jonas Bonn
2019-02-16 13:55 ` Philippe De Swert
2019-02-17 14:46 ` Jonas Bonn
2019-02-17 15:08 ` Jonas Bonn
2019-02-15 12:11 ` [PATCH 2/8] Makefile.am : include new u-blox serial modem driver philippedeswert
2019-02-15 12:11 ` [PATCH 3/8] gprs.h: Add ofono_gprs_get_netreg function philippedeswert
2019-02-15 12:11 ` [PATCH 4/8] gprs.c: " philippedeswert
2019-02-15 12:11 ` [PATCH 5/8] atmodem/gprs.c: Add CEREG support philippedeswert
2019-02-18 4:04 ` Denis Kenzior
2019-02-15 12:11 ` [PATCH 6/8] gprs-context : Force use of atd99 philippedeswert
2019-02-18 3:08 ` Denis Kenzior
2019-02-18 16:42 ` Reinhard Speyerer
2019-03-13 8:19 ` Jonas Bonn
2019-03-13 13:00 ` Reinhard Speyerer
2019-03-15 12:37 ` Philippe De Swert
2019-02-15 12:11 ` [PATCH 7/8] common: Add new NB-IoT technologies philippedeswert
2019-02-18 3:19 ` Denis Kenzior
2019-02-15 12:11 ` [PATCH 8/8] Fix gprs_netreg_update behaviour if PPP connection active philippedeswert
2019-02-18 4:00 ` Denis Kenzior [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=d8ef35d1-2ffa-29f9-35a2-ad01e1fc3938@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox