Re: Does connman support p2p Concurrent roles ?
Hi, Does connman support concurrent device role ? No. Is it possible via connman that one P2P device operates on 2.4GHz band and another operates on 5GHz band ? No. P2P Api would still need quite some work to do that, and anyway, most of the work is on how to interface wpa_supplicant properly for that. When you see the amount of code just to do the simplest thing with it... you can imagine how much work it represents to add such nicer behaviors. Tomasz ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Does connman support p2p Concurrent roles ?
Hi All, Does connman support concurrent device role ? Is it possible via connman that one P2P device operates on 2.4GHz band and another operates on 5GHz band ? Abhijit ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH] client: Add ClearProperty Service API
--- client/commands.c | 9 + 1 file changed, 9 insertions(+) diff --git a/client/commands.c b/client/commands.c index 2397883..ca8ceaa 100644 --- a/client/commands.c +++ b/client/commands.c @@ -1161,6 +1161,14 @@ static int cmd_config(char *args[], int num, struct connman_option *options) config_return, g_strdup(service_name), NULL, NULL); break; + case 'c': + res = __connmanctl_dbus_method_call(connection, + CONNMAN_SERVICE, path, + "net.connman.Service", "ClearProperty", + config_return, g_strdup(service_name), + config_append_str, &append); + index += append.values; + break; default: res = -EINVAL; break; @@ -2142,6 +2150,7 @@ static struct connman_option config_options[] = { {"autoconnect", 'a', "yes|no"}, {"ipv4", 'i', "off|dhcp|manual "}, {"remove", 'r', " Remove service"}, + {"clear", 'c', "property Clear service property"}, { NULL, } }; -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: Why and where does connman disables wpa_supplicant networks ?
Hi Pedro, Getting all the logs would help me, do like this: - stop wpa_supplicant and connman - start wpa_supplicant this way: wpa_supplicant -udddt &> wpa_s.log - start connman this way:CONNMAN_SUPPLICANT_DEBUG=1 connmand -dn &> connman.log Paste them on pasteall.org, for instance, and give the links. Btw, when you get disconnected: is it because you loose the connection or because you as a user requested a disconnect? When you disconnect by yourself, then connman will not autoconnect on that one (as long as it is present in the scan results) since it thinks you don't want to be connected anymore on that service. Tomasz ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: Why and where does connman disables wpa_supplicant networks ?
Hi Tomasz, Ok, I understand.. >> The problem you are experiencing is actually not this. >> It's connman not reconnecting automatically to any networks, am I right? Totally. I've extracted the logs for wpa_supplicant and connmand but there's a huge amount of information and I really don't know what should I be looking for. In any case, here is the tail of the wpa_supplicant log. You can see that a scan is requested to be done at 5 seconds but it does not starts (wlan0: Disconnected - do not scan) wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=SCANNING wlan0: State: SCANNING -> DISCONNECTED nl80211: Set wlan0 operstate 0->0 (DORMANT) netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT) EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 dbus: Unregister network object '/fi/w1/wpa_supplicant1/Interfaces/1/Networks/0' wlan0: Disconnected - do not scan wlan0: State: DISCONNECTED -> DISCONNECTED nl80211: Set wlan0 operstate 0->0 (DORMANT) netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT) Here is the tail of the connman log: Jan 28 18:48:40 DM-37x daemon.debug connmand[1036]: interface_add_network_result() PATH: /fi/w1/wpa_supplicant1/Interfaces/1/Networks/1 Jan 28 18:48:40 DM-37x daemon.debug connmand[1036]: interface_select_network_result() Jan 28 18:48:40 DM-37x daemon.debug connmand[1036]: signal_interface_changed() Jan 28 18:48:40 DM-37x daemon.debug connmand[1036]: interface_property() State Jan 28 18:48:40 DM-37x daemon.debug connmand[1036]: interface_property() state authenticating (5) Jan 28 18:48:41 DM-37x daemon.debug connmand[1036]: signal_interface_changed() Jan 28 18:48:41 DM-37x daemon.debug connmand[1036]: interface_property() State Jan 28 18:48:41 DM-37x daemon.debug connmand[1036]: interface_property() state disconnected (2) Jan 28 18:48:42 DM-37x daemon.debug connmand[1036]: signal_interface_changed() Jan 28 18:48:42 DM-37x daemon.debug connmand[1036]: interface_property() State Jan 28 18:48:42 DM-37x daemon.debug connmand[1036]: interface_property() state inactive (3) When I run wpa_supplicant without connman it always reconnects without problem. Thanks. -Mensaje original- De: connman [mailto:connman-boun...@connman.net] En nombre de Tomasz Bursztyka Enviado el: miƩrcoles, 03 de junio de 2015 12:05 Para: connman@connman.net Asunto: Re: Why and where does connman disables wpa_supplicant networks ? Hi Pedro, > After a disconnection I see the following on wpa_cli + list_networks: So basically here you are accessing wpa_supplicant through the unix socket interface which means your instance of wpa_supplicant is started with that unix socket interface in addition of the DBus one connman uses, so you probably load a conf file for wpa_supplicant on the way. All in all this is wrong. Only DBus interface should be there and connman should be the only one in charge. > >> network id / ssid / bssid / flags > 0 dlink any [DISABLED] > 1 dlink any > > As there is a network, wpa_supplicant keeps scanning and connects > succesfully, but after several reconnect-disconnect loops we get the > following: > >> network id / ssid / bssid / flags > 0 dlink any [DISABLED] > 1 dlink any [DISABLED] > 2 dlink any [DISABLED] > 3 dlink any [DISABLED] > 4 dlink any [DISABLED] > > So wpa_supplicant does not reconnects automatically since there are no > networks enabled. ConnMan, while connecting, adds the network in wpa_supplicant, and once it disconnects: it removes it. What you are seeing is due to how you run wpa_supplicant. > I've not seen this behaviour when using only wpa_supplicant. In that case the > network simply appears as this. Using only wpa_supplicant is a totally different thing versus using ConnMan. When using ConnMan, then it is the only one in charge of connecting/disconnecting and all the control should go through its dbus interface only, and nothing else. > 0 dlink any > > So my questions are, 1) why connman disables the networks and 2) how can we > disable that behaviour, since it is causing us great problems with several > customers. 1) ConnMan is in charge, thus does not care of any networks pre-configured in wpa_supplicant. The ones loaded from wpa_supplicant.conf I guess, which should not be loaded ever (since it means you enable the unix socket interface as well then.) 2) You cannot disable this behavior. The problem you are experiencing is actually not this. It's connman not reconnecting automatically to any networks, am I right? In that case let's review how you built connman and wpa_supplicant, how you configured connman (and not wpa_supplicant) etc... Because ConnMan is smart enough to drive wpa_supplicant in auto-scan, autoconnect, roam, and so on. Br, Tomasz _
Re: Why and where does connman disables wpa_supplicant networks ?
Hi Pedro, After a disconnection I see the following on wpa_cli + list_networks: So basically here you are accessing wpa_supplicant through the unix socket interface which means your instance of wpa_supplicant is started with that unix socket interface in addition of the DBus one connman uses, so you probably load a conf file for wpa_supplicant on the way. All in all this is wrong. Only DBus interface should be there and connman should be the only one in charge. network id / ssid / bssid / flags 0 dlink any [DISABLED] 1 dlink any As there is a network, wpa_supplicant keeps scanning and connects succesfully, but after several reconnect-disconnect loops we get the following: network id / ssid / bssid / flags 0 dlink any [DISABLED] 1 dlink any [DISABLED] 2 dlink any [DISABLED] 3 dlink any [DISABLED] 4 dlink any [DISABLED] So wpa_supplicant does not reconnects automatically since there are no networks enabled. ConnMan, while connecting, adds the network in wpa_supplicant, and once it disconnects: it removes it. What you are seeing is due to how you run wpa_supplicant. I've not seen this behaviour when using only wpa_supplicant. In that case the network simply appears as this. Using only wpa_supplicant is a totally different thing versus using ConnMan. When using ConnMan, then it is the only one in charge of connecting/disconnecting and all the control should go through its dbus interface only, and nothing else. 0 dlink any So my questions are, 1) why connman disables the networks and 2) how can we disable that behaviour, since it is causing us great problems with several customers. 1) ConnMan is in charge, thus does not care of any networks pre-configured in wpa_supplicant. The ones loaded from wpa_supplicant.conf I guess, which should not be loaded ever (since it means you enable the unix socket interface as well then.) 2) You cannot disable this behavior. The problem you are experiencing is actually not this. It's connman not reconnecting automatically to any networks, am I right? In that case let's review how you built connman and wpa_supplicant, how you configured connman (and not wpa_supplicant) etc... Because ConnMan is smart enough to drive wpa_supplicant in auto-scan, autoconnect, roam, and so on. Br, Tomasz ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Why and where does connman disables wpa_supplicant networks ?
Hi, We are having a problem in what seems the interaction between connman (1.29) and wpa_supplicant (2.3). It seems that connman disables the wpa_supplicant network each time it gets disconnected (by disconnected I mean beacon loss detection). After a disconnection I see the following on wpa_cli + list_networks: > network id / ssid / bssid / flags 0 dlink any [DISABLED] 1 dlink any As there is a network, wpa_supplicant keeps scanning and connects succesfully, but after several reconnect-disconnect loops we get the following: > network id / ssid / bssid / flags 0 dlink any [DISABLED] 1 dlink any [DISABLED] 2 dlink any [DISABLED] 3 dlink any [DISABLED] 4 dlink any [DISABLED] So wpa_supplicant does not reconnects automatically since there are no networks enabled. I've not seen this behaviour when using only wpa_supplicant. In that case the network simply appears as this. > network id / ssid / bssid / flags 0 dlink any So my questions are, 1) why connman disables the networks and 2) how can we disable that behaviour, since it is causing us great problems with several customers. Thanks. ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH 2/2] client: Add MoveAfter Service API
--- client/commands.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/client/commands.c b/client/commands.c index 5e342a5..2397883 100644 --- a/client/commands.c +++ b/client/commands.c @@ -786,6 +786,62 @@ static int cmd_service_move_before(char *args[], int num, services->target); } +static int move_after_return(DBusMessageIter *iter, const char *error, + void *user_data) +{ + struct move_service *services = user_data; + + if (!error) { + char *service = strrchr(services->service, '/'); + service++; + char *target = strrchr(services->target, '/'); + target++; + fprintf(stdout, "Moved %s after %s\n", service, target); + } else + fprintf(stderr, "Error %s: %s\n", services->service, error); + + g_free(services->service); + g_free(services->target); + g_free(user_data); + + return 0; +} + +static void move_after_append_args(DBusMessageIter *iter, void *user_data) +{ + char *path = user_data; + + dbus_message_iter_append_basic(iter, + DBUS_TYPE_OBJECT_PATH, &path); + + return; +} + +static int cmd_service_move_after(char *args[], int num, + struct connman_option *options) +{ + const char *iface = "net.connman.Service"; + struct move_service *services = g_new(struct move_service, 1); + + if (num > 3) + return -E2BIG; + + if (num < 3) + return -EINVAL; + + if (check_dbus_name(args[1]) == false) + return -EINVAL; + + services->service = g_strdup_printf("/net/connman/service/%s", args[1]); + services->target = g_strdup_printf("/net/connman/service/%s", args[2]); + + return __connmanctl_dbus_method_call(connection, CONNMAN_SERVICE, + services->service, iface, "MoveAfter", + move_after_return, services, + move_after_append_args, + services->target); +} + static int config_return(DBusMessageIter *iter, const char *error, void *user_data) { @@ -2462,6 +2518,9 @@ static const struct { { "move-before", " ", NULL, cmd_service_move_before, "Move a service before another service", lookup_service_arg }, + { "move-after", "", NULL, + cmd_service_move_after, "Move a service after another service", + lookup_service_arg }, { "config", "",config_options, cmd_config, "Set service configuration options", lookup_config }, { "monitor", "[off]",monitor_options, cmd_monitor, -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH 0/2] client: Add Service API MoveBefore/MoveAfter
Saurav Babu (2): client: Add MoveBefore Service API client: Add MoveAfter Service API client/commands.c | 123 ++ 1 file changed, 123 insertions(+) -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH 1/2] client: Add MoveBefore Service API
--- client/commands.c | 64 +++ 1 file changed, 64 insertions(+) diff --git a/client/commands.c b/client/commands.c index 9208016..5e342a5 100644 --- a/client/commands.c +++ b/client/commands.c @@ -725,6 +725,67 @@ static int cmd_disconnect(char *args[], int num, struct connman_option *options) disconnect_return, path, NULL, NULL); } +struct move_service { + char *service; + char *target; +}; + +static int move_before_return(DBusMessageIter *iter, const char *error, + void *user_data) +{ + struct move_service *services = user_data; + + if (!error) { + char *service = strrchr(services->service, '/'); + service++; + char *target = strrchr(services->target, '/'); + target++; + fprintf(stdout, "Moved %s before %s\n", service, target); + } else + fprintf(stderr, "Error %s: %s\n", services->service, error); + + g_free(services->service); + g_free(services->target); + g_free(user_data); + + return 0; +} + +static void move_before_append_args(DBusMessageIter *iter, void *user_data) +{ + char *path = user_data; + + dbus_message_iter_append_basic(iter, + DBUS_TYPE_OBJECT_PATH, &path); + + return; +} + +static int cmd_service_move_before(char *args[], int num, + struct connman_option *options) +{ + const char *iface = "net.connman.Service"; + struct move_service *services = g_new(struct move_service, 1); + + if (num > 3) + return -E2BIG; + + if (num < 3) + return -EINVAL; + + if (check_dbus_name(args[1]) == false) + return -EINVAL; + + services->service = g_strdup_printf("/net/connman/service/%s", args[1]); + services->target = g_strdup_printf("/net/connman/service/%s", args[2]); + + return __connmanctl_dbus_method_call(connection, CONNMAN_SERVICE, + services->service, iface, "MoveBefore", + move_before_return, services, + move_before_append_args, + services->target); +} + static int config_return(DBusMessageIter *iter, const char *error, void *user_data) { @@ -2398,6 +2459,9 @@ static const struct { "Connect a given service or peer", lookup_service_arg }, { "disconnect", "", NULL, cmd_disconnect, "Disconnect a given service or peer", lookup_service_arg }, + { "move-before", " ", NULL, + cmd_service_move_before, "Move a service before another service", + lookup_service_arg }, { "config", "",config_options, cmd_config, "Set service configuration options", lookup_config }, { "monitor", "[off]",monitor_options, cmd_monitor, -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
AW: Disable rp_filter in main.conf
Hi, I need to have rp_filter = 0 at least at the network interfaces which are ignored by connman. Is there any interest that this is solved in a generic way (which can then possibly go upstream)? For example: - introduce a new config option for rp_filter or - handle the rp_filter setting interface based instead of 'all' or - other suggestion ... Thanks ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman