Hi Daniel,

On Wed, Jan 29, 2020 at 2:47 AM Daniel Wagner <wagi@monom.org> wrote:
Hi Torsten,

On Tue, Jan 28, 2020 at 08:47:48PM -0500, Torsten Wörtwein wrote:
> On Tue, Jan 28, 2020 at 2:47 AM Daniel Wagner <wagi@monom.org> wrote:
> > One thing you could try for a workaround is to change the frequency
> > stored in the settings file. First stop ConnMan (because it will
> > overwrite those files). Go to
> > /var/lib/connman/wifi_xxxxxxx_726976656e64656c6c_managed_psk and edit
> > the settings file. There should be a Frequency entry with 5240. What
> > happens if you change this to 5500?
> >
>
> Thanks Daniel! Unfortunately, connman changes it automatically back to the
> router lower 5Ghz wifi (5240).
> Interestingly, the output of "connmand -n -d plugins/wifi.c" changed. It
> reports the repeaters 5Ghz wifi, which I manually entered:
>
> connmand[43097]: plugins/wifi.c:get_latest_connections() ssid
> 726976656e64656c6c freq 5500 modified 1580261980
>
> But it still ends up using 5240 (and changes the settings file back to
> 5240).

Too bad. I've got a setup with several APs spanning one network and
for me my device roams between the APs. I notice I don't see any of
the 'freq' debug messages. Any chance you could give the iwd plugin a
try? I really don't want to spend more time on wpa_supplicant.

I started IWD with

sudo /usr/lib/iwd/iwd -d

it then 'magically' (without connman) connected to the wifi - I assume it reads connman's settings for that. IWD found all five wifis:

src/station.c:station_add_seen_bss() Processing BSS '04:d9:f5:26:4f:69' with SSID: rivendell, freq: 5825, rank: 5932, strength: -6400
src/station.c:station_add_seen_bss() Processing BSS 'fa:1a:67:32:fa:1f' with SSID: rivendell, freq: 2417, rank: 4707, strength: -3900
src/station.c:station_add_seen_bss() Processing BSS 'fa:1a:67:32:fa:20' with SSID: rivendell, freq: 5500, rank: 4321, strength: -4400
src/station.c:station_add_seen_bss() Processing BSS '04:d9:f5:26:4f:61' with SSID: rivendell, freq: 2427, rank: 4306, strength: -5500
src/station.c:station_add_seen_bss() Processing BSS '04:d9:f5:26:4f:65' with SSID: rivendell, freq: 5240, rank: 2999, strength: -7000
src/station.c:station_autoconnect_next() Considering autoconnecting to BSS '04:d9:f5:26:4f:69' with SSID: rivendell, freq: 5825, rank: 5932, strength: -6400

5500 and 2417 should be the repeater, to which I  was closer at the moment. But it decided to connect to the router's high 5Ghz network.

And then started connmand:

sudo connmand -n -d plugins/iwd.c --wifi=iwd_agent

** (connmand:1923): WARNING **: 17:38:47.484: error fi.w1.wpa_supplicant1.UnknownError

It didn't print any frequency information.

IWD seems to occasionally roam between the wifis :) For a brief period it picked 2417. Overall it highly prefers 5825 even if that is the farthest one away (to be fair, it worked - I didn't encounter connection issues).

Thanks,
Torsten