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

Connection to WiFi fails when AP has special characters in password #386

Closed neilbrookins closed 4 years ago

neilbrookins commented 7 years ago

I used the web based setup in config mode to enter the SSID and password. The ESP8266 successfully reboots, but fails to connect to the WiFi which has a password similar to this: Hit=+NapHippy99 If I go back into config mode and use a different SSID with a password similar to this: HungrySaab Then, the WiFi connects successfully and it proceeds to the Mqtt connection as expected.

Question is it the special characters =+ that is breaking it? Or, is it the length of the password, 15 characters long that is breaking it?

I'm going to try different passwords and I'll let you know which change breaks it. I'll start with the password that works and add one character at a time from the other password to see which change causes it to stop working. Perhaps there needs to be some special quoting or escaping of the password in the homie code to protect the special characters?

neilbrookins commented 7 years ago

My testing was with homie v2.0.0-beta.1 I set my NetGear router to use the following passwords and tested each one with Homie: Hungry=Saab WiFi connection fails after rebooting from configure mode to normal mode. Hungry+Saab WiFi connection fails after rebooting from configure mode to normal mode. Hungry8Saab WiFi connection succeeds and it proceeds to attempt MQTT connection as expected.

My conclusion is that Homie is not properly quoting the special characters, both '=' and '+' and probably many others, causing the WiFi connection to fail.

furyfire commented 7 years ago

Confirmed Embedding the config.json file using Platformios spiffs feature works no matter what characters you put in the wifi password. So it must be on the web API receiving end that special characters get dropped.

stritti commented 4 years ago

Closing this issue because of no progress for long time.