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
I need to use a PSK instead of a passphrase to connect to WiFi networks using the WiFiMulti library. However, I noticed in the code that there's a length limit of 63 for the argument passphrase.
WiFiMulti.cpp:
boolWiFiMulti::addAP(constchar* ssid, constchar *passphrase)
{
WifiAPlist_t newAP;
if(!ssid || *ssid == 0x00 || strlen(ssid) > 31) {
// fail SSID too long or missing!log_e("[WIFI][APlistAdd] no ssid or ssid too long");
returnfalse;
}
if(passphrase && strlen(passphrase) > 63) {
// fail passphrase too long!log_e("[WIFI][APlistAdd] passphrase too long");
returnfalse;
}
and unsurprisingly I got the following error when I call addAP with a PSK which is 64 bytes long: [E][WiFiMulti.cpp:61] addAP(): [WIFI][APlistAdd] passphrase too long
The thing is WiFi.begin takes PSK as the passphrase argument just fine and I was able to successfully connect when I changed the passphrase length limit to 64 instead.
I would like to know if this is a bug where the passphrase argument length limit was not revised when PSK support was added or if there are other concerns for allowing PSK here. Thanks.
The text was updated successfully, but these errors were encountered:
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
I need to use a PSK instead of a passphrase to connect to WiFi networks using the WiFiMulti library. However, I noticed in the code that there's a length limit of 63 for the argument passphrase.
WiFiMulti.cpp:
and unsurprisingly I got the following error when I call
addAP
with a PSK which is 64 bytes long:[E][WiFiMulti.cpp:61] addAP(): [WIFI][APlistAdd] passphrase too long
The thing is WiFi.begin takes PSK as the passphrase argument just fine and I was able to successfully connect when I changed the passphrase length limit to 64 instead.
I would like to know if this is a bug where the passphrase argument length limit was not revised when PSK support was added or if there are other concerns for allowing PSK here. Thanks.
The text was updated successfully, but these errors were encountered: