-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amended wifi connection for compatibility with list format wifi.json #64
base: tilda-master
Are you sure you want to change the base?
Conversation
@marekventur Can you review this one please. |
n.connect(w["ssid"], w["pw"], timeout=10) | ||
else: | ||
n.connect(w["ssid"], timeout=10) | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you be more specific with the kind of exception your catching here?
If we change this here, we also need to change bootstrap.py and the files baked into the firmware (wifi.json and bootstrap.json), otherwise it will be very confusing to users. |
And it also needs to update the |
On that note the changefi app needs to read the json to populate the entries, not just assume it's set to emfcamp-insecure. |
I've made a bunch of improvements in the PR on Unfortunately, it doesn't build / deploy cleanly for me - It'll be a while before I can get to amending Apologies for these loose ends - I'm limited by skillset & available time. |
To get the badge to rewrite the bootstrap.json you need follow the factory reset procedure: See the box on https://badge.emfcamp.org/wiki/TiLDA_MK3 |
Aha, thanks @drrk! In that case, I can confirm that performing a factory reset writes the correct bootstrap.py & wifi.json and behaves as expected. |
known_ssids = [ ap['ssid'] for ap in w ] | ||
|
||
if len(set(known_ssids).intersection(visible_ssids)) < 1: | ||
label.text("Couldn't find any networks listed in wifi.json :(" + wifi_info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: could you add a \n
before the wifi_info?
looks good to me |
Corresponds to a PR on
emfcamp/Mk3-Firmware
to supportwifi.json
files containing more than one network.