All of lore.kernel.org
 help / color / mirror / Atom feed
* iwd picking worse network despite better one available
@ 2024-03-27 18:36 Sven-Hendrik Haase
  2024-03-27 18:54 ` James Prestwood
  0 siblings, 1 reply; 6+ messages in thread
From: Sven-Hendrik Haase @ 2024-03-27 18:36 UTC (permalink / raw)
  To: iwd

Hello,

I've spent a good chunk of my evening looking into why iwd doesn't select the network I want it to select. I have a network "Home" with two APs. iwd seems to strongly prefer the AP that is further away and that has worse strength as measured by iwd.

From some testing, I believe it has to do with the AP rather than the wifi adapter. I tested a wifi adapter using mt7921e and one using iwlwifi and the result is the same in both cases. The APs are both pretty modern: The one iwd doesn't like is a FRITZ!Box 7590 AX while the one it likes is a FRITZ!Repeater 6000. From the log it seems that iwd is unable to perform a proper data rate estimation and then falls back to some default. At any rate, the rank would indicate that the estimated data rate plays an important role. If I use the developer mode to force roaming to the AP I want (named "better" in the log) then I'm able to use it perfectly well with a good data rate.

As such I think this is a bug _somewhere_ but I'm not exactly sure where. I searched the configuration options but it seems it's not possible to turn off the data rate estimations for the ranking. I'd be perfectly happy to just go by signal strength. However, I suppose it would be better to actually fix the core problem in iwd.

Log is here:

Mar 27 16:01:55 cypher systemd[1]: Starting Wireless service...
Mar 27 16:01:55 cypher iwd[30930]: Wireless daemon version 2.16
Mar 27 16:01:55 cypher iwd[30930]: src/main.c:main() Using configuration directory /etc/iwd
Mar 27 16:01:55 cypher iwd[30930]: src/storage.c:storage_create_dirs() Using state directory /var/lib/iwd
Mar 27 16:01:55 cypher systemd[1]: Started Wireless service.
Mar 27 16:01:55 cypher iwd[30930]: src/main.c:nl80211_appeared() Found nl80211 interface
Mar 27 16:01:55 cypher iwd[30930]: src/module.c:iwd_modules_init()
Mar 27 16:01:55 cypher iwd[30930]: station: Network configuration is disabled.
Mar 27 16:01:55 cypher iwd[30930]: src/wsc.c:wsc_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap.c:__eap_method_enable()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-wsc.c:eap_wsc_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-md5.c:eap_md5_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-tls.c:eap_tls_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-ttls.c:eap_ttls_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-mschapv2.c:eap_mschapv2_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-sim.c:eap_sim_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-aka.c:eap_aka_prime_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-aka.c:eap_aka_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-peap.c:eap_peap_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-gtc.c:eap_gtc_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-pwd.c:eap_pwd_init()
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_wiphy_dump_callback() New wiphy phy0 added (0)
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_wiphy_dump_done()
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_filtered_wiphy_dump_done()
Mar 27 16:01:55 cypher iwd[30930]: Wiphy: 0, Name: phy0
Mar 27 16:01:55 cypher iwd[30930]:         Permanent Address: redacted
Mar 27 16:01:55 cypher iwd[30930]:         2.4GHz Band:
Mar 27 16:01:55 cypher iwd[30930]:                 Bitrates (non-HT):
Mar 27 16:01:55 cypher iwd[30930]:                          1.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          2.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          5.5 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         11.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          6.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          9.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         12.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         18.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         24.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         36.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         48.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         54.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                 HT Capabilities:
Mar 27 16:01:55 cypher iwd[30930]:                         HT40
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 20Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 40Mhz
Mar 27 16:01:55 cypher iwd[30930]:                 HT RX MCS indexes:
Mar 27 16:01:55 cypher iwd[30930]:                         0-15
Mar 27 16:01:55 cypher iwd[30930]:                 HE Capabilities
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: ap
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: station
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:         5GHz Band:
Mar 27 16:01:55 cypher iwd[30930]:                 Bitrates (non-HT):
Mar 27 16:01:55 cypher iwd[30930]:                          6.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          9.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         12.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         18.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         24.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         36.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         48.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         54.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                 HT Capabilities:
Mar 27 16:01:55 cypher iwd[30930]:                         HT40
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 20Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 40Mhz
Mar 27 16:01:55 cypher iwd[30930]:                 HT RX MCS indexes:
Mar 27 16:01:55 cypher iwd[30930]:                         0-15
Mar 27 16:01:55 cypher iwd[30930]:                 VHT Capabilities:
Mar 27 16:01:55 cypher iwd[30930]:                         160 Mhz operation
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 80Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 160 and 80 + 80 Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Max RX MCS: 0-9 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max TX MCS: 0-9 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                 HE Capabilities
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: ap
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: station
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:         6GHz Band:
Mar 27 16:01:55 cypher iwd[30930]:                 Bitrates (non-HT):
Mar 27 16:01:55 cypher iwd[30930]:                          6.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          9.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         12.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         18.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         24.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         36.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         48.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         54.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                 HE Capabilities
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: ap
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: station
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:         Ciphers: BIP-CMAC-256 BIP-GMAC-256 BIP-GMAC-128 CCMP-256
Mar 27 16:01:55 cypher iwd[30930]:                  GCMP-256 GCMP-128 BIP-CMAC-128 CCMP-128
Mar 27 16:01:55 cypher iwd[30930]:                  TKIP
Mar 27 16:01:55 cypher iwd[30930]:         Supported iftypes: station ap p2p-client p2p-go
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_interface_dump_done()
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_create_interfaces() creating wlan0
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_update_reg_domain() New reg domain country code for (global) is DE
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_config_notify() Notification of command New Interface(7)
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_new_station_interface_cb()
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_create_from_genl() Created interface wlan0[6 5]
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_set_4addr() netdev: 6 use_4addr: 0
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_initial_up_cb() Interface 6 initialized
Mar 27 16:01:55 cypher iwd[30930]: event: state, old: disconnected, new: autoconnect_quick
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_radio_work_insert() Inserting work item 1
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_radio_work_next() Starting work item 1
Mar 27 16:01:55 cypher iwd[30930]: src/rrm.c:rrm_add_frame_watches()
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_config_notify() Notification of command Set Interface(6)
Mar 27 16:01:55 cypher iwd[30930]: src/scan.c:scan_notify() Scan notification Trigger Scan(33)
Mar 27 16:01:55 cypher iwd[30930]: src/scan.c:scan_request_triggered() Active scan triggered for wdev 5
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_quick_scan_triggered() Quick scan triggered for wlan0
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/scan.c:scan_notify() Scan notification New Scan Results(34)
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: wiphy_estimate_data_rate() failed
Mar 27 16:01:55 cypher iwd[30930]: wiphy_estimate_data_rate() failed
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'worse:2d' with SSID: Home, freq: 2412, rank: 469, strength: -7100, data_rate: 68.8
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Added new Network "Home" security psk
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'better:f1' with SSID: Home, freq: 2462, rank: 16, strength: -4700, data_rate: 2.0
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'better:f0' with SSID: Home, freq: 5180, rank: 16, strength: -5500, data_rate: 2.0
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'worse:2e' with SSID: Home, freq: 5180, rank: 13, strength: -9000, data_rate: 2.0
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_autoconnect_start()
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_select_akm() Network is WPA3-Personal...
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_autoconnect_next() autoconnect: Trying SSID: Home
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_autoconnect_next() autoconnect: 'worse:2d' freq: 2412, rank: 469, strength: -7100
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_select_akm() Network is WPA3-Personal...
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_cqm_rssi_update()
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_radio_work_insert() Inserting work item 2
Mar 27 16:01:55 cypher iwd[30930]: event: connect-info, ssid: Home, bss: worse:2d, signal: -71, load: 127/255

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-28 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 18:36 iwd picking worse network despite better one available Sven-Hendrik Haase
2024-03-27 18:54 ` James Prestwood
2024-03-27 19:21   ` Sven-Hendrik Haase
2024-03-28 13:48     ` James Prestwood
2024-03-28 16:21       ` Sven-Hendrik Haase
2024-03-28 16:45         ` James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.