Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe 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. [[PATCH v2 1/2] ofono: set network name from context name
      (Nicola Lunghi)
   2. [[PATCH v2 2/2] ofono: store context apn value (Nicola Lunghi)
   3. Help with Agent implementation over dbus / Connect I/O error
      (nick83ola)
   4. Re: Connman apparently not working on my embedded target
      (Mauro Condarelli)


----------------------------------------------------------------------

Date: Wed,  4 Mar 2020 10:43:40 +0000
From: Nicola Lunghi <[email protected]>
Subject: [[PATCH v2 1/2] ofono: set network name from context name
To: connman <[email protected]>
Message-ID: <[email protected]>

previously connman was setting the network name using the netreg Name property
that value doesn't permit to know what context we are connected to.

Set the network name from the context name instead
---
 plugins/ofono.c | 79 ++++++++++++++++++++++++-------------------------
 1 file changed, 38 insertions(+), 41 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 82413b6..bb08cfd 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -132,6 +132,7 @@ static GHashTable *context_hash;
 
 struct network_context {
        char *path;
+       char *name;
        int index;
        struct connman_network *network;
 
@@ -293,6 +294,7 @@ static void network_context_unref(struct network_context 
*context)
                return;
 
        g_free(context->path);
+       g_free(context->name);
 
        connman_ipaddress_free(context->ipv4_address);
        g_free(context->ipv4_nameservers);
@@ -1116,7 +1118,10 @@ static void add_network(struct modem_data *modem,
        connman_network_set_string(context->network, "Path",
                                        context->path);
 
-       if (modem->name)
+       /* we try first to use the context name as name, then the modem name */
+       if (context->name)
+               connman_network_set_name(context->network, context->name);
+       else if (modem->name)
                connman_network_set_name(context->network, modem->name);
        else
                connman_network_set_name(context->network, "");
@@ -1152,6 +1157,23 @@ static void remove_network(struct modem_data *modem,
        context->network = NULL;
 }
 
+static int set_context_name(struct network_context *context,
+                               const char *name)
+{
+       if (!context || !name)
+               return -EINVAL;
+
+       g_free(context->name);
+       context->name = g_strdup(name);
+
+       if(!context->name)
+               return -ENOMEM;
+
+       DBG("%s Set context name to %s", context->path, context->name);
+
+       return 0;
+}
+
 static int set_context_ipconfig(struct network_context *context,
                                const char *protocol)
 {
@@ -1199,6 +1221,7 @@ static int add_cm_context(struct modem_data *modem, const 
char *context_path,
        struct network_context *context = NULL;
        dbus_bool_t active = FALSE;
        const char *ip_protocol = NULL;
+       const char *ctx_name = NULL;
 
        DBG("%s context path %s", modem->path, context_path);
 
@@ -1216,7 +1239,13 @@ static int add_cm_context(struct modem_data *modem, 
const char *context_path,
                dbus_message_iter_next(&entry);
                dbus_message_iter_recurse(&entry, &value);
 
-               if (g_str_equal(key, "Type")) {
+               if (g_str_equal(key, "Name") &&
+                       dbus_message_iter_get_arg_type(&value) == 
DBUS_TYPE_STRING ) {
+                       dbus_message_iter_get_basic(&value, &ctx_name);
+
+                       DBG("%s Got Context Name %s", modem->path, ctx_name);
+
+               } else if (g_str_equal(key, "Type")) {
                        dbus_message_iter_get_basic(&value, &context_type);
 
                        DBG("%s context %s type %s", modem->path,
@@ -1259,6 +1288,9 @@ static int add_cm_context(struct modem_data *modem, const 
char *context_path,
                return -EINVAL;
        }
 
+       if (ctx_name)
+               set_context_name(context, ctx_name);
+
        if (ip_protocol)
                set_context_ipconfig(context, ip_protocol);
 
@@ -1571,33 +1603,6 @@ static gboolean cm_context_removed(DBusConnection *conn,
        return TRUE;
 }
 
-static void netreg_update_name(struct modem_data *modem,
-                               DBusMessageIter* value)
-{
-       char *name;
-       GSList *list;
-
-       dbus_message_iter_get_basic(value, &name);
-
-       DBG("%s Name %s", modem->path, name);
-
-       g_free(modem->name);
-       modem->name = g_strdup(name);
-
-       if (!modem->context_list)
-               return;
-
-       /* For all the context */
-       for (list = modem->context_list; list; list = list->next) {
-               struct network_context *context = list->data;
-
-               if (context->network) {
-                       connman_network_set_name(context->network, modem->name);
-                       connman_network_update(context->network);
-               }
-       }
-}
-
 static void netreg_update_strength(struct modem_data *modem,
                                        DBusMessageIter *value)
 {
@@ -1747,9 +1752,7 @@ static gboolean netreg_changed(DBusConnection *conn, 
DBusMessage *message,
        dbus_message_iter_next(&iter);
        dbus_message_iter_recurse(&iter, &value);
 
-       if (g_str_equal(key, "Name"))
-               netreg_update_name(modem, &value);
-       else if (g_str_equal(key, "Strength"))
+       if (g_str_equal(key, "Strength"))
                netreg_update_strength(modem, &value);
        else if (g_str_equal(key, "Status"))
                netreg_update_status(modem, &value);
@@ -1776,9 +1779,7 @@ static void netreg_properties_reply(struct modem_data 
*modem,
                dbus_message_iter_next(&entry);
                dbus_message_iter_recurse(&entry, &value);
 
-               if (g_str_equal(key, "Name"))
-                       netreg_update_name(modem, &value);
-               else if (g_str_equal(key, "Strength"))
+               if (g_str_equal(key, "Strength"))
                        netreg_update_strength(modem, &value);
                else if (g_str_equal(key, "Status"))
                        netreg_update_status(modem, &value);
@@ -1869,9 +1870,7 @@ static gboolean cdma_netreg_changed(DBusConnection *conn,
        dbus_message_iter_next(&iter);
        dbus_message_iter_recurse(&iter, &value);
 
-       if (g_str_equal(key, "Name"))
-               netreg_update_name(modem, &value);
-       else if (g_str_equal(key, "Strength"))
+       if (g_str_equal(key, "Strength"))
                netreg_update_strength(modem, &value);
        else if (g_str_equal(key, "DataStrength"))
                netreg_update_datastrength(modem, &value);
@@ -1901,9 +1900,7 @@ static void cdma_netreg_properties_reply(struct 
modem_data *modem,
                dbus_message_iter_next(&entry);
                dbus_message_iter_recurse(&entry, &value);
 
-               if (g_str_equal(key, "Name"))
-                       netreg_update_name(modem, &value);
-               else if (g_str_equal(key, "Strength"))
+               if (g_str_equal(key, "Strength"))
                        netreg_update_strength(modem, &value);
                else if (g_str_equal(key, "DataStrength"))
                        netreg_update_datastrength(modem, &value);
-- 
2.20.1

------------------------------

Date: Wed,  4 Mar 2020 10:43:42 +0000
From: Nicola Lunghi <[email protected]>
Subject: [[PATCH v2 2/2] ofono: store context apn value
To: connman <[email protected]>
Message-ID: <[email protected]>

Storing the apn value will permit to expose this value via d-bus in
a later patch
---
 plugins/ofono.c | 56 ++++++++++++++++++++++++++++++++-----------------
 1 file changed, 37 insertions(+), 19 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index bb08cfd..302ec57 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -133,6 +133,7 @@ static GHashTable *context_hash;
 struct network_context {
        char *path;
        char *name;
+       char *apn;
        int index;
        struct connman_network *network;
 
@@ -147,7 +148,6 @@ struct network_context {
        int refcount;
 
        bool active;
-       bool valid_apn; /* APN is 'valid' if length > 0 */
 };
 
 struct modem_data {
@@ -295,6 +295,7 @@ static void network_context_unref(struct network_context 
*context)
 
        g_free(context->path);
        g_free(context->name);
+       g_free(context->apn);
 
        connman_ipaddress_free(context->ipv4_address);
        g_free(context->ipv4_nameservers);
@@ -1174,6 +1175,27 @@ static int set_context_name(struct network_context 
*context,
        return 0;
 }
 
+static context_apn_is_valid(struct network_context *context)
+{
+       return ((context != NULL) &&
+                       (context->apn != NULL) &&
+                       (strlen(context->apn) > 0));
+}
+
+static int set_context_apn(struct network_context *context,
+                           const char *apn_name)
+{
+       if (!context || !apn_name)
+               return -EINVAL;
+
+       g_free(context->apn);
+       context->apn = g_strdup(apn_name);
+
+       DBG("%s Set context apn to %s", context->path, context->name);
+
+       return 0;
+}
+
 static int set_context_ipconfig(struct network_context *context,
                                const char *protocol)
 {
@@ -1222,6 +1244,7 @@ static int add_cm_context(struct modem_data *modem, const 
char *context_path,
        dbus_bool_t active = FALSE;
        const char *ip_protocol = NULL;
        const char *ctx_name = NULL;
+       const char *apn_name = NULL;
 
        DBG("%s context path %s", modem->path, context_path);
 
@@ -1262,16 +1285,11 @@ static int add_cm_context(struct modem_data *modem, 
const char *context_path,
                        dbus_message_iter_get_basic(&value, &active);
 
                        DBG("%s Active %d", modem->path, active);
-               } else if (g_str_equal(key, "AccessPointName")) {
-                       const char *apn;
-
-                       dbus_message_iter_get_basic(&value, &apn);
-                       if (apn && strlen(apn) > 0)
-                               context->valid_apn = true;
-                       else
-                               context->valid_apn = false;
-
-                       DBG("%s AccessPointName '%s'", modem->path, apn);
+               } else if (g_str_equal(key, "AccessPointName") &&
+                       dbus_message_iter_get_arg_type(&value) == 
DBUS_TYPE_STRING)
+               {
+                       dbus_message_iter_get_basic(&value, &apn_name);
+                       DBG("%s AccessPointName '%s'", modem->path, apn_name);
                }  else if (g_str_equal(key, "Protocol") &&
                        dbus_message_iter_get_arg_type(&value) == 
DBUS_TYPE_STRING ) {
 
@@ -1291,6 +1309,9 @@ static int add_cm_context(struct modem_data *modem, const 
char *context_path,
        if (ctx_name)
                set_context_name(context, ctx_name);
 
+       if (apn_name)
+               set_context_apn(context, apn_name);
+
        if (ip_protocol)
                set_context_ipconfig(context, ip_protocol);
 
@@ -1299,7 +1320,7 @@ static int add_cm_context(struct modem_data *modem, const 
char *context_path,
        modem->context_list = g_slist_prepend(modem->context_list, context);
        g_hash_table_replace(context_hash, g_strdup(context_path), modem);
 
-       if (context->valid_apn && modem->attached &&
+       if (context_apn_is_valid(context) && modem->attached &&
            has_interface(modem->interfaces, OFONO_API_NETREG))
                add_network(modem, context);
 
@@ -1414,11 +1435,10 @@ static gboolean context_changed(DBusConnection *conn,
 
                dbus_message_iter_get_basic(&value, &apn);
 
-               DBG("%s AccessPointName %s", modem->path, apn);
-
-               if (apn && strlen(apn) > 0) {
-                       context->valid_apn = true;
+               set_context_apn(context, apn);
 
+               if (context_apn_is_valid(context)) {
+                       DBG("%s AccessPointName %s", modem->path, context->apn);
                        if (context->network)
                                return TRUE;
 
@@ -1434,8 +1454,6 @@ static gboolean context_changed(DBusConnection *conn,
                        if (context->active)
                                set_connected(modem, context);
                } else {
-                       context->valid_apn = false;
-
                        if (!context->network)
                                return TRUE;
 
@@ -1804,7 +1822,7 @@ static void netreg_properties_reply(struct modem_data 
*modem,
        for (list = modem->context_list; list; list = list->next) {
                struct network_context *context = list->data;
 
-               if (context->valid_apn)
+               if (context_apn_is_valid(context))
                        add_network(modem, context);
                if (context->active)
                        set_connected(modem, context);
-- 
2.20.1

------------------------------

Date: Wed, 4 Mar 2020 17:30:15 +0000
From: nick83ola <[email protected]>
Subject: Help with Agent implementation over dbus / Connect I/O error
To: connman <[email protected]>
Message-ID:
        <cabph3uof49rxh8d2udy-kfp2oanoeq6tlgc-0jtozgucbhj...@mail.gmail.com>
Content-Type: multipart/alternative;
        boundary="000000000000afd8a605a00ac6ab"

--000000000000afd8a605a00ac6ab
Content-Type: text/plain; charset="UTF-8"

Dear connman development team,

i have the following problem:
I have a python service that talks to connman over dbus.
I have implemented a long running "SimpleAgent" service and a service that
is listening to commands and calling the appropriate connman method over
DBus.

the problems is that I have a lot of possible flows for the connect()
function for wifi


*Case A: connman has previously connected to the wifi and is a favourite*

   1. I start the agent and load it with a password
   2. call the Service Connect function - >
   
connect(/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323539373935_managed_psk)
   3. Connman has previouslyconnected to the service: it will not contact
   the agent and try to use the password -> *PROBLEM: connman and the Agent
   could be out of sync !!!! if my user set a different password in the agent
   I cannot force connman to request the password again?????*
   4. Success -> *BUT IF the user entered a wrong password in the agent
   will never know that connman has used a different password*


*Case B: connman has not previously connected to the wifi but the agent is
empty-> doesn't have a password for that network*

   1. I start the agent and don;t load any passworf in it
   2. call the Service Connect function - >
   
connect(/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323539373935_managed_psk)
   3. Connman has never connected to the service before
   4. Connman now is requesting the password from the agent:
   RequestInput
   
(/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323539373935_managed_psk,{'Passphrase':
   <dbus_next.signature.Variant object at 0x75b54d30>, 'WPS':
   <dbus_next.signature.Variant object at 0x75b54f30>})
   [simpleagent:RequestInput:105
   5. The agent is returning an empty Variant
   6. The connman connect() will return throwing a "*Connect method has
   invalid arguments*"


*Case C: connman has not previously connected to the wifi and the agent has
a wrong password*

   1. I start the agent and load a wrong password in it
   2. call the Service Connect function - >
   
connect(/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323539373935_managed_psk)
   3. Connman has never connected to the service before
   4. Connman now is requesting the password from the agent:
   RequestInput
   
(/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323539373935_managed_psk,{'Passphrase':
   <dbus_next.signature.Variant object at 0x75b54d30>, 'WPS':
   <dbus_next.signature.Variant object at 0x75b54f30>})
   [simpleagent:RequestInput:105
   5. The agent is returning a wrong password
   6. Connman will try to connect but the connection fails
   7. Connman is calling the the agent ReportError() method  ERROR:
   ReportError:
   
path=/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323163323463_managed_psk
   error=invalid-key [simpleagent:ReportError:39]
   8. and Cancel()
   9. But to the process that has called the connect() it will throw an *I/O
   Error*

So I have the same case (wrong password but
* two different exception -> I/O Error and Connect method has invalid
arguments*
How I can discriminate between the two?

Why I am getting I/O error???

Cheers
Nicola Lunghi

--000000000000afd8a605a00ac6ab
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Dear connman development team,<br><br>i have the following=
 problem:<br>I have a python service that talks to connman over dbus.<br>I =
have implemented a long running &quot;SimpleAgent&quot; service and a servi=
ce that is listening to commands and calling the appropriate connman method=
 over DBus.<br><br>the problems is that I have a lot of possible flows for =
the connect() function for wifi<br><div><br></div><div><font size=3D"4"><b>=
Case A: connman has previously connected to the wifi and is a favourite<br>=
</b></font></div><ol><li>I start the agent and load it with a password</li>=
<li>call the Service Connect function - &gt; connect(/net/connman/service/w=
ifi_50338b6357f3_62756d626c656265652d323539373935_managed_psk)</li><li>Conn=
man has previouslyconnected to the service: it will not contact the agent a=
nd try to use the password -&gt; <b>PROBLEM: connman and the Agent could be=
 out of sync !!!! if my user set a different password in the agent I cannot=
 force connman to request the password again?????</b><br></li><li>Success -=
&gt; <b>BUT IF the user entered a wrong password in the agent will never kn=
ow that connman has used a different password</b><br></li></ol><div><div></=
div><div><div><font size=3D"4"><b>Case B: connman has not previously connec=
ted to the wifi but the agent is empty-&gt; doesn&#39;t have a password for=
 that network<br></b></font></div><ol><li>I start the agent and don;t load =
any passworf in it<br></li><li>call the Service Connect function - &gt; con=
nect(/net/connman/service/wifi_50338b6357f3_62756d626c656265652d32353937393=
5_managed_psk)</li><li>Connman has never connected to the service before<br=
></li><li>Connman now is requesting the password from the agent:<br>Request=
Input (/net/connman/service/wifi_50338b6357f3_62756d626c656265652d323539373=
935_managed_psk,{&#39;Passphrase&#39;: &lt;dbus_next.signature.Variant obje=
ct at 0x75b54d30&gt;, &#39;WPS&#39;: &lt;dbus_next.signature.Variant object=
 at 0x75b54f30&gt;}) [simpleagent:RequestInput:105</li><li>The agent is ret=
urning an empty Variant<br></li><li>The connman connect() will return throw=
ing a &quot;<b>Connect method has invalid arguments</b>&quot;</li></ol></di=
v><div><div><div><font size=3D"4"><b>Case C: connman has not previously con=
nected to the wifi and the agent has a wrong password<br></b></font></div><=
ol><li>I start the agent and load a wrong password in it<br></li><li>call t=
he Service Connect function - &gt; connect(/net/connman/service/wifi_50338b=
6357f3_62756d626c656265652d323539373935_managed_psk)</li><li>Connman has ne=
ver connected to the service before<br></li><li>Connman now is requesting t=
he password from the agent:<br>RequestInput (/net/connman/service/wifi_5033=
8b6357f3_62756d626c656265652d323539373935_managed_psk,{&#39;Passphrase&#39;=
: &lt;dbus_next.signature.Variant object at 0x75b54d30&gt;, &#39;WPS&#39;: =
&lt;dbus_next.signature.Variant object at 0x75b54f30&gt;}) [simpleagent:Req=
uestInput:105</li><li>The agent is returning a wrong password</li><li>Connm=
an will try to connect but the connection fails</li><li>Connman is calling =
the the agent ReportError() method=C2=A0 ERROR: ReportError: path=3D/net/co=
nnman/service/wifi_50338b6357f3_62756d626c656265652d323163323463_managed_ps=
k error=3Dinvalid-key [simpleagent:ReportError:39]</li><li>and Cancel()<br>=
</li><li>But to the process that has called the connect() it will throw an =
<b>I/O Error</b>=C2=A0 <br></li></ol></div></div></div><div>So I have the s=
ame case (wrong password but<b> two different exception -&gt; I/O Error and=
 Connect method has invalid arguments<br></b></div><div>How I can discrimin=
ate between the two?</div><div><br></div><div>Why I am getting I/O error???=
</div><div><br></div><div>Cheers</div><div>Nicola Lunghi<br></div></div>

--000000000000afd8a605a00ac6ab--

------------------------------

Date: Wed, 4 Mar 2020 23:31:18 +0100
From: Mauro Condarelli <[email protected]>
Subject: Re: Connman apparently not working on my embedded target
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8



On 3/4/20 10:24 AM, Daniel Wagner wrote:
> Hi Mauro,
>
> On Wed, Mar 04, 2020 at 09:47:40AM +0100, Mauro Condarelli wrote:
>> Hi Daniel,
>> Thanks for the fast answer.
> That was just pure luck :)
let's try to push my luck a bit further... ;)


>>> But here we have a link local address. No idea if this is important or
>>> not.
>> This is a bit strange, but somewhat expected:
>> This SoC has an integrated Ethernet Switch, so eth0 *believes*
>> it has connection because it sees the switch, but there's no
>> Ethernet cable on the other side of the (internal) switch, so
>> no connection with DHCP server is possible on that route.
>>
>> Anyhow this is completely beyond the point (currently); as
>> You can see I completely disabled Ethernet under  ConnMan.
> Ok, it just looked a bit strange.
On the new connman (1.38) it actually gets more than "a bit"
strange.
On a brand new system (no configuration for connmand,
so everything at default, eth on) just starting connmand results,
*after some time* in a nasty kernel error:

# /etc/init.d/connman start
Starting connman ... done.
# [ 6250.080856] mtk_soc_eth 10100000.ethernet eth0: Link is Down
[ 6250.088029] wlan0: deauthenticating from a0:04:60:9f:2f:f8 by local choice 
(Reason: 3=DEAUTH_LEAVING)
[ 6250.538240] mtk_soc_eth 10100000.ethernet eth0: configuring for fixed/mii 
link mode
[ 6250.546448] mtk_soc_eth 10100000.ethernet eth0: Link is Up - 100Mbps/Full - 
flow control rx/tx

# ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc pfifo_fast qlen 
1000
    link/ether c2:b9:d7:58:74:f4 brd ff:ff:ff:ff:ff:ff
3: lan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether c2:b9:d7:58:74:f4 brd ff:ff:ff:ff:ff:ff
5: wlan0: <BROADCAST,MULTICAST8000> mtu 1500 qdisc noqueue qlen 1000
    link/ether 72:cd:04:ea:ea:ae brd ff:ff:ff:ff:ff:ff
# [ 7082.009030] ------------[ cut here ]------------
[ 7082.013743] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:443 0x8037056c
[ 7082.020887] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out
[ 7082.027937] Modules linked in: mt7603e mt76 mac80211 cfg80211 mtk_eth 
ehci_platform ehci_hcd usbcore usb_common
[ 7082.038206] CPU: 0 PID: 0 Comm: swapper Not tainted 5.6.0-rc4 #2
[ 7082.044291] Stack : 00000000 8004e5fc 80490000 80415810 00000000 00000000 
00000000 00000000
[ 7082.052772]         00000000 00000000 00000000 00000000 00000000 00000001 
87c0bd78 80490000
[ 7082.061249]         87c0be10 00000000 00000000 00000000 00000038 80407ca4 
000000d8 00000000
[ 7082.069728]         203a6d6d 87c0bbdc 80510000 70617773 80490000 00000000 
00000009 00000009
[ 7082.078208]         80480560 87c0bf0c 8037046c 00000122 00000003 802a7cbc 
00000001 001d7f1f
[ 7082.086688]         ...
[ 7082.089165] Call Trace:
[ 7082.089177] [<8004e5fc>] 0x8004e5fc
[ 7082.095185] [<80407ca4>] 0x80407ca4
[ 7082.098720] [<8037046c>] 0x8037046c
[ 7082.102254] [<802a7cbc>] 0x802a7cbc
[ 7082.105788] [<8000aa38>] 0x8000aa38
[ 7082.109321] [<8000aa40>] 0x8000aa40
[ 7082.112856] [<8001d69c>] 0x8001d69c
[ 7082.116390] [<8037056c>] 0x8037056c
[ 7082.119924] [<8037056c>] 0x8037056c
[ 7082.123456] [<8001d710>] 0x8001d710
[ 7082.126993] [<8037056c>] 0x8037056c
[ 7082.130527] [<80070274>] 0x80070274
[ 7082.134064] [<80060254>] 0x80060254
[ 7082.137596] [<8037046c>] 0x8037046c
[ 7082.141129] [<8006040c>] 0x8006040c
[ 7082.144665] [<80060c14>] 0x80060c14
[ 7082.148199] [<8000d84c>] 0x8000d84c
[ 7082.151732] [<800638e8>] 0x800638e8
[ 7082.155267] [<80060c88>] 0x80060c88
[ 7082.158801] [<804d0000>] 0x804d0000
[ 7082.162334] [<8040e0e0>] 0x8040e0e0
[ 7082.165875] [<80020740>] 0x80020740
[ 7082.169409] [<80005910>] 0x80005910
[ 7082.172939]
[ 7082.174449] ---[ end trace c89d8f4203b47d1a ]---
[ 7082.179141] mtk_soc_eth 10100000.ethernet eth0: transmit timed out
[ 7082.185770] mtk_soc_eth 10100000.ethernet eth0: Link is Down
[ 7082.206411] mtk_soc_eth 10100000.ethernet eth0: configuring for fixed/mii 
link mode
[ 7082.229320] mtk_soc_eth 10100000.ethernet eth0: Link is Up - 100Mbps/Full - 
flow control rx/tx
[ 7984.005249] mtk_soc_eth 10100000.ethernet eth0: transmit timed out
[ 7984.011860] mtk_soc_eth 10100000.ethernet eth0: Link is Down
[ 7984.027073] mtk_soc_eth 10100000.ethernet eth0: configuring for fixed/mii 
link mode
[ 7984.045472] mtk_soc_eth 10100000.ethernet eth0: Link is Up - 100Mbps/Full - 
flow control rx/tx
[ 8884.002287] mtk_soc_eth 10100000.ethernet eth0: transmit timed out
[ 8884.008898] mtk_soc_eth 10100000.ethernet eth0: Link is Down
[ 8884.024123] mtk_soc_eth 10100000.ethernet eth0: configuring for fixed/mii 
link mode
[ 8884.042515] mtk_soc_eth 10100000.ethernet eth0: Link is Up - 100Mbps/Full - 
flow control rx/tx
[ 9783.999653] mtk_soc_eth 10100000.ethernet eth0: transmit timed out
[ 9784.006276] mtk_soc_eth 10100000.ethernet eth0: Link is Down
[ 9784.021499] mtk_soc_eth 10100000.ethernet eth0: configuring for fixed/mii 
link mode
[ 9784.039883] mtk_soc_eth 10100000.ethernet eth0: Link is Up - 100Mbps/Full - 
flow control rx/tx
# ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc pfifo_fast qlen 
1000
    link/ether c2:b9:d7:58:74:f4 brd ff:ff:ff:ff:ff:ff
    inet 169.254.242.88/16 brd 169.254.255.255 scope global eth0
       valid_lft forever preferred_lft forever
3: lan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether c2:b9:d7:58:74:f4 brd ff:ff:ff:ff:ff:ff
5: wlan0: <BROADCAST,MULTICAST8000> mtu 1500 qdisc noqueue qlen 1000
    link/ether 72:cd:04:ea:ea:ae brd ff:ff:ff:ff:ff:ff

This went away after disabling wired Ethernet, but it's a bit scary.

>>>> # connmand -d
>>>> # connmanctl services
>>>> *Aa NETGEAR_11N         
>>>> wifi_aa4a5c6ba483_4e4554474541525f31314e_managed_psk
>>>> # connmanctl connect wifi_aa4a5c6ba483_4e4554474541525f31314e_managed_psk
>>>> Error
>>> Which version of ConnMan and iwd are you using? We just released a new
>>> ConnMan version which updated the iwd plugin. Older version of ConnMan
>>> do not work correctly with iwd 1.x.
>> # connmand --version
>> 1.37
>> # /usr/libexec/iwd --version
>> 1.5
>>
>> Should I upgrade?
> Yes. iwd is up to date but ConnMan doesn't support correctly iwd in 1.37.
I upgraded to connmand 1.38

>>>> # grep connmand /var/log/messages
>>> This part is hard to read because the lines are wrapped. Could you
>>> upload it somewhere and post the link?
I hope this is fixed now; can You confirm?

> Looks like you are using wpa_supplicant instead of iwd in
> ConnMan. '--enable-wifi' enables the wpa_supplicant backend. Try to
> use '--disable-wifi --enable-iwd' when configuring ConnMan 1.38. This
> should use iwd instead.
Done.
Unfortunately this results in further problems.
Apparently this changes something in d-bus paths because
trying to issue a Scan() command results in a failure after
a very long wait.
My guess is test-connman tries to talk to wpa_supplicant
and, obviously, it gets no answer.
It is unclear (to me) how I should modify it (or my code,
for that matter) to have it work with iwd.

# time ./test-connman scan wifi
Traceback (most recent call last):
  File "./test-connman", line 152, in <module>
    technology.Scan()
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 72, in __call__
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__
  File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 652, in 
call_blocking
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not 
receive a reply. Possible causes include: the remote application did not send a 
reply, the message bus security policy blocked the reply, the reply timeout 
expired, or the network connection was broken.
Command exited with non-zero status 1
real    0m 26.14s
user    0m 1.03s
sys    0m 0.06s



Related issue: I understood iwd is the new standard and
it is developed alongside connman, but now I'm unsure.
Please advise: is it a good choice to use iwd/connmand
or should I revert to wpa_assistant and/or NetworkManager?
My needs are quite simple: I need to setup networking
(single connection, *either* Ethernet *or* WiFi) using
parameters provided over a serial line (currently in json
format, but that is immaterial) *without* human intervention
(no way to "ask for a passphrase" if one is not provided in
the json packet).

> Thanks,
> Daniel

Many Thanks in Advance
Mauro

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]


------------------------------

End of connman Digest, Vol 53, Issue 6
**************************************

Reply via email to