Skip to content

Web OTA FW Updating & Settings

Eric Stockenstrom edited this page Sep 9, 2020 · 1 revision

The ESP32 and ESP8266 boards support web-based Over-The_Air firmware updating as an option, activated by default.

#define WebOTA // ESP only. Enable wifi web Over_The_Air firmware updating. Browse to IP.

IMPORTANT NOTE: Default settings, like WiFi password, mode and protocol are read into non-volatile memory the first time the ESP is booted after the first flash. Thereafter, changing many #define setting WILL HAVE NO EFFECT because the settings in EEPROM will prevail. If these settings are corrupted and you are locked out of WiFi, un-comment this macro, compile and reflash:

#define Reset_Web_Defaults // Reset settings in eeprom. Do this if eeprom settings are corrupt. Do this one time, comment out again, and reflash or the #define defaults will continue to prevail !!

Once the ESP is up and running, either in STA mode, or AP mode, simply browse to the IP like this

http://192.168.x.x

The host IP is displayed on the OLED and the monitor log.

You will be presented with a login screen.

Choose Settings or Update Firmware and enter the username "admin", and password "changeme!". The password may be changed here in the code:

char *otaPw = "changeme!"; // OTA password - change me!

Update Firmware

If your credentials are entered correctly, and you selected the Update Firmware radio button, the updater screen appears

Now browse to the binary you wish to flash,

and click Update

Upon reaching 100%, the host ESP will reboot and run the new firmware.

Settings

If you selected the Settings radio button, the settings screen appears:

Edit the settings according to your requirements, and click Save & Reboot

The new settings are saved into non-volatile memory. These settings prevail over default macro (#define) compile-time settings. They may be reset by activating #define Reset_Web_Defaults at compile time. (Do this one time, and then deactivate this macro)