Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre encrypted HTTPS OTA fails with Mismatch chip id (IDFGH-9064) #10467

Closed
3 tasks done
schafon opened this issue Dec 30, 2022 · 3 comments
Closed
3 tasks done

Pre encrypted HTTPS OTA fails with Mismatch chip id (IDFGH-9064) #10467

schafon opened this issue Dec 30, 2022 · 3 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@schafon
Copy link

schafon commented Dec 30, 2022

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

ESP-IDF v5.1-dev-2066-g7869f4e151

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32-S2-DEVKITM-1, ESP32-S2 MINI, ESP32-S2-WROOM-I (CUSTOM)

Power Supply used.

USB

What is the expected behavior?

Complete OTA update using HTTPS and pre encrypted firmware.

What is the actual behavior?

Fail to complete OTA update with error Mismatch chip id, expected 2, found 25300

Steps to reproduce.

  1. get any esp32-s2 with 4mb of flash (thats what I have around)
  2. Flash the pre_encrypted_ota from https://github.com/espressif/esp-idf/tree/master/examples/system/ota/pre_encrypted_ota
  3. upload the encrypted firmware to an https server
  4. run the code on the device

Debug Logs.

[0;32mI (6463) pre_encrypted_ota_example: Starting Pre Encrypted OTA example�[0m
�[0;32mI (6463) esp_encrypted_img: Starting Decryption Process�[0m
I (6483) wifi:<ba-add>idx:1 (ifx:0, 80:03:84:07:91:f8), tid:0, ssn:0, winSize:64
�[0;32mI (7723) HTTP_CLIENT: Body received in fetch header state, 0x3ffddb5f, 245�[0m
�[0;32mI (7723) esp_https_ota: Starting OTA...�[0m
�[0;32mI (7723) esp_https_ota: Writing to partition subtype 16 at offset 0x110000�[0m
�[0;32mI (7733) esp_encrypted_img: Magic Verified�[0m
�[0;32mI (7733) esp_encrypted_img: Reading RSA private key�[0m
�[0;32mI (8983) pre_encrypted_ota_example: Running firmware version: v5.1-dev-2066-g7869f4e151-dirty�[0m
�[0;31mE (8983) esp_https_ota: Mismatch chip id, expected 2, found 65529�[0m
�[0;31mE (8983) pre_encrypted_ota_example: Complete data was not received.�[0m
�[0;31mE (8993) pre_encrypted_ota_example: ESP_HTTPS_OTA upgrade failed�[0m

More Information.

The same code exactly will work as expected in esp32-s3 - according to my testing.
The esp32S3 has 8 mb of flash (again, this is what I have around).

Found similar issue on esp for Arduino:
espressif/arduino-esp32#7640

No flash encryption or secure boot is enabled.

@schafon schafon added the Type: Bug bugs in IDF label Dec 30, 2022
@schafon schafon changed the title Pre encrypted OTA fails with Mismatch chip id, expected 2, found 25300 Pre encrypted HTTPS OTA fails with Mismatch chip id Dec 30, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 30, 2022
@github-actions github-actions bot changed the title Pre encrypted HTTPS OTA fails with Mismatch chip id Pre encrypted HTTPS OTA fails with Mismatch chip id (IDFGH-9064) Dec 30, 2022
@schafon
Copy link
Author

schafon commented Dec 31, 2022

@mahavirj
@hmalpani
You guys did some work on this example lately, maybe you can check this on your end?

@hmalpani
Copy link
Contributor

hmalpani commented Jan 2, 2023

Hello @schafon

Can you please try the same example on master? The fix for this issue has already been merged. Or you can apply 8437c0d commit and then try the example. This should solve the problem you are facing. We are working on backporting the fix. Sorry for the inconvenience.

@schafon
Copy link
Author

schafon commented Jan 2, 2023

Hi, sorry my bad! The master indeed works. I've updated to it.
Thanks and sorry for the FP

@schafon schafon closed this as completed Jan 2, 2023
@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Done Issue is done internally and removed Status: Opened Issue is new labels Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants