Understanding OTA to update ESP32C6 to an edited version of ESP-AT with use AT+USEROTA

romboidale
Posts: 5
Joined: Wed Aug 28, 2024 10:18 am

Understanding OTA to update ESP32C6 to an edited version of ESP-AT with use AT+USEROTA

Postby romboidale » Thu Aug 29, 2024 10:32 am

Hello, I'm using a ESP32-C6-MINI-1 and I want to implement OTA updates. My aim is to be able to update the module with an edited version of the ESP-AT firmware.

From what I understand the ESP32-C6-MINI-1 has 2 OTA partitions of 2MB each that it uses to swap between the old version and the new one:

Code: Select all

# Name, Type, SubType, Offset, Size
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
nvs, data, nvs, 0x10000, 0xE000
at_customize, 0x40, 0, 0x1E000, 0x42000
ota_0, app, ota_0, 0x60000, 0x1d0000
ota_1, app, ota_1, 0x230000, 0x1d0000
now, if I use AT+CIUPDATE to automatically update to the latest AT firmware it's all good, but if I use the factory binary with AT+USEROTA with the factory fw it always fail at the same download percentage (45.3%): I think that's because the factory binary of ESP-AT is a full 4MB which includes bootloader, partition table, data, ecc., but to update via OTA I should separate the "data" part from the factory firmware I get when compiling ESP-AT and only use that. Am I correct about this?
If so, can you help me doing that? How can I compile into a binary that I can use for OTA? (which ideally is less than 2MB)

thank you!

Who is online

Users browsing this forum: No registered users and 369 guests