Open hatl opened 1 month ago
It's strange. On very rare occasions, the pairing works...
I tried to run the same code on an ESP32-H2. Unfortunately, this also fails.
I'm also getting the following errors:
I (1541) chip[ZCL]: Initiating Admin Commissioning cluster.
I (1551) chip[DIS]: Updating services using commissioning mode 1
E (1551) chip[DIS]: Failed to remove advertised services: 3
I (1561) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=0164/00 cm=1 cp=0
E (1571) chip[DIS]: Failed to advertise commissionable node: 3
E (1571) chip[DIS]: Failed to finalize service update: 3
...
I (94920) chip[SVR]: Commissioning completed successfully
...
E (98700) chip[DL]: SRP update error: internal server error
i could narrow it down further: the commissioning works when using the test device attestation. when i switch the config to factory attestation, i get the errors as described.
i've changed the following parameters:
CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER=y
CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER=y
CONFIG_SEC_CERT_DAC_PROVIDER=y
CONFIG_FACTORY_DEVICE_INSTANCE_INFO_PROVIDER=y
i generate the factory and cert images using the following command:
esp-matter-mfg-tool -cn "My OnOff Plug" -v 0xFFF2 -p 0x8001 --pai \
--vendor-name "vendor" --product-name "My OnOff Plug" --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2024-08-09 \
-k $MATTER_SDK_PATH/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Key.pem \
-c $MATTER_SDK_PATH/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd $MATTER_SDK_PATH/credentials/test/certification-declaration/Chip-Test-CD-FFF2-8001.der \
--dac-in-secure-cert
flashed using:
esptool.py -p /dev/ttyACM0 write_flash 0x10000 out/fff2_8001/37d58392-35db-4ef8-a8ac-9e9576c982f0/*-partition.bin
esptool.py -p /dev/ttyACM0 write_flash 0xd000 out/fff2_8001/37d58392-35db-4ef8-a8ac-9e9576c982f0/*_esp_secure_cert.bin
Thanks to the support of @trailblazing-tech I could narrow it down further. The issue only occurs when using an ESP Thread Border Router. It works fine, when using a ZBT-1 (SkyConnect) USB dongle. Currently, I'm running v1.0. I'll continue testing using the latest commit in the main branch.
Could you tell me the commit of ESP-IDF you are using for Thread BR? Looks like it is the issue of Thread BR? Are you using the esp-thread-br repo https://github.com/espressif/esp-thread-br? Or you are just using the example from ESP-IDF?
I tried v1.0 in the repo: https://github.com/espressif/esp-thread-br.git and idf v5.2.2
But I also tried using a more recent version: 6011f07ca9bd31686944b33422d86c1e4d429479 together with idf v5.3.0
Could you verify that the dataset on the end-device is the same as the dataset of the Thread BR?
You can get the dataset of the end-device by input matter esp ot_cli dataset active -x
in the end-device's console.
Using the existing examples, I wrote some basic code to expose a switch (onoff plugin) and buttons - see: https://github.com/hatl/esp-matter-code When commissioning the device via WiFi, everything works as expected and the device shows up in Home Assistant. Then, I switched to OpenThread - according to https://docs.espressif.com/projects/esp-matter/en/latest/esp32c6/developing.html#flashing-the-firmware
When using Thread, the error
E (34252) chip[DL]: SRP update error: internal server error
as mentioned below keeps repeating.Environment
ESP-Matter Commit Id: release/v1.3 - 48751df484932b269b03b7a1432d5e2fb68b95cf
ESP-IDF Commit Id: v5.3 - e0991facf5ecb362af6aac1fae972139eb38d2e4
SoC (eg: ESP32 or ESP32-C3): ESP32-C6
Device Logs (Please attach the log file): see below
Host Machine OS: Ubuntu 24.04
Host Machine Python version: 3.12.3
Commissioner app and versions if present: Home Assistant on Android 2024.7.3
Home hub app and versions if present:
Commissioner's logs if present:
Any additional details
Log for OpenThread commissioning:
Repeating errror:
During WiFi commissioning, I get some errors, but it works: