Search found 7 matches

by Asanga
Thu Nov 14, 2024 3:05 am
Forum: ESP-IDF
Topic: Missing option for USB MSC drive format
Replies: 0
Views: 577

Missing option for USB MSC drive format

I am using idf 5.0.7 for software development to use in the module ESP32-S3. I have an application to mount file system on USB Flash drive. At some stage, I have to format the USB drive while is connected to ESP32-S3. But there is no function to do it. I checked with the idf source code and there ar...
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: 596

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: 3772

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: 3772

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: 3772

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: 3772

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: 3772

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...