跳到主要内容

What could cause an OTA failure with reason "ESP HTTPS OTA Begin failed"?

The most likely cause is memory allocation failure. HTTPS-based OTA requires an additional TLS connection and buffers, which consume significant heap. If free heap is too low at OTA start, the HTTPS OTA begin can fail.

1. Optimize memory usage — See My device is running out of memory. How can I optimize? for ways to reduce your project's heap consumption (log verbosity, PSRAM, disabling unused features, etc.).

2. Use MQTT OTA instead — MQTT OTA uses the same MQTT channel as RainMaker instead of opening a separate HTTPS connection, which saves RAM. Available in esp_rainmaker component v1.6.4 and later. Enable via CONFIG_ESP_RMAKER_OTA_USE_MQTT=y in menuconfig (ESP RainMaker ConfigESP RainMaker OTA ConfigOTA Update Protocol TypeMQTT). MQTT OTA may be slightly slower but avoids the extra heap pressure from HTTPS. See the esp_rainmaker changelog for details.