Skip to content

v1.1.3

Choose a tag to compare

@GDKeller GDKeller released this 02 Mar 21:37
· 15 commits to main since this release
1ce48c3

OTA Firmware Update Fix
Fixed a critical issue where over-the-air firmware updates would fail with "connection refused" errors during download.

Root cause: The ESP32 Arduino WiFiClientSecure library has a bug where TLS session state isn't properly cleaned up between HTTP redirect hops when using HTTPClient::setURL(). GitHub's firmware download URL redirects through multiple hops (GitHub → versioned URL → CDN), and the stale TLS context caused the connection to fail on the second redirect.

Fix: OTA updates now manually resolve the full redirect chain using a fresh TLS context per hop before downloading, bypassing the bug entirely.

Additional improvements

  • getData task is now paused during OTA to free heap for the download
  • Web portal guards against triggering duplicate concurrent OTA updates
  • HTTP response is sent to the client before OTA begins (successful updates reboot the device, so the response would never arrive otherwise)
  • otaUpdateTriggered flag marked volatile for correct cross-core visibility between the web server (Core 1) and data fetching task (Core 0)