Hi,

I'm using connman (1.33) on a raspberry pi 3B to connect to a hidden wifi. While this is working fine there is an strange behavior here :  after the connection is established (using wpa_supplicant), few seconds after connman switch to another AP which is broadcasting the same SSID (actually there are several AP on the same network at that place). Once this second connection is made connman stays connected properly.
The WiFi configuration is set on /var/lib/connman/wifi.config (with Hidden = true on the relevant service_wifi).

Extract of the relevant logs is below :

Dec 22 08:00:22 connmand[424]: Connection Manager version 1.33
connmand[424]: Adding configuration wifi
connmand[424]: Adding service configuration wifi_2458
[...]
systemd[1]: Started WPA supplicant.
connmand[424]: wlan0 {update} flags 36931 <UP,RUNNING>
wpa_supplicant[443]: wlan0: Trying to associate with 40:18:b1:0b:65:15 (SSID='name_of_the_ssid' freq=2437 MHz)
wpa_supplicant[443]: wlan0: Associated with 40:18:b1:0b:65:15
wpa_supplicant[443]: wlan0: WPA: Key negotiation completed with 40:18:b1:0b:65:15 [PTK=CCMP GTK=TKIP]
wpa_supplicant[443]: wlan0: CTRL-EVENT-CONNECTED - Connection to 40:18:b1:0b:65:15 completed [id=0 id_str=]
connmand[424]: wlan0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
Dec 22 08:00:25  connmand[424]: ntp: time slew -0.215447 s
[...] (nothing here related to either connman or wpa_supplicant)
Dec 22 08:00:29 wpa_supplicant[443]: wlan0: Trying to associate with 00:19:77:3a:d1:54 (SSID='name_of_the_ssid' freq=2462 MHz)
connmand[424]: wlan0 {RX} 239 packets 79003 bytes
connmand[424]: Probably roaming right now! Staying connected...
wpa_supplicant[443]: wlan0: Associated with 00:19:77:3a:d1:54
wpa_supplicant[443]: wlan0: WPA: Key negotiation completed with 00:19:77:3a:d1:54 [PTK=CCMP GTK=TKIP]
wpa_supplicant[443]: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:19:77:3a:d1:54 completed [id=0 id_str=]
connmand[424]: wlan0 {update} flags 102467 <UP,RUNNING,LOWER_UP>

Regarding the signal strengh with iwlist : Quality=36/70  Signal level=-74 dBm for 40:18:B1:0B:65:15 and Quality=46/70  Signal level=-64 dBm for 00:19:77:3A:D1:54

So is it an expected behavior ? If yes why and is it connman, wpa_supplicant or the AP which take the decision to switch AP ? Is there a way to force connman to stay on the first AP and only switch if it doesn't catch the signal anymore ?

Thanks,
Thomas