Closed pavel808 closed 2 days ago
@pavel808 In esp-matter light example, the default configure for C6 is Wi-Fi, have you changed to this sdkconfig sdkconfig.defaults.c6_thread to build C6 firmware?
@chshu Ah, now we're getting somewhere. I haven't actually. I tried to view and change settings using idf.py menuconfig but didn't see a suitable option there.
In this case, how do I make the sdkconfig.defaults.c6_thread active? Should I rename this file to sdkconfig.defaults ?
You can simply replace the sdkconfig.defaults
with sdkconfig.defaults.c6_thread
, and rebuild the example.
Hi @chshu . Thanks. However, no matter what I try to do to enable Thread instead of Wi-Fi I get build errors as below due to partitioning size issues. I tried changing different options in the sdkconfig.defaults without success. I tried reverting the sdkconfig.defaults to the original (this builds), then changing different options via idf.py menuconfig
such as enabling Thread options, changing Flash size, disabling OTA etc. Nothing seems to solve this after about 30+ builds:)
Successfully created esp32c6 image.
Generated /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/light.bin
[2063/2063] cd /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/es...ble.bin /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/light.bin
FAILED: esp-idf/esptool_py/CMakeFiles/app_check_size /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/esp-idf/esptool_py/CMakeFiles/app_check_size
cd /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/esp-idf/esptool_py && /home/user/.espressif/python_env/idf5.2_py3.10_env/bin/python /home/user/esp-idf/components/partition_table/check_sizes.py --offset 0xc000 partition --type app /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/partition_table/partition-table.bin /home/user/MatterEdgeDevice/esp-matter/examples/edge-controller/build/light.bin
Error: All app partitions are too small for binary light.bin size 0x1f60a0:
- Part 'ota_0' 0/16 @ 0x20000 size 0x1e0000 (overflow 0x160a0)
- Part 'ota_1' 0/17 @ 0x200000 size 0x1e0000 (overflow 0x160a0)
ninja: build stopped: subcommand failed.
Seems you were testing your own application edge-controller
, and its firmware size is too big to fit in the default partition table, so you need to modify the partition table and increase the ota_0
size.
Could you please test the default light example first, just to ensure your test environment is all good.
@chshu Unfortunately it's the same story for the original light application. What i'm doing is just enabling Open Thread via idf.py menuconfig, and nothing more.
idf.py set-target esp32-c6 idf.py menuconfig (Component config->OpenThread. Enable it with the [*]) idf.py build
Successfully created esp32c6 image.
Generated /home/user/esp-matter/examples/light/build/light.bin
[1959/1959] cd /home/user/esp-matter/examples/light/build/esp-idf/esptool_py && /home/u...artition_table/partition-table.bin /home/user/esp-matter/examples/light/build/light.bin
FAILED: esp-idf/esptool_py/CMakeFiles/app_check_size /home/user/esp-matter/examples/light/build/esp-idf/esptool_py/CMakeFiles/app_check_size
cd /home/user/esp-matter/examples/light/build/esp-idf/esptool_py && /home/user/.espressif/python_env/idf5.2_py3.10_env/bin/python /home/user/esp-idf/components/partition_table/check_sizes.py --offset 0xc000 partition --type app /home/user/esp-matter/examples/light/build/partition_table/partition-table.bin /home/user/esp-matter/examples/light/build/light.bin
Error: All app partitions are too small for binary light.bin size 0x1f3a50:
- Part 'ota_0' 0/16 @ 0x20000 size 0x1e0000 (overflow 0x13a50)
- Part 'ota_1' 0/17 @ 0x200000 size 0x1e0000 (overflow 0x13a50)
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/user/esp-matter/examples/light/build/log/idf_py_stderr_output_300207 and /home/user/esp-matter/examples/light/build/log/idf_py_stdout_output_300207
@chshu I tried increasing the Flash size to 8MB via menuconfig. However it fails on bootup stating that the detected Flash size is only 4MB. I'm not sure why, because The ESP32-C6-DevKitC-1 should have 8MB of Flash.
Anyways I modified the partitions.csv file as follows just have one app partition :
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted
nvs, data, nvs, 0x10000, 0xC000,
nvs_keys, data, nvs_keys,, 0x1000, encrypted
otadata, data, ota, , 0x2000
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, 0x20000, 0x3C0000,
fctry, data, nvs, 0x3E0000, 0x6000
The app now builds and runs. On attempting to commission the device via chip-tool and the TBR, it goes further in the commissioning process but eventually fails. I've attached the logs here from chip-tool. Any idea what could be potentially be still missing? Again, thanks for your help.
@pavel808 please follow this instruction to switch from Matter over Wi-Fi to Thread: https://github.com/espressif/esp-thread-br/issues/81#issuecomment-2232715944
idf.py menuconfig (Component config->OpenThread. Enable it with the [*])
this way will compile both Wi-Fi and Thread to the firmware, so increases the binary size.
@pavel808 please follow this instruction to switch from Matter over Wi-Fi to Thread: #81 (comment)
idf.py menuconfig (Component config->OpenThread. Enable it with the [*])
this way will compile both Wi-Fi and Thread to the firmware, so increases the binary size.
@chshu I still have the same issue when just using this file unfortunately. (and not just enabling Thread via menuconfig) .
@pavel808 could you please tryout these steps:
cd esp-matter/examples/light
cp sdkconfig.defaults.c6_thread sdkconfig.defaults.esp32c6
idf.py set-target esp32c6
idf.py build
I just double confirmed it worked in my environment.
@chshu My bad. I wasn't swapping it with the sdkconfig.defaults.esp32c6 file. I can confirm that it now works, even with my own application. Thank you for the help on this!
Regarding the Thread Border Router, one thing which is an issue is that each time the board is reset, it loses the connection with the Wi-Fi network and I must manually enter all the details again and start Thread. Is this the default behaviour? How can I get this to retain the connection each time it boots up and have the Thread network active without manual intervention do you know? Thanks.
You can enable the auto start mode: https://docs.espressif.com/projects/esp-thread-br/en/latest/dev-guide/build_and_run.html#wi-fi-based-thread-border-router
I have an ESP32-C6 board and I have flashed the simple Matter light example onto it.
I have this ESP Thread Border Router too : https://docs.espressif.com/projects/esp-thread-br/en/latest/hardware_platforms.html
I have built and flashed the ESP32-S3 chip on the TBR as described here : https://docs.espressif.com/projects/esp-thread-br/en/latest/hardware_platforms.html
I then connect the TBR to my local wi-fi network, activate the dataset and Thread network as doscumented, and all looks good from the TBR console from the ESP32-S3 chip.
Now I am trying to use chip-tool to commission the ESP32-C6 Matter light example over Thread via the TBR which is set up. :
chip-tool pairing code-thread 0x7293 hex:0e080000000000010000000300000f35060004001fffe002081b298d83a096e8ec0708fd7619a99f322224051075ccd01fae3d13d83aeab1d1f6b6dc60030f4f70656e5468726561642d3261653301022ae30410b9a844ce2468bddd8363622d256e20df0c0402a0f7f8 34970112332
The commissioning fails with the following error from chip-tool :
Run command failure: src/controller/AutoCommissioner.cpp:313: CHIP Error 0x0000002F: Invalid argument
Below are logs from the ESP32-C6 Matter light example. I don't understand what is the issue. Am I missing a step? I'd appreciate any help with this. Thanks :
Run command failure: src/controller/AutoCommissioner.cpp:313: CHIP Error 0x0000002F: Invalid argument