Skip to content

Pico W: connect to WPA3-only WiFi networks - #11888

Open
mikeysklar wants to merge 5 commits into
adafruit:mainfrom
mikeysklar:fix-10385-wpa3-fallback
Open

mikeysklar wants to merge 5 commits into
adafruit:mainfrom
mikeysklar:fix-10385-wpa3-fallback

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What

Pico W boards now join WPA3 networks with WPA3, and scans show WPA3.

Why

They always joined with WPA2, so WPA3-only networks failed.

Fixes #10385.

How

Step Behavior
1 Scan for the network
2 Join with WPA3 if it advertises WPA3, otherwise WPA2

This replaces the first approach, a WPA2 then WPA3 retry, which never fired on WPA3-only networks.

The driver now comes from the adafruit fork's circuitpython11 branch (#11934), which adds the upstream scan fix georgerobotics/cyw43-driver#179.

  • Scans report WPA3, and WPA/WPA2 networks no longer scan as WEP.
  • -Wno-discarded-qualifiers is set for cyw43_ll.c only.
  • CYW43_WARN is off, so the driver no longer prints a console line for each network with an unknown cipher.

Scan authmode now follows the driver's flags:

  • WPA2/WPA3: [WPA2, WPA3, PSK]
  • WPA3-only: [WPA3, PSK]
  • Enterprise: includes ENTERPRISE, no PSK
  • WEP: [WEP]

Tested

Pico W station, default timeout. Test access points are a Pico 2 W SoftAP. Before is the WPA2 then WPA3 retry.

Case Before After
Home WPA2 router 28/30, 3.1 s 30/30, 4.5 s
WPA3-only access point 1/10 9/10, 3.7 s
WPA2 access point 10/10 10/10

Known change: a wrong password now times out with "Unknown failure" instead of "Authentication failure" (upstream georgerobotics/cyw43-driver#174).

AI assistance

Written with Claude Code. I reviewed the diff and ran the hardware tests myself.

connect() always joined with CYW43_AUTH_WPA2_AES_PSK, which never
authenticates with a WPA3-only network, so connect() timed out with
"Unknown failure 1".

The cyw43 driver cannot tell WPA3 from WPA2 in a scan, and in station
mode CYW43_AUTH_WPA3_WPA2_AES_PSK joins with SAE only, which would break
WPA2-only networks. So keep joining with WPA2 first. If the AP has still
not accepted authentication at half the timeout (and at least 4 s),
retry once with CYW43_AUTH_WPA3_SAE_AES_PSK and a fresh timeout.

A WPA2 AP accepts authentication about 3 s into the join, even with a
wrong password, so WPA2 joins never retry. The driver clears the AUTH
bit when the join completes or fails, so it is latched, and the retry
only happens while the link is still joining.

Fixes adafruit#10385.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update cyw43-driver, whose scan results now report WPA3 and the other
security types from the RSN and WPA IEs. Before joining, scan for the
SSID and join with WPA3 SAE if the network advertises WPA3, otherwise
WPA2. This replaces the timed WPA2 to WPA3 retry, which never ran on a
WPA3-only network because the WPA2 join failed straight away.

Network.authmode now shows WPA3 and Enterprise, and ap_info.authmode
reports the security actually used for the join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikeysklar and others added 3 commits November 20, 2026 14:04
Pins the adafruit fork's circuitpython11 branch, which carries
georgerobotics/cyw43-driver#179 (WPA IE scan parsing fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only count scan results for the SSID being joined when picking
WPA2 or WPA3. Scope -Wno-discarded-qualifiers to cyw43_ll.c, the
one file that needs it. Silence CYW43_WARN so the driver does not
print to the console for every network offering an unknown cipher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikeysklar
mikeysklar marked this pull request as ready for review November 21, 2026 15:24
@mikeysklar
mikeysklar requested a review from dhalbert November 21, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPi Pico W with WPA3/PMF yields "ConnectionError: Unknown failure 1"

1 participant