-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Opportunity Statement
Our Krake firmware has an Over the Air update feature which allows new firmware to be loaded into the Krake through a network connection (WiFi)
This should be explained as a feature in the User Manual, on the Github main README (or similar documentation) and in the HardwareX article.
The safety feature against corruption of upload in for example the case of loss of signal should be explained too.
The AI Explanation of OTA
AI Overview
Mastering ESP32 OTA Partitions | Discover How OTA Design ...
The ESP32's built-in OTA (Over-the-Air) functionality allows you to wirelessly update its firmware over Wi-Fi, eliminating the need for physical USB connections, which is ideal for remote or hard-to-reach IoT devices. It works by using special partition tables in the flash memory (like ota_0 and ota_1) to write a new firmware image while the old one runs, then updating a data partition to point to the new image for the next boot, supporting secure updates via HTTPS if needed.
The AI Explanation of Fallback Protection
Lee asked an AI the following, "Is the Eligant OTA library for Arduino ESP32 robust against loss of signal during over the air upload?"
AI Overview
Yes, the ElegantOTA library for the ESP32 is robust against signal loss during an over-the-air (OTA) upload because it leverages the ESP32's dual-partition fallback mechanism.
Here is how the robustness works:
Dual Partitions: The ESP32's memory is configured with at least two "OTA app slot" partitions and an "OTA data partition". The current, working firmware runs on one partition while the new firmware is uploaded to the inactive partition.
Verification Process: The new firmware image is verified (using a checksum) after the upload is complete but before it is set to boot.
Automatic Fallback: If the upload process is interrupted (due to power loss, Wi-Fi drop, or a corrupted file), the new firmware is marked as invalid. On the next reboot, the bootloader checks the integrity and automatically boots the previous, known-good firmware from the other partition, preventing the device from being "bricked". The failed update does not overwrite the functional system.
While the underlying mechanism ensures the device remains functional, users have noted that the upload process itself can fail if the Wi-Fi signal is weak, resulting in an "HTTP ERROR" message in the web interface. However, the key is that even a failed upload attempt will not permanently damage the device, as it will simply restart into the original, valid firmware.