WLED icon indicating copy to clipboard operation
WLED copied to clipboard

truncate spaces after ssid

Open hamster65 opened this issue 3 years ago • 6 comments

I am new to wled. I flashed the esp and connected to the AP with an iphone. I configured wifi several times but it would not connect and revert to AP mode. It turned out that there was a space character added after the ssid. Maybe that is something to mention in the FAQ or maybe we could truncate it.

hamster65 avatar Jul 19 '20 18:07 hamster65

Hi and welcome! Do you believe the extra space has been added by the phone (autocorrect) or was it there previously? We cannot truncate as an SSID ending in a space is valid (although the question is who would do that), but adding a warning if a space is the first or last character is probably a good idea!

Aircoookie avatar Jul 19 '20 18:07 Aircoookie

Hi, I tried to reproduce it several times and there was no space... I did not erase / reflash the esp, however.

hamster65 avatar Jul 21 '20 15:07 hamster65

You wouldn't believe what is valid in a SSID: It's defined as 32 bytes. That's it. 32 nul (0x00) bytes is a valid SSID. While the wording the standard changes on occassion, as of 2012 it was "0-32 octets with an unspecified or UTF-8 encoding"

garyd9 avatar Jul 26 '20 04:07 garyd9

wow. I guess there are tons of devices that cannot handle that. After all, some even have problems with special characters in the wifi password.

hamster65 avatar Jul 26 '20 20:07 hamster65

I ran into the same trouble, maybe I did not delete the preset 'Your_Network' not correctly and had a trailing space, which is not visible in the WebGUI. Otherwise, I also don't know how to get a trailing space, but it was also saved in Firefoxes passwords and so had the problem again in the next trials. The ESP could not connect to network and started AP again, as intended. Then I tried to set the ssid/pw with the web installer, and that worked. Of course, because I entered the correct ssid here. But as the trailing space is valid, it would be not ok to trim the input and it would break compatiblity. This issue is stale, so I recommend also to close it. A more user friendly solution would be a list with available access points to pick a name as it is. The name needs to be transfered to a manual input field, manual entry needs to be also possible for hidden ssids.

JojoS62 avatar Jun 08 '22 13:06 JojoS62

I've just had this on v0.13.3, likewise, I don't know if I didn't delete "Your_Network" correctly, or if my phone added it in.

richard-scott avatar Dec 09 '22 12:12 richard-scott