Closed
Description
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.3
IDE name: Arduino IDE
Flash Frequency: 40MHz
PSRAM enabled: no
Upload Speed: 460800
Computer OS: Debian
Description:
- SSID is up to 32-octet length according to the standard. But 32-octet SSID is rejected in WiFiSTA.cpp or is truncated to 31 octets in WiFiAP.cpp.
- 64-char PSK is truncated to 63 characters (to be broken) in WiFiAP.cpp by
strlcpy()
. - SoftAP with 62-char or shorter passphrases might cause "Password error" in client side (10% of board caused this issue). Filling the
wifi_ap_config_t::password[64]
usingstrncpy()
resolved the issue. So it's an ESP-IDF bug and affected by some noise bytes after NUL, I guess. - On the HEAD, SSID or passphrase including
%
will cause unintentional printf formatting and will be broken in WiFiAP.cpp and WiFiSTA.cpp.
SSID and passphrase/PSK should always be copied using strncpy()
, I think.
Sketch:
In the official example WiFiAccessPoint.ino, you should use...:
- 32-octet SSID.
- 64-character PSK.
- some
%
character in SSID and passphrase.
In the official example WiFiClient.ino, you should use...:
- 32-octet SSID.
- some
%
character in SSID and passphrase.
Debug Messages:
No debug messages.
Metadata
Metadata
Assignees
Labels
No labels