-
Notifications
You must be signed in to change notification settings - Fork 140
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
Do not reset system config when config version changed. #18
Comments
That make sense. However (as mentioned in the README) I do only recommend to configure the system in AP mode. I will think about this. |
@prampec Any update on this issue? |
I understand the problem, and I can agree, that forcing AP mode on every update is not the proper way to handle the things. But I'm still not sure, that the mentioned solution the right one solve this problem. |
@prampec Maybe have support for a "developer" option? |
Version v3.0.0 is out, but this one is not included in it. I still not decided how to do this properly. |
I don't know if this solution is acceptable from a security point of view, but it has worked well for my needs:
I can nuke the EEPROM, change Additionally, I defined some serial commands (similar to https://github.com/prampec/IotWebConf/blob/master/examples/IotWebConf11AdvancedRuntime/IotWebConf11AdvancedRuntime.ino), in order to change SSID and WiFi password from the serial monitor :
I could post the corresponding code if anyone is interested. |
Yes. This is definitely an elegant solution. |
@prampec : Good to know, thanks. I'm not sure I understand the purpose of :
Are those ever needed? From my limited tests, even if EEPROM is full of random bits and the defaults are not set, the values will be set to an empty string. |
If anyone's interested in setting passwords and ssid via Serial, there's an example at https://github.com/EricDuminil/IotWebConf/blob/example/shell_commands/examples/IotWebConf18ShellCommands/IotWebConf18ShellCommands.ino The sketch is a bit long, but most of it could be moved to Those commands are defined:
It's possible to copy-paste multiple commands at once (at least with PlatformIO monitor), and set everything in one go, without having to type long passwords on a smartphone:
The purpose is similar to https://github.com/prampec/IotWebConf/tree/master/examples/IotWebConf11AdvancedRuntime, but I dare say it should be easier to adapt and add new functions. |
Any news to preserve system config? Had to go out in the rain today because I reset the config as it show senseless entries and as found here loos the WiFi settings also. Would be really nice to get it separated...should be possible to achieve by reserving a fixed amount of bytes for AP Password, SSID, Password in front of the custom data stored in the eeprom. |
Implement a workaround with preferences.h which restores system settings. Perhaps in long term iotWebConf could change to preferences lib which is also available for ESP8266. |
Suggestion:
Let's separate system config (ap password, siid, etc) and custom config versioning.
I assume a version for system config part can be hardcoded and will be only affected when user upgrades to the next release, where those configs layout been changed. While the rest of config is versioned by developer. In this case, when developer changes his custom config layout & bumps a version (or user uploads new firmware), he will not be forced to start over again and configure IoT via AP mode. Device will continue to connect (because those builtin setting will be preserved). User will be able to login on iot inside wifi and update new custom config much easier and faster.
Digging in more details, I suppose system-part data should go first to avoid any offsets (I suppose it already goes first?). This means, when system part is changed - both parts must be reset (PS: if only we don't add some padding for future upgrades)
The text was updated successfully, but these errors were encountered: