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. Medical Assignment Help (Alice Miller)
2. [PATCH v1 1/3] network: Add connman_network_set_autoconect()
(Daniel Wagner)
3. [PATCH v1 0/3] Change auto connect strategy for iwd
(Daniel Wagner)
4. [PATCH v1 2/3] service: Propagade autoconnect mode to network
(Daniel Wagner)
5. [PATCH v1 3/3] iwd: Enable/disable auto_connect on known networks
(Daniel Wagner)
6. Re: Spam (Daniel Wagner)
7. Antivirus Software ([email protected])
8. Antivirus Software ([email protected])
----------------------------------------------------------------------
Date: Fri, 20 Nov 2020 10:30:15 -0000
From: "Alice Miller" <[email protected]>
Subject: Medical Assignment Help
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Get medical assignment help with Assignment Classmates, it is beneficial to the
students in the realization of their goals and getting good grades by the
tutors.
https://www.assignmentclassmates.com/medical-assignment-help
------------------------------
Date: Fri, 20 Nov 2020 16:44:40 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH v1 1/3] network: Add connman_network_set_autoconect()
To: [email protected]
Cc: KeithG <[email protected]>, Daniel Wagner <[email protected]>
Message-ID: <[email protected]>
Introduce connman_network_set_connect() to allow the service layer to
set the auto connect strategy per network object.
---
include/network.h | 4 ++++
src/network.c | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/include/network.h b/include/network.h
index 8f87d7c5da72..8f9dd94a7ec2 100644
--- a/include/network.h
+++ b/include/network.h
@@ -132,6 +132,8 @@ uint16_t connman_network_get_frequency(struct
connman_network *network);
int connman_network_set_wifi_channel(struct connman_network *network,
uint16_t channel);
uint16_t connman_network_get_wifi_channel(struct connman_network *network);
+int connman_network_set_autoconnect(struct connman_network *network,
+ bool autoconnect);
int connman_network_set_string(struct connman_network *network,
const char *key, const char *value);
@@ -161,6 +163,8 @@ struct connman_network_driver {
void (*remove) (struct connman_network *network);
int (*connect) (struct connman_network *network);
int (*disconnect) (struct connman_network *network);
+ int (*set_autoconnect) (struct connman_network *network,
+ bool autoconnect);
};
int connman_network_driver_register(struct connman_network_driver *driver);
diff --git a/src/network.c b/src/network.c
index f2ab16bd265b..256e3b5f1c12 100644
--- a/src/network.c
+++ b/src/network.c
@@ -2112,6 +2112,14 @@ int connman_network_set_wifi_channel(struct
connman_network *network,
return 0;
}
+int connman_network_set_autoconnect(struct connman_network *network,
+ bool autoconnect)
+{
+ if (!network->driver || !network->driver->set_autoconnect)
+ return 0;
+ return network->driver->set_autoconnect(network, autoconnect);
+}
+
uint16_t connman_network_get_wifi_channel(struct connman_network *network)
{
return network->wifi.channel;
--
2.29.2
------------------------------
Date: Fri, 20 Nov 2020 16:44:39 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH v1 0/3] Change auto connect strategy for iwd
To: [email protected]
Cc: KeithG <[email protected]>, Daniel Wagner <[email protected]>
Message-ID: <[email protected]>
As reported by KeithG, ConnMan's auto connect doesn't work well with
iwd. ConnMan disabled the autoconnect modus of iwd for all
networks. This let iwd chill and slow down the scaning thus finding a
network took pretty long. This series will set the auto_connect
property for iwd's KnowNetworks when the corresponding ConnMan service
has the AutoConnect set. In my simple setup it seems to work.
Daniel Wagner (3):
network: Add connman_network_set_autoconect()
service: Propagade autoconnect mode to network
iwd: Enable/disable auto_connect on known networks
include/network.h | 4 +
plugins/iwd.c | 258 ++++++++++++++++++++++++++++++----------------
src/network.c | 8 ++
src/service.c | 4 +
4 files changed, 184 insertions(+), 90 deletions(-)
--
2.29.2
------------------------------
Date: Fri, 20 Nov 2020 16:44:41 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH v1 2/3] service: Propagade autoconnect mode to network
To: [email protected]
Cc: KeithG <[email protected]>, Daniel Wagner <[email protected]>
Message-ID: <[email protected]>
Let the network object know if this is a autoconnect network.
---
src/service.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/service.c b/src/service.c
index 2f497d10cef1..3b96ddfdc613 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1693,6 +1693,8 @@ bool connman_service_set_autoconnect(struct
connman_service *service,
service->autoconnect = autoconnect;
autoconnect_changed(service);
+ connman_network_set_autoconnect(service->network, autoconnect);
+
return true;
}
@@ -7305,6 +7307,8 @@ struct connman_service *
__connman_service_create_from_network(struct connman_ne
service_register(service);
service_schedule_added(service);
+ connman_network_set_autoconnect(network,
+ service->favorite && service->autoconnect);
if (service->favorite) {
device = connman_network_get_device(service->network);
if (device && !connman_device_get_scanning(device,
--
2.29.2
------------------------------
Date: Fri, 20 Nov 2020 16:44:42 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH v1 3/3] iwd: Enable/disable auto_connect on known
networks
To: [email protected]
Cc: KeithG <[email protected]>, Daniel Wagner <[email protected]>
Message-ID: <[email protected]>
Change in stragety how ConnMan is driving the auto connect
strategy. Instead relying only on ConnMan doing the auto connect and
disabling all auto connects on the know networks object, we pass
through the autoconnect setting from ConnMan to iwd and rely on iwd to
initiate the initial connect. We have to do this because iwd will
disable scaning if auto connect is disabled.
Luckily ConnMan is able to synchronize itself on state changes from
the external daemons. No internal changes are necessary for ConnMan.
The only changes needed are inside the iwd plugin. We need to store
services' autoconnect status in the iwd_network and iwd_know_network
data structure. This is due the fact know networks are decoupled from
the network objects. So we can't do a reverse lookup. Thus we store
the autoconnect state in iwd_network object and update on any possible
chance the autoconnect variable. If the known_networks' auto_connect
and services' autoconnect do not match do a property change on the
iwd's known_network D-Bus object.
---
plugins/iwd.c | 258 ++++++++++++++++++++++++++++++++------------------
1 file changed, 168 insertions(+), 90 deletions(-)
diff --git a/plugins/iwd.c b/plugins/iwd.c
index 5df3c088d64f..21f646c56133 100644
--- a/plugins/iwd.c
+++ b/plugins/iwd.c
@@ -95,6 +95,8 @@ struct iwd_network {
struct iwd_device *iwdd;
struct connman_network *network;
+ /* service's autoconnect */
+ bool autoconnect;
};
struct iwd_known_network {
@@ -106,6 +108,9 @@ struct iwd_known_network {
char *last_connected_time;
bool auto_connect;
int auto_connect_id;
+
+ /* service's autoconnect */
+ bool autoconnect;
};
struct iwd_station {
@@ -318,12 +323,157 @@ static int cm_network_disconnect(struct connman_network
*network)
return -EINPROGRESS;
}
+struct auto_connect_cb_data {
+ char *path;
+ bool auto_connect;
+};
+
+static void auto_connect_cb_free(struct auto_connect_cb_data *cbd)
+{
+ g_free(cbd->path);
+ g_free(cbd);
+}
+
+static void auto_connect_cb(const DBusError *error, void *user_data)
+{
+ struct auto_connect_cb_data *cbd = user_data;
+ struct iwd_known_network *iwdkn;
+
+ iwdkn = g_hash_table_lookup(known_networks, cbd->path);
+ if (!iwdkn)
+ goto out;
+
+ if (dbus_error_is_set(error))
+ connman_warn("WiFi known network %s property auto connect %s",
+ cbd->path, error->message);
+
+ /* property is updated via watch known_network_property_change() */
+out:
+ auto_connect_cb_free(cbd);
+}
+
+static int set_auto_connect(struct iwd_known_network *iwdkn, bool auto_connect)
+{
+ dbus_bool_t dbus_auto_connect = auto_connect;
+ struct auto_connect_cb_data *cbd;
+
+ if (proxy_get_bool(iwdkn->proxy, "AutoConnect") == auto_connect)
+ return -EALREADY;
+
+ cbd = g_new(struct auto_connect_cb_data, 1);
+ cbd->path = g_strdup(iwdkn->path);
+ cbd->auto_connect = auto_connect;
+
+ if (!g_dbus_proxy_set_property_basic(iwdkn->proxy, "AutoConnect",
+ DBUS_TYPE_BOOLEAN,
+ &dbus_auto_connect,
+ auto_connect_cb, cbd, NULL)) {
+ auto_connect_cb_free(cbd);
+ return -EIO;
+ }
+
+ return -EINPROGRESS;
+}
+
+static gboolean disable_auto_connect_cb(gpointer data)
+{
+ char *path = data;
+ struct iwd_known_network *iwdkn;
+
+ iwdkn = g_hash_table_lookup(known_networks, path);
+ if (!iwdkn)
+ return FALSE;
+
+ if (set_auto_connect(iwdkn, false) != -EINPROGRESS)
+ connman_warn("Failed to disable auto connect");
+
+ iwdkn->auto_connect_id = 0;
+ return FALSE;
+}
+
+static int disable_auto_connect(struct iwd_known_network *iwdkn)
+{
+ if (iwdkn->auto_connect_id)
+ return -EBUSY;
+
+ iwdkn->auto_connect_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
+ 0,
+ disable_auto_connect_cb,
+ g_strdup(iwdkn->path),
+ g_free);
+ return 0;
+}
+
+static gboolean enable_auto_connect_cb(gpointer data)
+{
+ char *path = data;
+ struct iwd_known_network *iwdkn;
+
+ iwdkn = g_hash_table_lookup(known_networks, path);
+ if (!iwdkn)
+ return FALSE;
+
+ if (set_auto_connect(iwdkn, true) != -EINPROGRESS)
+ connman_warn("Failed to enable auto connect");
+
+ iwdkn->auto_connect_id = 0;
+ return FALSE;
+}
+
+static int enable_auto_connect(struct iwd_known_network *iwdkn)
+{
+ if (iwdkn->auto_connect_id)
+ return -EBUSY;
+
+ iwdkn->auto_connect_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
+ 0,
+ enable_auto_connect_cb,
+ g_strdup(iwdkn->path),
+ g_free);
+ return 0;
+}
+
+static int update_auto_connect(struct iwd_known_network *iwdkn)
+{
+ DBG("auto_connect %d autoconnect %d", iwdkn->auto_connect,
iwdkn->autoconnect);
+
+ if (iwdkn->auto_connect == iwdkn->autoconnect)
+ return -EALREADY;
+
+ if (iwdkn->autoconnect)
+ return enable_auto_connect(iwdkn);
+ return disable_auto_connect(iwdkn);
+}
+
+static int cm_network_set_autoconnect(struct connman_network *network,
+ bool autoconnect)
+{
+ struct iwd_network *iwdn = connman_network_get_data(network);
+ struct iwd_known_network *iwdkn;
+
+ DBG("autoconnect %d", autoconnect);
+
+ iwdn->autoconnect = autoconnect;
+
+ if (!iwdn->known_network)
+ return -ENOENT;
+
+ iwdkn = g_hash_table_lookup(known_networks, iwdn->known_network);
+ if (!iwdkn)
+ return -ENOENT;
+
+ iwdkn->autoconnect = autoconnect;
+
+ return update_auto_connect(iwdkn);
+}
+
static struct connman_network_driver network_driver = {
- .name = "iwd",
- .type = CONNMAN_NETWORK_TYPE_WIFI,
- .probe = cm_network_probe,
- .connect = cm_network_connect,
- .disconnect = cm_network_disconnect,
+ .name = "iwd",
+ .type = CONNMAN_NETWORK_TYPE_WIFI,
+ .probe = cm_network_probe,
+ .connect = cm_network_connect,
+ .disconnect = cm_network_disconnect,
+ .set_autoconnect = cm_network_set_autoconnect,
};
static int cm_device_probe(struct connman_device *device)
@@ -923,6 +1073,7 @@ static void network_property_change(GDBusProxy *proxy,
const char *name,
DBusMessageIter *iter, void *user_data)
{
struct iwd_network *iwdn;
+ struct iwd_known_network *iwdkn;
const char *path;
path = g_dbus_proxy_get_path(proxy);
@@ -942,6 +1093,17 @@ static void network_property_change(GDBusProxy *proxy,
const char *name,
update_network_connected(iwdn);
else
update_network_disconnected(iwdn);
+ } else if (!strcmp(name, "KnownNetwork")) {
+ g_free(iwdn->known_network);
+ iwdn->known_network =
+ g_strdup(proxy_get_string(proxy, "KnownNetwork"));
+ if (!iwdn->known_network)
+ return;
+
+ iwdkn = g_hash_table_lookup(known_networks,
+ iwdn->known_network);
+ if (iwdkn)
+ update_auto_connect(iwdkn);
}
}
@@ -1468,86 +1630,6 @@ static void create_network(GDBusProxy *proxy)
add_network(path, iwdn);
}
-struct auto_connect_cb_data {
- char *path;
- bool auto_connect;
-};
-
-static void auto_connect_cb_free(struct auto_connect_cb_data *cbd)
-{
- g_free(cbd->path);
- g_free(cbd);
-}
-
-static void auto_connect_cb(const DBusError *error, void *user_data)
-{
- struct auto_connect_cb_data *cbd = user_data;
- struct iwd_known_network *iwdkn;
-
- iwdkn = g_hash_table_lookup(known_networks, cbd->path);
- if (!iwdkn)
- goto out;
-
- if (dbus_error_is_set(error))
- connman_warn("WiFi known network %s property auto connect %s",
- cbd->path, error->message);
-
- /* property is updated via watch known_network_property_change() */
-out:
- auto_connect_cb_free(cbd);
-}
-
-static int set_auto_connect(struct iwd_known_network *iwdkn, bool auto_connect)
-{
- dbus_bool_t dbus_auto_connect = auto_connect;
- struct auto_connect_cb_data *cbd;
-
- if (proxy_get_bool(iwdkn->proxy, "AutoConnect") == auto_connect)
- return -EALREADY;
-
- cbd = g_new(struct auto_connect_cb_data, 1);
- cbd->path = g_strdup(iwdkn->path);
- cbd->auto_connect = auto_connect;
-
- if (!g_dbus_proxy_set_property_basic(iwdkn->proxy, "AutoConnect",
- DBUS_TYPE_BOOLEAN,
- &dbus_auto_connect,
- auto_connect_cb, cbd, NULL)) {
- auto_connect_cb_free(cbd);
- return -EIO;
- }
-
- return -EINPROGRESS;
-}
-
-static gboolean disable_auto_connect_cb(gpointer data)
-{
- char *path = data;
- struct iwd_known_network *iwdkn;
-
- iwdkn = g_hash_table_lookup(known_networks, path);
- if (!iwdkn)
- return FALSE;
-
- if (set_auto_connect(iwdkn, false) != -EINPROGRESS)
- connman_warn("Failed to disable auto connect");
-
- iwdkn->auto_connect_id = 0;
- return FALSE;
-}
-
-static void disable_auto_connect(struct iwd_known_network *iwdkn)
-{
- if (iwdkn->auto_connect_id)
- return;
-
- iwdkn->auto_connect_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
- 0,
- disable_auto_connect_cb,
- g_strdup(iwdkn->path),
- g_free);
-}
-
static void known_network_property_change(GDBusProxy *proxy, const char *name,
DBusMessageIter *iter, void *user_data)
{
@@ -1567,8 +1649,7 @@ static void known_network_property_change(GDBusProxy
*proxy, const char *name,
DBG("%p auto_connect %d", path, iwdkn->auto_connect);
- if (iwdkn->auto_connect)
- disable_auto_connect(iwdkn);
+ update_auto_connect(iwdkn);
}
}
@@ -1607,9 +1688,6 @@ static void create_know_network(GDBusProxy *proxy)
g_dbus_proxy_set_property_watch(iwdkn->proxy,
known_network_property_change, NULL);
-
- if (iwdkn->auto_connect)
- disable_auto_connect(iwdkn);
}
static void create_station(GDBusProxy *proxy)
--
2.29.2
------------------------------
Date: Fri, 20 Nov 2020 16:48:05 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: Spam
To: Rudi <[email protected]>
Cc: connman <[email protected]>, [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Rudi,
On Thu, Nov 19, 2020 at 10:33:46PM +0100, Rudi wrote:
> from all the lists I'm subscribed to this by far the one with the
> worst SNR (i.e. spam vs. legitimate content). Can you *PLEASE* do
> something about that?
Yes, it's really bad since a few months. The list is hosted by the
01.org folks. I don't have any moderator/admin access to it.
Mabye someone on [email protected] could help?
Thanks,
Daniel
------------------------------
Date: Fri, 20 Nov 2020 17:05:45 -0000
From: [email protected]
Subject: Antivirus Software
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Mcafee.com/activate - Activation of the software is essential to reap higher
benefits from it. The users will require 25-characters activation key for
initiating the activation process. The activation process should be started
immediately after completing installing it from www.mcafee.com/activate. The
users can obtain the activation key beneath the package of the product if you
have made the purchase from a retail store.
visit on http://gomcafee.com/ | https://sortmcafee.com/activate/
Office.com/setup - After installing the Microsoft Office the next step you need
to do is to activate the installed Microsoft Office setup by entering the
product key for the setup. The product key is an activation code which is 25
digits long and it is in alphanumeric format. You need to enter the product key
in the same format as it is given.
visit on https://mynew-office.com/
------------------------------
Date: Fri, 20 Nov 2020 17:08:02 -0000
From: [email protected]
Subject: Antivirus Software
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Mcafee.com/activate - Activation of the software is essential to reap higher
benefits from it. The users will require 25-characters activation key for
initiating the activation process. The activation process should be started
immediately after completing installing it from www.mcafee.com/activate. The
users can obtain the activation key beneath the package of the product if you
have made the purchase from a retail store.
visit on http://gomcafee.com/ | https://sortmcafee.com/activate/
Office.com/setup - After installing the Microsoft Office the next step you need
to do is to activate the installed Microsoft Office setup by entering the
product key for the setup. The product key is an activation code which is 25
digits long and it is in alphanumeric format. You need to enter the product key
in the same format as it is given.
visit on https://mynew-office.com/
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 61, Issue 11
***************************************