You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WifiMulti.addAP limits the passphrase to 63 characters by the test at L175.
On the other hand, Wifi.begin recognises a length of 64 chars as a PSK instead of a passphrase, see tests at L109 and L118.
This seems to be incoherent (wifimulti.run calls wifi.begin) unless we aren't allowed to pass PSK to wifimulti by design?
NOTE : SSID is handled the same in both places (31 char max). EDIT: the standard says 32 characters max for an SSID so there may be rare cases where an AP has a full 32 char, non zero-terminated SSID and in that case ESP8266 won't be able to connect to it.
The text was updated successfully, but these errors were encountered:
According to wl_definitions.h it looks like it should be 63. Does that mean the WifiMulti.addAP is correct with 63 and the ESP8266WiFiSTA.cpp is incorrect with 64?
It took me a while to fully understand what the correct behavior is supposed to be, and what is right/wrong in the code. At irst I thought this was just a boundary condition that needed fixing. As it turns out, there are two cases for passphrases: 63 char printable ascii with null terminator, and 64 byte hex with/without null terminator.
WiFi implements both cases, with certain assumptions for the 64byte hex case, while WiFiMulti implements only the 63 ascii case.
The Espressif SDK field for the passphrase is 64bytes in size, so the hex case must be handled in a special manner, and not as a null terminated string.
This is not an inconsistency or a bug, but a limitation in the implementation, of WiFiMulti, and is therefore an enhancement. Because there are certain assumptions made in WiFi, which are not quite clear, and which must be propagated, I consider the enhancement in WiFiMulti a bit delicate. @igrr I suggest moving this to 2.5.0.
Description
WifiMulti.addAP limits the passphrase to 63 characters by the test at L175.
On the other hand, Wifi.begin recognises a length of 64 chars as a PSK instead of a passphrase, see tests at L109 and L118.
This seems to be incoherent (wifimulti.run calls wifi.begin) unless we aren't allowed to pass PSK to wifimulti by design?
NOTE : SSID is handled the same in both places (31 char max). EDIT: the standard says 32 characters max for an SSID so there may be rare cases where an AP has a full 32 char, non zero-terminated SSID and in that case ESP8266 won't be able to connect to it.
The text was updated successfully, but these errors were encountered: