Search found 6 matches

by Asanga
Tue Jul 23, 2024 10:58 pm
Forum: ESP-IDF
Topic: Flash MSC over USB is not mounting back to application after unplugging USB cable
Replies: 0
Views: 435

Flash MSC over USB is not mounting back to application after unplugging USB cable

I tested the example tusb_msc over flash. IDF version is 5.2.2 and Module is ESP32-S3. Tested on Win10. https://github.com/espressif/esp-idf/tree/v5.2.2/examples/peripherals/usb/device/tusb_msc The flash storage media is exposed to the application at the beginning. When connecting USB to Win PC, the...
by Asanga
Tue May 28, 2024 11:10 pm
Forum: General Discussion
Topic: How to verify esp32 OTA downloaded image using it's own elf hash 256?
Replies: 9
Views: 3032

Re: How to verify esp32 OTA downloaded image using it's own elf hash 256?

I forgot to remove last 32bytes of the app during HASH256 manual calculation. Later I realized idf esp_partition_get_sha256() does my job when getting hash of the app with considering return codes.
by Asanga
Mon May 27, 2024 10:48 pm
Forum: General Discussion
Topic: How to verify esp32 OTA downloaded image using it's own elf hash 256?
Replies: 9
Views: 3032

Re: How to verify esp32 OTA downloaded image using it's own elf hash 256?

My bad, I didn't read the document yet :? I think this is explained in there. I should start reading documents.

The idf version I am using is 5.1.2. Thank you for the help.
by Asanga
Thu May 23, 2024 10:46 pm
Forum: General Discussion
Topic: How to verify esp32 OTA downloaded image using it's own elf hash 256?
Replies: 9
Views: 3032

Re: How to verify esp32 OTA downloaded image using it's own elf hash 256?

I am not getting the question? What versions? Are asking about idf versions?
by Asanga
Wed May 22, 2024 11:15 pm
Forum: General Discussion
Topic: How to verify esp32 OTA downloaded image using it's own elf hash 256?
Replies: 9
Views: 3032

Re: How to verify esp32 OTA downloaded image using it's own elf hash 256?

Thanks eriksl.

I found the function which extract SHA-256 from app image and does the job. It is
  1. esp_err_t bootloader_common_get_sha256_of_partition (uint32_t address, uint32_t size, int type, uint8_t *out_sha_256)
and located in "..\components\bootloader_support\src\bootloader_common.c" file.
by Asanga
Mon Apr 29, 2024 1:57 am
Forum: General Discussion
Topic: How to verify esp32 OTA downloaded image using it's own elf hash 256?
Replies: 9
Views: 3032

How to verify esp32 OTA downloaded image using it's own elf hash 256?

Hi, I am using OTA to update ESP32. I can verify the image before downloading by checking it's image header information such as version number, app name, etc. Once finishing the ota download, I got image hash256 using following function. esp_app_desc_t app_info; esp_ota_get_partition_description(par...