wifi-connect: Failing to start on Raspberry Pi Zero W running Bullseye: D-Bus failure

After updating to Raspberry Pi OS Bullseye, wifi-connect will not launch Raspberry Pi Zero W. It does run fine on a Raspberry Pi 4.

Logs

[network_manager::device:WARN] Undefined device type: 30
WiFi device: wlan0
[network_manager::dbus_api:ERROR] Get org.freedesktop.NetworkManager.AccessPoint::RsnFlags property failed on /org/freedesktop/NetworkManager/AccessPoint/4: wrong property type
Error: Getting access points failed
  caused by: D-Bus failure: Get org.freedesktop.NetworkManager.AccessPoint::RsnFlags property failed on /org/freedesktop/NetworkManager/AccessPoint/4: wrong property type

About this issue

Most upvoted comments

I guess this is connected with.

https://github.com/balena-os/wifi-connect/issues/397

I ran into the same problem as well. I did some extensive debugging and found out that this error is caused if an access point in the list is present which supports WPA3 security profile. My iOS15 device personal hotspot feature was turned on and as WPA3 security was added to iOS15 the personal hotspot access point does show up as such. If I do turn off the personal hotspot the error vanishes and wifi-connect does work as expected.

This page states,

https://developer-old.gnome.org/NetworkManager/stable/nm-dbus-types.html#NM80211ApSecurityFlags

the WPA3 RsnFlag is supported since NetworkManager v1.30, the default on Ubuntu20.04 is 1.22.10-9. I guess the same error does occur if an access point is present which supports the WPA/RSN Opportunistic Wireless Encryption transition mode is supported which is supported since NetworkManager v1.26. See the provided link for details on the different RsnFlags.

So I guess, the solution would be to use NetworkManager >v1.30. As this is not the stable version for Ubuntu @balenaio should fix the error handling of unknown RsnFlags in the wifi-connect source.

@ndmgrphc are you using wifi-connect 4.4.6 or 4.11.1? With 4.11.1 you should not observe the RsnFlags error. For aarch64 you may get the aarch release from here: https://github.com/balena-os/wifi-connect/releases/tag/v4.11.1 as the Raspbian installer currently does not support that version.

This is now fixed in v4.11.1.

How did you guys get this solved? I’m having the same issue but can’t figure out how to overcome it

You should be fine with using older NetworkManager versions - whatever comes as default to the OS.

In their packages repo they include now very recent version of NetworkManager - 1.42.0: http://archive.raspbian.org/raspbian/pool/main/n/network-manager/. You may try upgrading all the packages on the system.

Note on how I solved it:

  • Cloned the repo git clone https://github.com/balena-os/wifi-connect/; cd wifi-connect.
  • Checked out v4.4.6, git checkout v4.4.6.
  • Cloned network-manager to a directory in the repo: git clone https://github.com/balena-io-modules/network-manager.
  • Edited Cargo.toml to build the local network-manager: network-manager = { path = "network-manager" }.
  • Edited src/wifi.rs to include the new flags for NM80211ApSecurityFlags:
diff --git a/src/wifi.rs b/src/wifi.rs
index 0cf5e42..a9d52c9 100644
--- a/src/wifi.rs
+++ b/src/wifi.rs
@@ -163,6 +163,14 @@ bitflags! {
         const AP_SEC_KEY_MGMT_PSK            = 0x0000_0100;
         // 802.1x authentication and key management is supported
         const AP_SEC_KEY_MGMT_802_1X         = 0x0000_0200;
+        // WPA/RSN Simultaneous Authentication of Equals is supported
+        const NM_802_11_AP_SEC_KEY_MGMT_SAE = 0x0000_0400;
+        // WPA/RSN Opportunistic Wireless Encryption is supported
+        const NM_802_11_AP_SEC_KEY_MGMT_OWE = 0x0000_0800;
+        // WPA/RSN Opportunistic Wireless Encryption transition mode is supported. Since: 1.26.
+        const NM_802_11_AP_SEC_KEY_MGMT_OWE_TM = 0x0000_1000;
+        // WPA3 Enterprise Suite-B 192 bit mode is supported. Since: 1.30.
+        const NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192 = 0x0000_2000;
     }
 }
  • Built the new wifi-connect version with rustup run 1.23 cargo build.