Hi,
I found a issue in the last version of the connmand in the repository
(commit 4227576726725a2c5f0e8c271769fbf0765b5b54 Wed Jul 29 16:23:25 2015
+0300) , but I detected it from the 1.28 version.
The devices is compiled for mipsel, it is compiled with the flag "
--enable-pie". The OS is yocto.
The configuration files has this option:
[General]
InputRequestTimeout=3600
BackgroundScanning=false
DefaultAutoConnectTechnologies=
*SingleConnectedTechnology=true*
The connection wit Ethernet is configured wit the auto connect. The problem
came when i try to switch from the WiFi to the Ethernet. I observed form
the trace this steps in the process:
There is a issue with the *SingleConnectedTechnology= true* in connman. The
process in connman for switch between Ethernet and WiFi follow these steps:
1. It is connected to one technology e.g Ethernet.
2. It connects to the other technology in this example WiFi. All
parameters from the new network are configured. In this moment the devices
has two connection.
3. it has a two connection, so the function single_connected_tech is
called and it keeps the WiFi network and disconnect the Ethernet service:
connmand[24386]: src/service.c:single_connected_tech() keeping
0x556afe20 /net/connman/service/wifi_7cdd907e2a65_4469676957494649_managed_psk
connmand[24386]: src/service.c:single_connected_tech()
disconnecting 0x556addd0
/net/connman/service/ethernet_0016e84dcaab_cable
4. The Ethernet service is disconnected and removed his configuration.
However there is a moment where Ethernet is disconnect for the IPv4 and the
IPv6 is ready. it declares itself ready. It happens always in the
disconnect process when the network has IPv4 and IPv6.
connmand[24386]: src/service.c:service_indicate_state() service
0x556addd0 old online - new disconnect/ready => ready
5. The devices has again two technology, so single_connected_tech is
called again. However, the ethernet connection is kept now, because it is
the last network is connected
connmand[24386]: src/service.c:single_connected_tech() keeping
0x556addd0 /net/connman/service/ethernet_0016e84dcaab_cable
connmand[24386]: src/service.c:single_connected_tech()
disconnecting 0x556afe20
/net/connman/service/wifi_7cdd907e2a65_4469676957494649_managed_psk
6. Connman crashes because it try to use the Ethernet network but it was
removed partially.
jhannika sent to me one possible patch (it is attached), but he
doesn't believe why it can solve the issue, also it can make a new
issue. In fact, it makes a new issue if the BackgroundScanning=true,
it can't connect never with the WiFi network, it is associate state always.
Can you make a ticket in your JIRA for following this issue? please. I
continue to investigate it, but I didn't find the solution and I think that
there is a issue in the state machine. I need to follow if somebody has the
same issue or if it will be solved.
Thanks very much
Alejandro Abejon
Software Developer in Digisoft.tv
From eb750761684d74e29a63673d5059e3d0eeac8612 Mon Sep 17 00:00:00 2001
From: jhannika <email@email>
Date: Fri, 7 Aug 2015 15:01:21 +0300
Subject: [PATCH] service: Prefer 'disconnect' as a state over 'online'
---
src/service.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/service.c b/src/service.c
index 921a0e4..cae76b8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -807,52 +807,52 @@ static enum connman_service_state combine_state(
goto done;
}
- if (state_a == CONNMAN_SERVICE_STATE_ONLINE) {
+ if (state_a == CONNMAN_SERVICE_STATE_DISCONNECT) {
result = state_a;
goto done;
}
- if (state_b == CONNMAN_SERVICE_STATE_ONLINE) {
+ if (state_b == CONNMAN_SERVICE_STATE_DISCONNECT) {
result = state_b;
goto done;
}
- if (state_a == CONNMAN_SERVICE_STATE_READY) {
+ if (state_a == CONNMAN_SERVICE_STATE_ONLINE) {
result = state_a;
goto done;
}
- if (state_b == CONNMAN_SERVICE_STATE_READY) {
+ if (state_b == CONNMAN_SERVICE_STATE_ONLINE) {
result = state_b;
goto done;
}
- if (state_a == CONNMAN_SERVICE_STATE_CONFIGURATION) {
+ if (state_a == CONNMAN_SERVICE_STATE_READY) {
result = state_a;
goto done;
}
- if (state_b == CONNMAN_SERVICE_STATE_CONFIGURATION) {
+ if (state_b == CONNMAN_SERVICE_STATE_READY) {
result = state_b;
goto done;
}
- if (state_a == CONNMAN_SERVICE_STATE_ASSOCIATION) {
+ if (state_a == CONNMAN_SERVICE_STATE_CONFIGURATION) {
result = state_a;
goto done;
}
- if (state_b == CONNMAN_SERVICE_STATE_ASSOCIATION) {
+ if (state_b == CONNMAN_SERVICE_STATE_CONFIGURATION) {
result = state_b;
goto done;
}
- if (state_a == CONNMAN_SERVICE_STATE_DISCONNECT) {
+ if (state_a == CONNMAN_SERVICE_STATE_ASSOCIATION) {
result = state_a;
goto done;
}
- if (state_b == CONNMAN_SERVICE_STATE_DISCONNECT) {
+ if (state_b == CONNMAN_SERVICE_STATE_ASSOCIATION) {
result = state_b;
goto done;
}
--
2.1.0_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman