-
-
Notifications
You must be signed in to change notification settings - Fork 348
Fancy wifi provisioning #436
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
base: main
Are you sure you want to change the base?
Conversation
|
Kind of a big change for the next release that will go into prod, so i think it;s better to postpone the merge. |
|
I feel uneasy about devices sharing WiFi credentials to anything that asks, over the air, without user interaction to explicitly authorise it. It's good that it's only available during active provisioning, but I think it's worth considering going further:
Notably the esphome project is already using noise crypto on a wide variety of commercial IoT products very successfully across almost all of Espressif's chipsets, and also on RP2040 and a few other ultra cheap wifi chipsets, so we can be confident it will perform well on the most commonly used microcontrollers for WiFi slimes. Since WiFi Provisioning doesn't affect the smol slimes, i think we can ignore nordic semi compatibility (though in principal it should work there too, i think) |
|
I understand the authorization for sharing wi-fi password but also the communication range is also very short according to the caveats section |
450aac0 to
fee2979
Compare
7516cc9 to
402a406
Compare
Depends on #435
Attempts to implement #71
This PR reworks the wifi provisioning, which originally used SmartConfig, to instead use an ESP-Now based implemenation.
If a tracker is given the "START PROVISION" serial command or the "StartWifiProvisioning" packet (ID 28) while it's connected to a Wi-Fi, it enters provisioning mode. During this it sends out advertisement packets to the trackers around it.
If a tracker doesn't have Wi-Fi credentials set or can't connect using them, it will start listening to these advertisement packets. After a short authorization back and forth, the provisioner tracker sends the target the wifi credentials, using which it can connect to the wifi.
The target tracker sends packets back to the provisioner, reporting its status or any potential failures it encounters.
The following image describes the behaviour of the feature:

Security:
It seems that ESP-Now can't really go through walls. This, combined with the fact that a potential hacker would need to use a device compatible with the protocol and do that in the 1 minute available for provisioning makes the process quite unlikely to be exploited.
TODO: