pimoroni / enviro

MIT License
101 stars 79 forks source link

WiFi password truncated by provisioning 0.0.9 #118

Open TechWilk opened 1 year ago

TechWilk commented 1 year ago

Board: Enviro Indoor

Having:

The enviro board fails to connect to the wifi network, with a pulsing red warning led. Note that the WiFi password does not contain single quotes, but has a combination of letters numbers and symbols

Workaround:

(I have not tested previous firmware, since I have only just got the board)

ZodiusInfuser commented 1 year ago

Thanks for raising this. I will attempt to reproduce this next week, but from a glance at the code now there is no obvious limit on the length of the password supported. Relevant files are: https://github.com/pimoroni/enviro/blob/d091f7539acc9513c391f0eec498c0cc898edb7a/enviro/provisioning.py#L84 and https://github.com/pimoroni/enviro/blob/d091f7539acc9513c391f0eec498c0cc898edb7a/enviro/html/provision-step-2-wifi.html#L29 I am glad that editing the config.py lets you get around this

MrDrem commented 1 year ago

My WiFi password is 16 chars, and checking it on my newly upgraded Urban board, it isn't truncated.

TechWilk commented 1 year ago

Yes it seemed rather odd, perhaps that it got stuck on a special character rather than a character limit as such? The password in question is much longer and contains a lot of special chars. I'll try again in the next few days when another board arrives and see if I can reproduce it reliably

ZodiusInfuser commented 1 year ago

Truncating on a special character could be completely possible, though I do not know where such a check would be happening within the code yet.

basil-dsouza commented 1 year ago

I have faced the same issues in version 0.0.8 as well. What I can remember doing is:

Lipod commented 10 months ago

I am currently setting up my enviro urban and observed this issue with the stock firmware. I have now flashed it with 0.0.9 and encountered the issue again when I used the web page to provision after the upgrade. My WiFi key is 22 character alphanumeric (no special characters) and I am certain that I typed the correct key into the web page, but when I opened the config file using Thonny the last character had been chopped.

Before I tried Thonny it was frustrating to keep re-entering provisioning mode and finding the wrong key in the text box.

Jessepo commented 8 months ago

Hi, I had a similar issue when the provisioning set my all numeric password as a numeric instead of a string. I then saw errors thrown when running main.py in thonny, went to the config.py and added "" around the password and it worked. Should I create an issue?