Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: ofono: cellular service disconnect makes it disappear
(Christophe Ronco)
2. [PATCH 1/3] session: Maintain bearer priority in session
policy file (Daryl Nebrich)
3. [PATCH 2/3] session: Check service priority when matching a
new service (Daryl Nebrich)
4. [PATCH 3/3] session: Check for other available services on
service lost (Daryl Nebrich)
5. Re: ofono: cellular service disconnect makes it disappear
(Andr? Draszik)
6. Re: ofono: cellular service disconnect makes it disappear
(Andr? Draszik)
7. Re: ofono: cellular service disconnect makes it disappear
(Andr? Draszik)
8. Re: ofono: cellular service disconnect makes it disappear
(Denis Kenzior)
----------------------------------------------------------------------
Message: 1
Date: Fri, 3 Feb 2017 15:24:51 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: Re: ofono: cellular service disconnect makes it disappear
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hello,
I'm new to connman and follow ofono list since beginning of this year.
There has been a few patches recently in ofono about Telit modem LE910
(mainly done by Piotr Haber).
These patches are now in master branch but after version 1.19 (last
patch has been pushed yesterday).
I use connman 1.33, the latest version of ofono and a LE910EU V2 modem
and I am able to see cellular service after disconnection.
root@klk-lpbs-040070:~ # connmanctl services
*AO Wired ethernet_7076ff0100b5_cable
*A Orange F cellular_208016202395143_context1
root@klk-lpbs-040070:~ # connmanctl connect
cellular_208016202395143_context1
Connected cellular_208016202395143_context1
root@klk-lpbs-040070:~ # connmanctl services
*AO Wired ethernet_7076ff0100b5_cable
*AR Orange F cellular_208016202395143_context1
root@klk-lpbs-040070:~ # connmanctl disconnect
cellular_208016202395143_context1
Disconnected cellular_208016202395143_context1
root@klk-lpbs-040070:~ # connmanctl services
*AO Wired ethernet_7076ff0100b5_cable
*A Orange F cellular_208016202395143_context1
So your problem might be more in Ofono than in Connman.
Christophe
------------------------------
Message: 2
Date: Fri, 3 Feb 2017 09:47:08 -0500
From: Daryl Nebrich <[email protected]>
To: [email protected]
Subject: [PATCH 1/3] session: Maintain bearer priority in session
policy file
Message-ID: <[email protected]>
The session_policy_local files can have multiple services listed in
AllowedBearers.
The order was not being maintained by apply_policy_on_bearers(). Reversed loop
order so that the priority order in policy file is maintained.
---
src/session.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/session.c b/src/session.c
index 267477b..62c3df0 100644
--- a/src/session.c
+++ b/src/session.c
@@ -686,18 +686,18 @@ static int parse_bearers(DBusMessageIter *iter, GSList
**list)
return 0;
}
-static void filter_bearer(GSList *policy_bearers,
- enum connman_service_type bearer,
+static void filter_bearer(GSList *bearers,
+ enum connman_service_type policy,
GSList **list)
{
- enum connman_service_type policy;
+ enum connman_service_type bearer;
GSList *it;
- if (!policy_bearers)
+ if (!bearers)
return;
- for (it = policy_bearers; it; it = it->next) {
- policy = GPOINTER_TO_INT(it->data);
+ for (it = bearers; it; it = it->next) {
+ bearer = GPOINTER_TO_INT(it->data);
if (policy != bearer)
continue;
@@ -710,15 +710,15 @@ static void filter_bearer(GSList *policy_bearers,
static void apply_policy_on_bearers(GSList *policy_bearers, GSList *bearers,
GSList **list)
{
- enum connman_service_type bearer;
+ enum connman_service_type policy_bearer;
GSList *it;
*list = NULL;
- for (it = bearers; it; it = it->next) {
- bearer = GPOINTER_TO_INT(it->data);
+ for (it = policy_bearers; it; it = it->next) {
+ policy_bearer = GPOINTER_TO_INT(it->data);
- filter_bearer(policy_bearers, bearer, list);
+ filter_bearer(bearers, policy_bearer, list);
}
}
--
1.9.1
------------------------------
Message: 3
Date: Fri, 3 Feb 2017 09:47:09 -0500
From: Daryl Nebrich <[email protected]>
To: [email protected]
Subject: [PATCH 2/3] session: Check service priority when matching a
new service
Message-ID: <[email protected]>
A session may be configured to use multiple services listed by
priority in AllowedBearers of policy file. Check priority of
current service before switching to a new one.
---
src/session.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/session.c b/src/session.c
index 62c3df0..c3535ac 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1549,15 +1549,23 @@ static bool session_match_service(struct
connman_session *session,
{
enum connman_service_type bearer_type;
enum connman_service_type service_type;
+ enum connman_service_type current_service_type;
GSList *list;
if (policy && policy->allowed)
return policy->allowed(session, service);
+ /* Handle multiple bearers and priorities in session policy. */
+ current_service_type = connman_service_get_type(session->service);
+
for (list = session->info->config.allowed_bearers; list; list =
list->next) {
bearer_type = GPOINTER_TO_INT(list->data);
service_type = connman_service_get_type(service);
+ /* Keep using current service if higher priority. */
+ if (bearer_type == current_service_type)
+ return false;
+
if (bearer_type == service_type)
return true;
}
--
1.9.1
------------------------------
Message: 4
Date: Fri, 3 Feb 2017 09:47:10 -0500
From: Daryl Nebrich <[email protected]>
To: [email protected]
Subject: [PATCH 3/3] session: Check for other available services on
service lost
Message-ID: <[email protected]>
A session may be configured to allow use of multiple services.
On loss of current service, try to activate other available services.
---
src/session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/session.c b/src/session.c
index c3535ac..72c5e5f 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1697,10 +1697,10 @@ static void handle_service_state_offline(struct
connman_service *service,
session->service = NULL;
update_session_state(session);
+ session_activate(session);
}
}
-
static void service_state_changed(struct connman_service *service,
enum connman_service_state state)
{
--
1.9.1
------------------------------
Message: 5
Date: Fri, 03 Feb 2017 15:55:51 +0000
From: Andr? Draszik <[email protected]>
To: [email protected]
Subject: Re: ofono: cellular service disconnect makes it disappear
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
On Thu, 2017-02-02 at 09:49 +0000, Andr? Draszik wrote:
> Hi,
>
> We're using connman 1.33 & ofono 1.19 to manage cellular connections using
> a
> Telit LE910 modem, and once we disconnect the cellular service using
^^^^^
I was confused and it's actually a UE910-EUR (firmware 12.00.405) instead.
A.
------------------------------
Message: 6
Date: Fri, 03 Feb 2017 16:12:04 +0000
From: Andr? Draszik <[email protected]>
To: [email protected]
Subject: Re: ofono: cellular service disconnect makes it disappear
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
Hi Daniel,
On Fri, 2017-02-03 at 07:56 +0100, Daniel Wagner wrote:
> Hi Andr?,
>
> On 02/02/2017 10:49 AM, Andr? Draszik wrote:
> > We're using connman 1.33 & ofono 1.19 to manage cellular connections
> > using a
> > Telit LE910 modem, and once we disconnect the cellular service using
> > connman, it completely disappears from connman's list of services (the
> > cellular technology remains known to connman).
>
> As Dayrl pointed out, best thing would be to try the current HEAD of?
> ConnMan first. We had some bug fixes since 1.33. Also oFono.
I have updated ofono to tip, but nothing stood out from the git logs for
connman, so I'll try updating connman on Monday only.
> > [...]
>
> There are few things you can try for debugging. There is monitor-ofono?
> which shows you want oFono is sending over D-Bus to ConnMan. Check with?
> list-modes what oFono is showing ConnMan. And you might want to enable?
> the debug output in ConnMan to see what ConnMan is doing:
>
> connmand -n -d plugins/ofono.c
>
> But I would strongly suggest to try the current head first.
That was useful, thanks.
I can see that connman is sending Active=false on the ofono context, which
succeeds. I suspect this expected and normal behaviour.
But shortly thereafter ofono tells me that the connection became detached,
see below. I suspect that other modems don't transition to Attached==false
after an Active=false command?
This looks very similar to a problem somebody else's had with a similar
modem and ofono: https://lists.01.org/pipermail/ofono/2015-May/015765.html
I get the exact same behaviour as in the post referenced, I can get the
contexts from ofono using dbus manually, but I can't activate it, as GPRS is
not attached.
All pointing to a problem in ofono.
Here are the logs:
method call time=1482692142.600409 sender=:1.1 -> destination=org.ofono
serial=114 path=/telit_0/context2; interface=org.ofono.ConnectionContext;
member=SetProperty
string "Active"
variant boolean false
ofono shuts down PPP, etc., and eventually sends:
signal time=1482692143.040314 sender=:1.2 -> destination=(null destination)
serial=71 path=/telit_0/context2; interface=org.ofono.ConnectionContext;
member=PropertyChanged
string "Active"
variant boolean false
but shortly thereafter I see this:
ofonod[28572]: Modem: < \r\nNO CARRIER\r\n
ofonod[28572]: Aux: < \r\n+CGEV: ME DEACT IP, "100.94.35.91", 1\r\n
ofonod[28572]: Aux: < \r\n+CGREG: 0\r\n\r\n+CGEV: NW DETACH\r\n
ofonod[28572]: ../ofono-1.19/src/gprs.c:ofono_gprs_status_notify() /telit_0
status 0
connmand[27913]: ../connman-1.33/plugins/ofono.c:cm_update_attached() /telit_0
Attached 0
connmand[27913]: ../connman-1.33/plugins/ofono.c:remove_network() /telit_0
connmand[27913]: ../connman-1.33/plugins/ofono.c:remove_network() network
0x55a77620
connmand[27913]: Deleting host route failed (No such device)
connmand[27913]: Deleting host route failed (No such device)
connmand[27913]: ../connman-1.33/plugins/ofono.c:network_remove() /telit_0
network 0x55a77620
signal time=1482692145.319953 sender=:1.2 -> destination=(null destination)
serial=72 path=/telit_0; interface=org.ofono.ConnectionManager;
member=PropertyChanged
string "Attached"
variant boolean false
ofonod[28572]: ../ofono-1.19/src/gprs.c:ofono_gprs_detached_notify() /telit_0
signal time=1482692145.421178 sender=:1.1 -> destination=(null destination)
serial=135 path=/; interface=net.connman.Manager; member=ServicesChanged
array [
struct {
object path "/net/connman/service/ethernet_020000a01401_067_cable"
array [
]
}
]
array [
object path "/net/connman/service/cellular_272032050058871_context2"
]
Thanks for your help!
Andre'
------------------------------
Message: 7
Date: Fri, 03 Feb 2017 16:17:42 +0000
From: Andr? Draszik <[email protected]>
To: [email protected]
Subject: Re: ofono: cellular service disconnect makes it disappear
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
On Thu, 2017-02-02 at 09:49 +0000, Andr? Draszik wrote:
> Hi,
>
> We're using connman 1.33 & ofono 1.19 to manage cellular connections using
> a
> Telit LE910 modem, and once we disconnect the cellular service using
> connman, it completely disappears from connman's list of services (the
> cellular technology remains known to connman).
>
> To make the service known to connman again we have to instruct ofono to
> disable the modem and re-enable it again.
One more for completeness... The service also re-appears when the modem
switches CellIDs for whatever reason (I only noticed because my device was
sitting idle for a few hours):
ofonod[28572]: Aux: < \r\n
ofonod[28572]: Aux: < +CGREG: 0\r\n\r\n+CREG: 1,"75AA","00C21B9",2\r\n
ofonod[28572]: ../ofono-1.19/src/gprs.c:ofono_gprs_status_notify() /telit_0
status 0
ofonod[28572]: ../ofono-1.19/src/network.c:ofono_netreg_status_notify()
/telit_0 status 1 tech 2
signal time=1482695865.844560 sender=:1.2 -> destination=(null destination)
serial=87 path=/telit_0; interface=org.ofono.NetworkRegistration;
member=PropertyChanged
string "CellId"
variant uint32 795065
[...]
after which everything (GPRS in ofono) becomes attached again, and I can
reconnect using connman.
Cheers,
Andre'
------------------------------
Message: 8
Date: Fri, 3 Feb 2017 10:24:06 -0600
From: Denis Kenzior <[email protected]>
To: Andr? Draszik <[email protected]>, [email protected]
Subject: Re: ofono: cellular service disconnect makes it disappear
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Andr?,
> ofonod[28572]: Modem: < \r\nNO CARRIER\r\n
> ofonod[28572]: Aux: < \r\n+CGEV: ME DEACT IP, "100.94.35.91", 1\r\n
So oFono sends a PPP shutdown and we deactivate the context. So far so
good.
> ofonod[28572]: Aux: < \r\n+CGREG: 0\r\n\r\n+CGEV: NW DETACH\r\n
Then for some reason the modem reports a network initiated detach. That
is just bizarre. oFono doesn't (yet) try to re-attach in such
situations as it expects the modem firmware to honor the CGATT setting
and attach as soon as it is able.
> ofonod[28572]: ../ofono-1.19/src/gprs.c:ofono_gprs_status_notify() /telit_0
> status 0
oFono reports the detached status to connman.
> connmand[27913]: ../connman-1.33/plugins/ofono.c:cm_update_attached()
> /telit_0 Attached 0
> connmand[27913]: ../connman-1.33/plugins/ofono.c:remove_network() /telit_0
> connmand[27913]: ../connman-1.33/plugins/ofono.c:remove_network() network
> 0x55a77620
> connmand[27913]: Deleting host route failed (No such device)
> connmand[27913]: Deleting host route failed (No such device)
> connmand[27913]: ../connman-1.33/plugins/ofono.c:network_remove() /telit_0
> network 0x55a77620
> signal time=1482692145.319953 sender=:1.2 -> destination=(null destination)
> serial=72 path=/telit_0; interface=org.ofono.ConnectionManager;
> member=PropertyChanged
> string "Attached"
> variant boolean false
>
At some future point the modem magically attaches again. This really
sounds like a firmware issue. Is there a newer version of the firmware
for your modem you can try?
Regards,
-Denis
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 16, Issue 7
**************************************