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. [PATCH RFC] Always Connect to Interfaces with AutoConnect
(Collin Richards)
2. [PATCH RFC] service: Add AlwaysConnect feature (Collin Richards)
3. Background scan issues? (Gammel Holte)
----------------------------------------------------------------------
Message: 1
Date: Mon, 25 Jul 2016 16:13:03 -0500
From: Collin Richards <[email protected]>
To: <[email protected]>
Subject: [PATCH RFC] Always Connect to Interfaces with AutoConnect
Message-ID: <[email protected]>
Content-Type: text/plain
Hi,
I would like to have people's input on the included patch that enables
autoconnecting to all interfaces that have AutoConnect=true, a feature I am
calling AlwaysConnect. I believe this feature or a similar one has been
asked about multiple times [1] [2] [3].
[1] https://www.mail-archive.com/connman%40connman.net/msg17388.html
[2] https://lists.01.org/pipermail/connman/2016-July/000819.html
[3] https://www.mail-archive.com/[email protected]/msg18683.html
Thanks,
Collin
Collin Richards (1):
service: Add AlwaysConnect feature
src/main.c | 14 ++++++++++++++
src/main.conf | 6 ++++++
src/service.c | 9 +++++++--
3 files changed, 27 insertions(+), 2 deletions(-)
--
1.9.1
------------------------------
Message: 2
Date: Mon, 25 Jul 2016 16:13:04 -0500
From: Collin Richards <[email protected]>
To: <[email protected]>
Subject: [PATCH RFC] service: Add AlwaysConnect feature
Message-ID: <[email protected]>
Content-Type: text/plain
When devices are set to AutoConnect=true they will not be connected if
there is already a device connected higher in the preferred technology
list. Add an option that will allow connecting all services with
AutoConnect=true even if there is already a service connected with
higher preference.
---
src/main.c | 14 ++++++++++++++
src/main.conf | 6 ++++++
src/service.c | 9 +++++++--
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index f44a2ed..f9fe5f2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -76,6 +76,7 @@ static struct {
char **tethering_technologies;
bool persistent_tethering_mode;
bool enable_6to4;
+ bool always_connect;
} connman_settings = {
.bg_scan = true,
.pref_timeservers = NULL,
@@ -90,6 +91,7 @@ static struct {
.tethering_technologies = NULL,
.persistent_tethering_mode = false,
.enable_6to4 = false,
+ .always_connect = false,
};
#define CONF_BG_SCAN "BackgroundScanning"
@@ -105,6 +107,7 @@ static struct {
#define CONF_TETHERING_TECHNOLOGIES "TetheringTechnologies"
#define CONF_PERSISTENT_TETHERING_MODE "PersistentTetheringMode"
#define CONF_ENABLE_6TO4 "Enable6to4"
+#define CONF_ALWAYS_CONNECT "AlwaysConnect"
static const char *supported_options[] = {
CONF_BG_SCAN,
@@ -120,6 +123,7 @@ static const char *supported_options[] = {
CONF_TETHERING_TECHNOLOGIES,
CONF_PERSISTENT_TETHERING_MODE,
CONF_ENABLE_6TO4,
+ CONF_ALWAYS_CONNECT,
NULL
};
@@ -367,6 +371,13 @@ static void parse_config(GKeyFile *config)
connman_settings.enable_6to4 = boolean;
g_clear_error(&error);
+
+ boolean = __connman_config_get_bool(config, "General",
+ CONF_ALWAYS_CONNECT, &error);
+ if (!error)
+ connman_settings.always_connect = boolean;
+
+ g_clear_error(&error);
}
static int config_init(const char *file)
@@ -544,6 +555,9 @@ bool connman_setting_get_bool(const char *key)
if (g_str_equal(key, CONF_ENABLE_6TO4))
return connman_settings.enable_6to4;
+ if (g_str_equal(key, CONF_ALWAYS_CONNECT))
+ return connman_settings.always_connect;
+
return false;
}
diff --git a/src/main.conf b/src/main.conf
index acceda3..ab59703 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -101,3 +101,9 @@
# quality. See RFC6343. Default value is false (as recommended by RFC6343
# section 4.1).
# Enable6to4 = false
+#
+# Always connect all services that have autoconnect set to true. The default
+# behavior (AlwaysConnect = false) will only connect the services if it is a
+# higher preference technology than any services that are already connected.
+# This setting is overriden if SingleConnectedTechnologies is enabled.
+# AlwaysConnect = false
diff --git a/src/service.c b/src/service.c
index 768426b..89d1ee1 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3753,6 +3753,7 @@ static bool auto_connect_service(GList *services,
struct connman_service *service = NULL;
bool ignore[MAX_CONNMAN_SERVICE_TYPES] = { };
bool autoconnecting = false;
+ bool always_connect = connman_setting_get_bool("AlwaysConnect");
GList *list;
DBG("preferred %d sessions %d reason %s", preferred, active_count,
@@ -3772,8 +3773,12 @@ static bool auto_connect_service(GList *services,
if (service->pending ||
is_connecting(service) ||
is_connected(service)) {
- if (!active_count)
- return true;
+ if (!active_count) {
+ if (always_connect)
+ continue;
+ else
+ return true;
+ }
ignore[service->type] = true;
autoconnecting = true;
--
1.9.1
------------------------------
Message: 3
Date: Tue, 26 Jul 2016 00:04:48 +0100
From: Gammel Holte <[email protected]>
To: [email protected]
Subject: Background scan issues?
Message-ID:
<CAGFCsG8+1zvL3muS1RK=_gkxfcj3stfvwrgtk64pmobuvfc...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi,
I am still experiencing this issue. In a nutshell:
- I have 2 wireless cards b43 (MacBook Air internal) and ath9k (Alfa, USB
interface & high-gain antenna).
- On slightly weak wireless network signals (-65 to -75 dB) connman keeps
putting my card into scanning mode, thinking I'm roaming. The connection
becomes a nightmare to use. This happens with both cards, and I can
reproduce it on a variety of hotspots.
- If I use plain wpa_supplicant, instantiated by myself or systemd-networkd
(which in turn instantiates wpa_supplicant) with default parameters, my
wireless works fine. I can hold the connection for many hours.
- I think the offending line is #define BGSCAN_DEFAULT "simple:30:-65:300"
in https://github.com/aldebaran/connman/blob/master/plugins/wifi.c
What's the reason to change wpa_supplicant defaults to a much more
aggressive roaming threshold?
Thanks,
A.
---------- Forwarded message ----------
From: Tomasz Bursztyka <[email protected]>
Date: Wed, Aug 13, 2014 at 8:17 AM
Subject: Re: Background scan issues?
To: [email protected]
Hi,
Thanks. I agree that it looks hardware related. But several people in
> the Arch Linux forums were complaining about the same issue, so it
> might be a widespread Linux driver shortcoming worth considering.
>
Wait, using only ConnMan or not? Because if that happens only with
ConnMan...
Maybe finally we have an issue there.
Surprisingly if I run wpa_supplicant with this settings:
> http://pastebin.com/p4xsS5ri (using netctl) my connection is stable.
>
> Here's the log for connman and wpa_supplicant:
> http://pastebin.com/PTfixCF8 http://pastebin.com/NgWsLap6
>
> How can I make connman instantiate wpa_supplicant with the -ddt option?
>
Best is you stop both connman and wpa_supplicant and you restart them by
hand, wpa_supplicant first.
./wpa_supplicant -u -ddt &> wpa_supplicant.log
then on another terminal: CONNMAN_SUPPLICANT_DEBUG=1 connmand -n -d &>
connman.log
and you paste the *.log files.
Thanks,
Tomasz
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.01.org/pipermail/connman/attachments/20160726/7135297c/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 9, Issue 16
**************************************