Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP01 not connecting when PMF (Protected Management Frames) enforced by AP #15

Open
SerePes opened this issue Nov 3, 2023 · 3 comments

Comments

@SerePes
Copy link

SerePes commented Nov 3, 2023

Protected Management Frames (PMF) is a standard(802.11w) defined by WiFi Alliance to enhance WiFi connection safety. It provides unicast and multicast management actions and frames a secure method with WPA2/WPA3, which can improve packet privacy protection.
Workaround is switching the protection off at WIFI AP.
To support this protection following simple patch can be applied. I tested it on my mini and works fine.

diff --git a/main/uart_nic.c b/main/uart_nic.c
index cd35f12..98efc9f 100644
--- a/main/uart_nic.c
+++ b/main/uart_nic.c
@@ -370,6 +370,7 @@ static void IRAM_ATTR handle_rx_msg_clientconfig_v2(uint8_t* data, size_t size)
     if (strlen((char *)wifi_config.sta.password)) {
         wifi_config.sta.threshold.authmode = WIFI_AUTH_WPA2_PSK;
     }
+    wifi_config.sta.pmf_cfg.capable = 1;
 
     esp_wifi_stop();
     ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) )
@vorner
Copy link
Collaborator

vorner commented Nov 6, 2023

Thank you for the discovery. We'll try it out and put it to the next version of FW.

vorner added a commit to vorner/uart_nic that referenced this issue Nov 6, 2023
Author "SerePes" (no known email), prusa3d#15
vorner added a commit that referenced this issue Nov 7, 2023
Author "SerePes" (no known email), #15
@bkerler
Copy link

bkerler commented Feb 8, 2024

As it was merged, I think this issue can be closed now.

@pilotak
Copy link

pilotak commented Apr 24, 2024

i disabled "Management Protection" as this is how it's called in Mikrotik and it still can't connect, however i didn't apply you patch

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

No branches or pull requests

4 participants