Re: brcmfmac SAE/WPA3 negotiation - Part 2

KeithG
2025-01-06T00:42:08Z

I am looking at the iwmon logs for a successful wpa_supplicant
connection versus one from IWD. Both connect and both pass data and
both grab a DHCP address. I do note one difference in the connection,
though.

Request : Connect
through the responses RTNL
wpa_supplicant knows it is dynamic
> RTNL: New Link (0x10) len 80 15.663131
Flags: 0 (0x000)
Sequence number: 0 (0x00000000)
Port ID: 0
IFLA Family: Unknown
IFLA Type: 1
IFLA Index: 3
IFLA ChangeMask: 0
IFLA Flags: (0x9003) [up,broadcast,multicast,dynamic]
IfName (len:6): wlan0
Wireless: len 48
30 00 08 8c 00 00 00 00 20 00 00 00 00 00 00 00 0....... .......
01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c .........$2.0H`l
7f 08 04 00 00 00 00 00 00 40 82 84 8b 96 24 30 .........@....$0

and wpa_supplicant connects like this:
# ifconfig wlan0
wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.5.207 netmask 255.255.255.0 broadcast 192.168.5.255
inet6 fe80::ba27:ebff:fea4:6e0f prefixlen 64 scopeid 0x20
ether b8:27:eb:a4:6e:0f txqueuelen 1000 (Ethernet)
RX packets 13 bytes 2785 (2.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 58 bytes 9015 (8.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Whereas the iwd log does not:
> RTNL: New Link (0x10) len 128 26.809429
Flags: 0 (0x000)
Sequence number: 0 (0x00000000)
Port ID: 0
IFLA Family: Unknown
IFLA Type: 1
IFLA Index: 3
IFLA ChangeMask: 0
IFLA Flags: (0x1003) [up,broadcast,multicast]
IfName (len:6): wlan0
Wireless: len 96
60 00 07 8c 00 00 00 00 50 00 00 00 00 00 00 00 `.......P.......
00 07 64 65 73 6b 53 41 45 01 08 82 84 8b 96 24 ..deskSAE......$
30 48 6c 32 04 0c 12 18 60 21 02 03 14 24 02 01 0Hl2....`!...$..
0b 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 .0..............
00 00 0f ac 08 80 00 7f 08 00 00 00 00 00 00 00 ................
40 dd 09 00 10 18 02 00 00 10 00 00 00 00 00 00 @...............

and when it does connect, it looks like this:
# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.5.207 netmask 255.255.255.0 broadcast 192.168.5.255
inet6 fe80::ba27:ebff:fea4:6e0f prefixlen 64 scopeid 0x20
ether b8:27:eb:a4:6e:0f txqueuelen 1000 (Ethernet)

On Sat, Jan 4, 2025 at 12:28 PM KeithG <ys3al35l@gmail.com> wrote:
>
> Started a new thread as the other was already at 30! Hope this is OK
> for the list.
>
> This is on a RPi running the latest connman and iwd, with the brcmfmac
> 43455 chip, a patch to the brcm80211 driver from Arend and the latest
> firmware from Infineon:
> Firmware: BCM4345/6 wl0: Oct 28 2024 23:27:00 version 7.45.286
> (be70ab3 CY) FWID 01-95efe7fa
>
> The latest iwd (3.3 at latest commit: g4b535cee) will connect to an
> SAE/WPA3 AP. It just will not do it every time. I use connman as the
> manager with iwd to manage the wifi.
>
> I have seen 2 different errors. One is 'invalid key' and the other is
> 'connect-failed'
> The invalid key dialog in connman is:
> connmanctl> connect wifi_b827eba46e0f_6465736b534145_managed_psk
> Agent RequestInput wifi_b827eba46e0f_6465736b534145_managed_psk
> Passphrase = [ Type=psk, Requirement=mandatory ]
> Passphrase? secret123
> Agent ReportError wifi_b827eba46e0f_6465736b534145_managed_psk
> invalid-key
> connmanctl> Retry (yes/no)? no
> Error /net/connman/service/wifi_b827eba46e0f_6465736b534145_managed_psk:
> Input/output error
>
> This one did not connect and the iwmon log is attached as is the
> journal (iwd and brcmfmac debug enabled)
>
> The connect failed dialog in connman is:
> connmanctl> connect wifi_b827eba46e0f_6465736b534145_managed_psk
> Agent RequestInput wifi_b827eba46e0f_6465736b534145_managed_psk
> Passphrase = [ Type=psk, Requirement=mandatory ]
> Passphrase? secret123
> Agent ReportError wifi_b827eba46e0f_6465736b534145_managed_psk
> connect-failed
> connmanctl> Retry (yes/no)? yes
> Connected wifi_b827eba46e0f_6465736b534145_managed_psk
>
> This 'connected' but it resulted in an AIPIA 169.254.133.42 address as
> is seen in the logs.
>
> I also attach an iwmon and journal of a successful connection with a
> valid DHCP address of 192.168.5.207 that passes traffic in the case
> teh comparison helps diagnose it.
>
> I could be wrong, but I think this is related to iwd because when I
> try wpa_supplicant ver 2.10-12 on the debian apt list, it connects
> every time. If it is useful, I also have an iwmon and journal log of
> successful connect using wpa_supplincant. I do notice that it connects
> very quickly with wpa_supplicant compared to a connection with iwd.
>
> Keith