Skip to content

ESP-IDF example: fall back to WPA2 when WPA3 compatibility mode fails - #109

Merged
XNinety9 merged 1 commit into
devfrom
fix/wifi-reason
Oct 1, 2026
Merged

XNinety9 merged 1 commit into
devfrom
fix/wifi-reason

Conversation

@XNinety9

@XNinety9 XNinety9 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Fixes #108

The user's box, switched to WPA2/WPA3 compatibility mode, made both ESP32 boards loop on Wi-Fi lost while the ESP8266 (WPA2 only) joined: ESP-IDF 6 takes the WPA3 path offered in the separate element and the box fails the 4-way handshake, reason 17 (IE_IN_4WAY_DIFFERS).

  • On that reason, the example sets disable_wpa3_compatible_mode for the network (saved with it by the driver) and reconnects over WPA2. Boxes where compatibility mode works keep WPA3.
  • Wi-Fi lost logs the disconnect reason, which is how this one was found.

Tested on a real ESP32-S3 against that box, NVS erased first: one refused attempt, the fallback, connected. Built for esp32 and esp32c6.

🤖 Generated with Claude Code

Some boxes in WPA2/WPA3 compatibility mode (WPA2 announced, WPA3 offered in
a separate element) fail the handshake when ESP-IDF 6 takes the WPA3 path:
reason 17, IE_IN_4WAY_DIFFERS, in a loop. On that reason the example now
disables WPA3 compatibility mode for the network (the driver saves it with
the network), so it joins over WPA2; boxes where it works keep WPA3. The
"Wi-Fi lost" message also logs the reason now.

Tested on an ESP32-S3 against such a box, from an erased NVS: one refused
attempt, then connected.

Fixes #108
@XNinety9
XNinety9 merged commit 8345379 into dev Oct 1, 2026
9 checks passed
@XNinety9
XNinety9 deleted the fix/wifi-reason branch October 1, 2026 19:43
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.

ESP32 can't join a box in WPA3 compatibility mode

1 participant