Trouble flashing esp-matter examples to ESP-WROVER-E

marcelgoh
Posts: 1
Joined: Wed Apr 19, 2023 4:03 pm

Trouble flashing esp-matter examples to ESP-WROVER-E

Postby marcelgoh » Wed Apr 19, 2023 5:04 pm

Hi all,

I am using an ESP-WROVER-E and am having trouble flashing the examples found in the esp-matter​ repo (specifically the light_switch​ one, but I tried others as well and they give the same errors).

The problem arises when I try to run idf.py flash. Everything succeeds, but when I monitor it repeats this message ad infinitum:
image.png
image.png (14.55 KiB) Viewed 751 times
Upon some search I gleaned that this is due to encryption being enabled on the chip, meaning a different flash command should be used. I tried both encrypted-flash​ and encrypted-app-flash, but neither works; I just get the following message:
image(1).png
image(1).png (16.74 KiB) Viewed 751 times
I thought it'd be best to figure out what exactly I have configured with regards to security, so I ran esptool.py get_security_info​ but this only returns

Code: Select all

A fatal error occurred: Failed to get security info (result was FF00: Command not implemented)
I saw online that I might need to supply the --no-stub​ option to this command, which gave different, but still not entirely useful, behaviour:
image(1).png
image(1).png (16.74 KiB) Viewed 751 times
I have a hypothesis (which may be wholly unfounded) that that is why my flash is causing unhappy things to happen on the device: namely, it cannot get the security info so it does not know that encryption is enabled and that's why it happily flashes unreadable data onto the device without warning or complaint. Then I thought I should try manually encrypting using our host-generated key, and flashing the encrypted binary onto the device. Concretely, I ran

Code: Select all

espsecure.py encrypt_flash_data --keyfile <.key-file> --address 0x10000 --output build/light_switch_encrypted.bin build/light_switch.bin
and then flashed the light_switch_encrypted​ with idf.py flash​, but that didn't seem to work either. I get the same result as in the very first flash​ at the beginning of this post.

I have tried following various Espressif documentation, and due to how extensive it is, I suspect the answer may be hiding in there somewhere, but I have been unable to find anything that works. I have also tried (cautiously) playing around with the config settings found in idf.py menuconfig​, but I'm not sure exactly what to change and nothing I have toggled has helped.

Thank you in advance for taking the time to help me with this issue. I may not be able to reply to this thread until Monday, so apologies if I am silent for awhile, but I do appreciate any and all pointers or insight on this problem.
Attachments
image(3).png
image(3).png (45.22 KiB) Viewed 751 times

Who is online

Users browsing this forum: No registered users and 107 guests