homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Some WiFi passwords characters are not valid #75

Closed DavidStacer closed 8 years ago

DavidStacer commented 8 years ago

I have a very complex WiFi password and some of the characters in it caused Homie trouble.

Testing shows that: % & " ' + _ Cause issues. Some failed in the config loading, some never connected to wifi. ~!@#$^*()-={}[]:;<>?,./`Aa1234567890 All work.

This Stackoverflow link says any character should work for WiFi, so possibly its a Web UI or json issue.

I tried in a native Arduino IDE const char* password = "~!@#$^*()-={}[]:;<>?,./`Aa1234567890%&+_'\""; and that password worked. I had to escape the " with \" .

I'm going to setup a separate IOT WiFi network so its not an issue for me but I wanted to document the characters that you can't use in your WiFi password and maybe save someone else some debug time.

List that won't work spelled out with hex percent 0x25 ampersand 0x26 double quote 0x22 single quote 0x2C plus sign 0x2B underscore 0x5F

marvinroger commented 8 years ago

Thanks for the investigation. This is indeed problematic! I'll do some testing.

marvinroger commented 8 years ago

I just tried the abcdef%&"'+_ password, and it works fine... I am using the git version, that needs the 2.3.0-rc2 version of esp8266/Arduino, so maybe some things got resolved there. Anyway, when Homie for ESP8266 v2.0.0 will be out, this should not be a problem anymore.