Replies: 1 comment 1 reply
-
|
@leandropg, can you please confirm if you have followed the steps mentioned here . |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am developing a project that implemented a Matter device and it works well. I am using the branch
release/v1.4Now, the project plan uses the Pre-Provisioned Espressif service to obtain the Matter credentials preloaded into the chip. For this reason I prepared my code to use the
ESP Secure Cert partition. I have generated the partition follow next steps in the documentation:https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/esp32/secure_cert_partition.md
Additionally, I have generated the
Factory partitionwhere are stored all the details of the device. I have a minor issues, but all works as expected. The device runs the commission process as expected. I have checked all the keys stored in theFactory partitioninto the namespace chip-factory (discriminator, salt, vendor-name, etc.). I can read each key normally.My partition table is very similar to the light example:
https://github.com/espressif/esp-matter/blob/main/examples/light/partitions.csv
All works fine with both partitions.
But, I have a problem when I enable Flash Encryption and NVS Encryption in the chip. In the moment that the code tries to open the commission window, it fails:
The error isn't very clear. So, I have debugged the code and I have found that it fails when it tries to access to the first key into the
Factory Partition. This line return error because it can't find the first keyiteration-countinto theFactory partition:https://github.com/espressif/connectedhomeip/blob/9b8fffe0bb4e7ba7aac319f5905070a3476db7cb/src/app/server/CommissioningWindowManager.cpp#L290-L291
It returns the code error 0x1102. The key doesn't exist.
In the debug session, I have found that the namespace chip-factory exists, but it doesn't have any key.
I generate the
Factory Partitionusing the commandgenerate_esp32_chip_factory_bin.py.I suspect that it's an incompatibility between the
Factory partitiongenerated in plain format and read in a encrypted because I have enabled NVS Encryption and in this part of the code, the NVS partition is open in a secure way usingnvs_flash_secure_init_partition():https://github.com/project-chip/connectedhomeip/blob/92ab620ef431c6d4d97233378a603e09f59f919c/src/platform/ESP32/ConfigurationManagerImpl.cpp#L98-L107
But the data into the
Factory partitionis loaded in plain text. I tried to flash it encrypted using theesptool.pycommand, but the results are the same.I have tried to find in the documentation in the ESP32 Matter SDK or in a example that enable both features and
Factory partitionat the same time but I didn't find it.I hope that you can guide me to find what is the real problem and how solve it. I need solve this problem before to send the device to the certification process.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions