Description
Board
ESP32-S3-DevKitC-1-N8
Device Description
Chip is ESP32-S3 (QFN56) (revision v0.2)
Hardware Configuration
ESP32-S3-DevKitC-1-N8
Version
latest stable Release (if not listed below)
IDE Name
VSCode
Operating System
windows 11
Flash frequency
55K
PSRAM enabled
yes
Upload speed
115200
Description
hi , i am trying to update the firmware with OTA on a ESP32-S3-DevKitC-1-N8
Chip is ESP32-S3 (QFN56) (revision v0.2)
uppon completion when i loaded from a webpage i get this
boot_comm: Image requires efuse blk rev >= v251.85, but chip is v1.3�[0m
�[0;31mE (153132) WebServer: ota_end failed: 5379�[0m
�[0;33mW (153142) httpd_txrx: httpd_resp_send_err: 500 Internal Server Error - ota_end�[0m
i tryed to add the -DCONFIG_ESP_EFUSE_IGNORE_EFUSE_REVISION=1
in platform,io doesnt work
the board is updating just fine on the Pio i use this
partision csv
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 1M
ota_1, app, ota_1, 0x110000, 1M
test, app, test, 0x210000, 1M
storage, data, spiffs, , 0xFC000
python -m esptool --chip esp32s3 merge_bin --output full_flash.bin --flash_mode dio --flash_size 8MB --flash_freq 40m
0x0 "$path\bootloader.bin" 0x8000 "$path\partitions.bin"
0xd000 "$path\ota_data_initial.bin" `
0x10000 "$path\firmware.bin"
python -m esptool --chip esp32s3 write_flash --flash_mode dio --flash_size 8MB --flash_freq 40m
0x0 full_flash.bin
Sketch
static esp_err_t ota_post_handler(httpd_req_t *req)
{
esp_log_level_set(TAG, ESP_LOG_INFO);
// Subscribe this HTTPD task to the WDT
esp_task_wdt_add(NULL);
// Pick the next OTA slot
const esp_partition_t *update_partition = esp_ota_get_next_update_partition(NULL);
if (!update_partition) {
ESP_LOGE(TAG, "No OTA partition");
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "no OTA");
}
// Debug: show which partition we’re writing to
ESP_LOGI(TAG,
"Chosen OTA partition: subtype=%d, address=0x%06x, size=0x%06x (%u bytes)",
update_partition->subtype,
update_partition->address,
update_partition->size,
update_partition->size);
ESP_LOGI(TAG, "Client reports Content-Length = %u bytes", req->content_len);
if (req->content_len > update_partition->size) {
ESP_LOGE(TAG, "Image too large (need %u, have %u)",
req->content_len, update_partition->size);
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_400_BAD_REQUEST, "image too large");
}
// Begin OTA
esp_ota_handle_t ota_handle;
esp_err_t err = esp_ota_begin(update_partition, OTA_SIZE_UNKNOWN, &ota_handle);
if (err != ESP_OK) {
ESP_LOGE(TAG, "ota_begin failed: %d", err);
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "ota_begin");
}
// Read & write loop
char buf[512];
int len;
while ((len = httpd_req_recv(req, buf, sizeof(buf))) > 0) {
esp_task_wdt_reset();
err = esp_ota_write(ota_handle, buf, len);
if (err != ESP_OK) {
ESP_LOGE(TAG, "ota_write failed: %d", err);
esp_ota_abort(ota_handle);
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "ota_write");
}
vTaskDelay(pdMS_TO_TICKS(1)); // yield
}
if (len < 0) {
ESP_LOGE(TAG, "recv failed: %d", len);
esp_ota_abort(ota_handle);
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "recv_error");
}
// Finish OTA
err = esp_ota_end(ota_handle);
if (err != ESP_OK) {
ESP_LOGE(TAG, "ota_end failed: %d", err);
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "ota_end");
}
err = esp_ota_set_boot_partition(update_partition);
if (err != ESP_OK) {
ESP_LOGE(TAG, "set_boot failed: %d", err);
esp_task_wdt_delete(NULL);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "set_boot");
}
// Success!
ESP_LOGI(TAG, "OTA complete, rebooting…");
httpd_resp_set_type(req, "application/json");
httpd_resp_sendstr(req, "{\"status\":\"OK\"}");
// Give client time to receive
vTaskDelay(pdMS_TO_TICKS(500));
// Unsubscribe from WDT and reboot
esp_task_wdt_delete(NULL);
esp_restart();
return ESP_OK; // not reached
}
Debug Message
boot_comm: Image requires efuse blk rev >= v251.85, but chip is v1.3�[0m
�[0;31mE (119390) WebServer: ota_end failed: 5379�[0m
�[0;33mW (119390) httpd_txrx: httpd_resp_send_err: 500 Internal Server Error - ota_end�[0m
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.