How to set up wifi.config to be a WiFi AP
by JH
Hi,
I usually set up the wifi.config to be a wifi client to connect to
WiFi route in house, how can I set up wifi.config in my device, so it
can be a WiFi AP?
Thank you.
Kind regards,
- jh
2 years, 4 months
Weird behavior
by JH
Hi,
I found it strange, how it could be an error of
/net/connman/technology/wifi: Not supported, but in technologies,
there was /net/connman/technology/wifi?
connmanctl> agent on
Agent registered
connmanctl> services
connmanctl> enable wifi
Error wifi: Already enabled
connmanctl> scan wifi
Error /net/connman/technology/wifi: Not supported
connmanctl> technologies
/net/connman/technology/cellular
Name = Cellular
Type = cellular
Powered = True
Connected = False
Tethering = False
/net/connman/technology/wifi
Name = WiFi
Type = wifi
Powered = True
Connected = False
Tethering = False
Thank you.
Kind regards,
- jh
2 years, 4 months
How to configure disconnected Ethernet?
by Sergey Organov
Hello,
I'm using connman 1.37 on embedded ARM device running Linux 4.9.146.
When Ethernet cable is connected to the board, everything works as
expected and I can see the service (and all its properties):
# connmanctl services
*AO Wired ethernet_0018d7677f91_cable
#
However, once I disconnect the cable, the service disappears, and I get:
# connmanctl services
# connmanctl services ethernet_0018d7677f91_cable
Error ethernet_0018d7677f91_cable: Method "GetProperties" with signature "" on interface "net.connman.Service" doesn't exist
#
The question is: how do I get Ethernet service configuration and/or
re-configure it when there is no cable connected; for example, how do I
change configuration so that at the next connect of the cable the
service would use static IPv4 instead of DHCP?
-- Sergey
2 years, 4 months
Doesn't connect to strongest wifi
by Torsten Wörtwein
Hi,
I have one router which broadcasts 2GHz and 5GHz on the same SSID with the
same security settings. I also have a repeater which does exactly the same
(2+5Ghz, same SSID as the router, and same security settings as the
router). I have one visible entry in connman which merges all four of these
wifis.
Connman always connects to the router, even when the signal of the repeater
is much stronger. It would be great if connman would connect to the
stronger wifi source.
I'm running ArchLinux with connman 1.37, WPA-supplicant 2.9, and kernel
4.19.98. Please let me know how I can provide more useful information about
this issue.
Thanks,
Torsten
2 years, 4 months
[PATCH] openvpn: Disable connection retry attempts when TCP is used as transport
by Jussi Laakkonen
By default OpenVPN will retry the connection ad infinitum with TCP
unless the limit is explicitly specified. The process is not restarted,
nor is the error reported via management channel.
When establishing the connection following is being output by OpenVPN
if the TCP connection is reset, but none of this is reported back to
ConnMan and OpenVPN keeps on trying:
openvpn[18161]: Attempting to establish TCP connection with [AF_INET]<IP>:<PORT> [nonblock]
openvpn[18161]: TCP connection established with [AF_INET]<IP>:<PORT>
openvpn[18161]: TCP_CLIENT link local: (not bound)
openvpn[18161]: TCP_CLIENT link remote: [AF_INET]<IP>:<PORT>
openvpn[18161]: Connection reset, restarting [0]
openvpn[18161]: SIGUSR1[soft,connection-reset] received, process restarting
openvpn[18161]: Restart pause, 5 second(s)
The delay will increase up to 300s. And the process may just keep on
going if the connection is only reset.
If the TCP connection breaks while OpenVPN is in connected state, and
hostname of the VPN server is used following is output by OpenVPN - and
still none of this is reported to ConnMan via management socket:
openvpn[5639]: RESOLVE: Cannot resolve host address: <addr> (Temporary failure in name resolution)
openvpn[5639]: RESOLVE: Cannot resolve host address: <addr> (Temporary failure in name resolution)
openvpn[5639]: Could not determine IPv4/IPv6 protocol
openvpn[5639]: SIGUSR1[soft,init_instance] received, process restarting
openvpn[5639]: Restart pause, 160 second(s)
After this network neturally ceases to work, DNS servers set cannot
respond because there is no TCP connection to the VPN server and the VPN
adapter set as default route will drop all packets because of that. For
this reason it is better to let OpenVPN connect only once and report the
error back to ConnMan. Therefore, disable connection retrying by setting
the retry count to 1 (no retry).
---
vpn/plugins/openvpn.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/vpn/plugins/openvpn.c b/vpn/plugins/openvpn.c
index 75f5cb86..bc0303c2 100644
--- a/vpn/plugins/openvpn.c
+++ b/vpn/plugins/openvpn.c
@@ -506,6 +506,19 @@ static int run_connect(struct ov_private_data *data,
*/
connman_task_add_argument(task, "--ping-restart", "0");
+ /*
+ * Disable connetion retrying when OpenVPN is connected over TCP.
+ * With TCP OpenVPN attempts to handle reconnection silently without
+ * reporting the error back when establishing a connection or
+ * reconnecting as succesful one. The latter causes trouble if the
+ * retries are not limited to 1 (no retry) as the interface is up and
+ * connman regards it as the default route and network ceases to work,
+ * including DNS.
+ */
+ option = vpn_provider_get_string(provider, "OpenVPN.Proto");
+ if (option && g_str_has_prefix(option, "tcp"))
+ connman_task_add_argument(task, "--connect-retry-max", "1");
+
err = connman_task_run(task, ov_died, data, NULL, NULL, NULL);
if (err < 0) {
data->cb = NULL;
--
2.20.1
2 years, 4 months