Skip to content

esp_delta_ota fails with error "esp_delta_ota: Error while applying patch: Function not implemented." (IEC-113) #330

@ntremble-sst

Description

@ntremble-sst

Answers checklist.

  • I have read the documentation of the component in question and the issue is not addressed there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hi,

I created the esp_delta_ota example project and had the HTTP sample work correctly on the ESP32-S3 target.

I then attempted to incorporate that code into my project using the same IDF 5.1.2 as I used for the example, but it does not complete. The primary differences are:

  • the binaries are much larger (5MB). My test has only a small change, but the patch comes out at 89KB heatshrink compressed.
  • the patch is being read from an eMMC card, having been received via CAN at some earlier point. Standard POSIX file i/o.

When I run the code it commences feeding the first byte after the 64 byte header (magic+SHA256+reserved). It gets in about a dozen bytes, then the detools function dfpatch_size() returns 'not implemented' with a size value of 656.

I have tried different sized blocks (64 bytes, 1024 bytes, 2048 bytes) but always the same error.

This log shows what is happening. I have added some logging to detools, so the line numbers will be a little out compared to the pure code, but only by a few lines. I can fix that if it helps.

I found it necessary to modify the python script somewhat to get it to run on Windows, but I did try running the original on Linux and got the same output, so pretty sure that's not the problem.

esp_delta_ota 1.10 direct from the component library as a managed component.
detools 0.53 (part of the same component)
heatshrink 0.4.1 (part of the same component)
esp-idf 5.1.2
python 3.11.2
ESP32-S3-WROOM-1-N16R8

Thank you.

d (67496) OTA: enUpdateFirmware(): feeding block to patch updater
detools process_init() line 1221: entry
detools chunk_get_no_check() line 87: data: 0x04
detools chunk_get_no_check() line 87: data: 0x80
detools chunk_get_no_check() line 87: data: 0xA7
detools chunk_get_no_check() line 87: data: 0xAC
detools chunk_get_no_check() line 87: data: 0x05
detools process_dfpatch_size() line 1249: entry
detools patch_reader_decompress() line 1051: call algorithm specific decompress()
detools chunk_get_no_check() line 87: data: 0x44
detools chunk_get_no_check() line 87: data: 0xC8
detools chunk_get_no_check() line 87: data: 0x42
detools patch_reader_decompress() line 1051: call algorithm specific decompress()
detools chunk_get_no_check() line 87: data: 0xA0
detools process_dfpatch_size() line 1259: size 656 not implemented
E (67549) esp_delta_ota: Error while applying patch: Function not implemented.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions