Update wifi settings without re-flashing
# help
m
I've moved my ESP32 to a different position and I need to reconfigure the wifi SSID and Password. However I do not want to re-flash. Is there a way to do this over serial by any chance? Thanks.
f
There is no way to do this over serial.
This is strongly related to the provisioning discussion in #918498540232253483 . Fundamentally, you need to install an application that will change the credentials.
You could use WiFi (a new access-point), Bluetooth, or some other means for this.
The default serial port is kind-of taken by the system at the moment.
There is a way to remap the system-uart pins to something else, and then use the serial input for your own things, but that requires building a new firmware.
(and I haven't tested that yet).
m
So when you say an application thats just a standard toit app? I might try and follow that discussion more closely then. Thanks 🙂
f
Correct.
The following instruction would update the configuration
wifi.open --ssid=ssid --password=password --save
The difficulty is now to get the new configuration.
There are plenty of ways (BLE, uart, ...) but the most common is to create an access point and to let the user to connect to it.
Personally, I prefer different methods (as I don't want my phone to switch to a different network), but it's the most used one.
m
100% - Will be a good experiment to learn the bluetooth connection as well - i'm only new to jag but the more I use it the more I like it - Thanks again for your help. I'll see how much time I get to play over the weekend 🙂
f
For BLE, you might also be interested in Dongheng's PR: https://github.com/toitlang/toit/pull/1291
5 Views