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

Change light example from WiFi to Thread? (CON-1611) #1340

Open
olavt opened this issue Mar 23, 2025 · 14 comments
Open

Change light example from WiFi to Thread? (CON-1611) #1340

olavt opened this issue Mar 23, 2025 · 14 comments

Comments

@olavt
Copy link

olavt commented Mar 23, 2025

What changes are required to change the light example from WiFi to Thread?

I tried to change the following in the SDK Configuration editor:

  • Check the OPENTHREAD_ENABLED option
  • Clear the ENABLE_WIFI_STATION option

But, I get build errors like these:

/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:340:5: error: 'mbedtls_ssl_conf_handshake_timeout' was not declared in this scope; did you mean 'mbedtls_ssl_conf_read_timeout'?
340 | mbedtls_ssl_conf_handshake_timeout(&mConf, 8000, 60000);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_read_timeout
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:349:9: error: 'mbedtls_ssl_conf_dtls_cookies' was not declared in this scope; did you mean 'mbedtls_ssl_conf_dn_hints'?
349 | mbedtls_ssl_conf_dtls_cookies(&mConf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &mCookieCtx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_dn_hints
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:365:16: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
365 | rval = mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'ot::Error ot::MeshCoP::SecureTransport::SetClientId(const uint8_t*, uint8_t)':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:746:16: error: 'mbedtls_ssl_set_client_transport_id' was not declared in this scope; did you mean 'mbedtls_ssl_conf_transport'?
746 | int rval = mbedtls_ssl_set_client_transport_id(&mSsl, aClientId, aLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_transport
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'void ot::MeshCoP::SecureTransport::Process()':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:1126:17: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
1126 | mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[264/1679] Performing build step for 'chip_gn'

@github-actions github-actions bot changed the title Change light example from WiWi to Thread? Change light example from WiWi to Thread? (CON-1611) Mar 23, 2025
@Jerry-ESP
Copy link
Contributor

Jerry-ESP commented Mar 24, 2025

@olavt You can simply change the target to esp32h2 to switch from WiFi to thread, you can refer to this file for thread device configuration https://github.com/espressif/esp-matter/blob/main/examples/light/sdkconfig.defaults.esp32h2

the command set target is: idf.py set-target esp32h2

@olavt
Copy link
Author

olavt commented Mar 24, 2025

Does this mean that I could either change the settings according to the link above OR change the target device from ESP32-C6 to ESP32-H2? Are all other settings identical between ESP32-C6 and ESP32-H2?

@olavt
Copy link
Author

olavt commented Mar 24, 2025

I set the Espressif Device Target to "espp32h2" and still got these build errors:

/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'ot::Error ot::MeshCoP::SecureTransport::Setup(bool)':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:340:5: error: 'mbedtls_ssl_conf_handshake_timeout' was not declared in this scope; did you mean 'mbedtls_ssl_conf_read_timeout'?
340 | mbedtls_ssl_conf_handshake_timeout(&mConf, 8000, 60000);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_read_timeout
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:349:9: error: 'mbedtls_ssl_conf_dtls_cookies' was not declared in this scope; did you mean 'mbedtls_ssl_conf_dn_hints'?
349 | mbedtls_ssl_conf_dtls_cookies(&mConf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &mCookieCtx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_dn_hints
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:365:16: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
365 | rval = mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'ot::Error ot::MeshCoP::SecureTransport::SetClientId(const uint8_t*, uint8_t)':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:746:16: error: 'mbedtls_ssl_set_client_transport_id' was not declared in this scope; did you mean 'mbedtls_ssl_conf_transport'?
746 | int rval = mbedtls_ssl_set_client_transport_id(&mSsl, aClientId, aLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_transport
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'void ot::MeshCoP::SecureTransport::Process()':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:1126:17: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
1126 | mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[266/1536] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/net/srp_client.cpp.obj
ninja: build stopped: subcommand failed.

  • The terminal process "ninja" terminated with exit code: 1.

@Jerry-ESP
Copy link
Contributor

@olavt If you want to run a thread device on esp32c6, you can use the sdkconfig.defaults.c6_thread, the command is:
idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.defaults.c6_thread" set-target esp32c6

@olavt
Copy link
Author

olavt commented Mar 25, 2025

@Jerry-ESP I use VS Code with the Esptressif ESP-IDF Extension with Matter support.

I executed the command and got quite a few warnings and when I build the project I still get errors:

olavt@Olavs-MacBook-Pro light % idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.defaults.c6_thread" set-target esp32c6
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Executing action: set-target
Set Target to: esp32c6, new sdkconfig will be created.
Running cmake in directory /Users/olavt/Source/Repos/light/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/olavt/.espressif/python_env/idf5.4_py3.9_env/bin/python -DESP_PLATFORM=1 -DSDKCONFIG_DEFAULTS=sdkconfig.defaults.c6_thread -DIDF_TARGET=esp32c6 -DCCACHE_ENABLE=0 /Users/olavt/Source/Repos/light"...
-- Existing sdkconfig '/Users/olavt/Source/Repos/light/sdkconfig' renamed to '/Users/olavt/Source/Repos/light/sdkconfig.old'.
-- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)")
IDF_VERSION: 5.4.0; idf version number: 5.4.0
Sequence of SDKCONFIG files: sdkconfig.defaults;sdkconfig.defaults.c6_thread
-- Component directory /Users/olavt/.espressif/esp-matter/examples/common/blemesh_platform does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/olavt/.espressif/esp-matter/examples/common/cmake_common does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/olavt/.espressif/esp-matter/examples/common/external_platform does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/olavt/.espressif/esp-matter/examples/common/relinker does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/olavt/.espressif/esp-matter/examples/common/secondary_ble_adv does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/olavt/.espressif/esp-matter/examples/common/utils does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/olavt/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/olavt/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/olavt/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32c6
NOTICE: Skipping optional dependency: espressif/cmake_utilities
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Skipping optional dependency: espressif/cmake_utilities
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Skipping optional dependency: espressif/cmake_utilities
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Skipping optional dependency: espressif/cmake_utilities
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Processing 18 dependencies:
NOTICE: [1/18] espressif/button (3.5.0)
NOTICE: [2/18] espressif/cbor (0.6.0~1)
NOTICE: [3/18] espressif/cmake_utilities (0.5.3)
NOTICE: [4/18] espressif/esp-serial-flasher (0.0.11)
NOTICE: [5/18] espressif/esp_delta_ota (1.1.1)
NOTICE: [6/18] espressif/esp_diag_data_store (1.0.2)
NOTICE: [7/18] espressif/esp_diagnostics (1.2.1)
NOTICE: [8/18] espressif/esp_encrypted_img (2.1.0)
NOTICE: [9/18] espressif/esp_insights (1.2.2)
NOTICE: [10/18] espressif/esp_rcp_update (1.2.0)
NOTICE: [11/18] espressif/esp_secure_cert_mgr (2.5.0)
NOTICE: [12/18] espressif/jsmn (1.1.0)
NOTICE: [13/18] espressif/json_generator (1.1.2)
NOTICE: [14/18] espressif/json_parser (1.0.3)
NOTICE: [15/18] espressif/led_strip (1.0.0)
NOTICE: [16/18] espressif/mdns (1.8.2)
NOTICE: [17/18] espressif/rmaker_common (1.4.6)
NOTICE: [18/18] idf (5.4.0)
-- Found Python3: /Users/olavt/.espressif/esp-matter/connectedhomeip/connectedhomeip/.environment/cipd/packages/pigweed/bin/python3.11 (found version "3.11.3") found components: Interpreter
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Skipping optional dependency: espressif/cmake_utilities
-- Project sdkconfig file /Users/olavt/Source/Repos/light/sdkconfig
warning: default on the choice symbol SEC_CERT_DAC_PROVIDER (defined at /Users/olavt/.espressif/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:815, /Users/olavt/.espressif/esp-matter/components/esp_matter/Kconfig:48) will have no effect, as defaults do not affect choice symbols
warning: the choice symbol SEC_CERT_DAC_PROVIDER (defined at /Users/olavt/.espressif/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:815, /Users/olavt/.espressif/esp-matter/components/esp_matter/Kconfig:48) is defined with a prompt outside the choice
info: INFO: Symbol SEC_CERT_DAC_PROVIDER defined in multiple locations (see below). Please check if this is a correct behavior or a random name match:
/Users/olavt/.espressif/esp-matter/components/esp_matter/Kconfig:48
/Users/olavt/.espressif/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:815
Loading defaults file /Users/olavt/Source/Repos/light/sdkconfig.defaults...
warning: unknown kconfig symbol 'ENABLE_WIFI_AP' assigned to 'n' in /Users/olavt/Source/Repos/light/sdkconfig.defaults
Loading defaults file /Users/olavt/Source/Repos/light/sdkconfig.defaults.esp32c6...
warning: unknown kconfig symbol 'ENABLE_WIFI_AP' assigned to 'n' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.esp32c6
Loading defaults file /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread...
/Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread:10 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE was replaced with CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE
warning: unknown kconfig symbol 'ENABLE_WIFI_AP' assigned to 'n' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'LIBSODIUM_USE_MBEDTLS_SHA' assigned to 'y' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_BUTTONS_NUM' assigned to '1' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_BUTTON_1_TYPE_GPIO' assigned to 'y' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_BUTTON_1_GPIO' assigned to '9' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_BUTTON_1_LEVEL' assigned to '0' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_LEDS_NUM' assigned to '1' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_LED_TYPE_RGB' assigned to 'y' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_LED_RGB_GPIO' assigned to '8' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
warning: unknown kconfig symbol 'BSP_LED_RGB_BACKEND_RMT' assigned to 'y' in /Users/olavt/Source/Repos/light/sdkconfig.defaults.c6_thread
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/riscv/ld/rom.api.ld
-- Found Python3: /Users/olavt/.espressif/python_env/idf5.4_py3.9_env/bin/python (found version "3.9.6") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "light" version: 1.0
-- Adding linker script /Users/olavt/Source/Repos/light/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/olavt/Source/Repos/light/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.systimer.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.coexist.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib-normal.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.heap.ld
-- Adding linker script /Users/olavt/esp/v5.4/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
ESP Insights Project commit: HEAD-HASH-NOTFOUND
-- BUTTON: 3.5.0
-- Components: app_bridge app_reset app_trace app_update bootloader bootloader_support bt chip cmock console cxx device driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_driver_ana_cmpr esp_driver_cam esp_driver_dac esp_driver_gpio esp_driver_gptimer esp_driver_i2c esp_driver_i2s esp_driver_isp esp_driver_jpeg esp_driver_ledc esp_driver_mcpwm esp_driver_parlio esp_driver_pcnt esp_driver_ppa esp_driver_rmt esp_driver_sdio esp_driver_sdm esp_driver_sdmmc esp_driver_sdspi esp_driver_spi esp_driver_touch_sens esp_driver_tsens esp_driver_uart esp_driver_usb_serial_jtag esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_matter esp_matter_bridge esp_matter_console esp_matter_controller esp_matter_ota_provider esp_matter_rainmaker esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_security esp_system esp_timer esp_vfs_console esp_wifi espcoredump espressif__button espressif__cbor espressif__cmake_utilities espressif__esp-serial-flasher espressif__esp_delta_ota espressif__esp_diag_data_store espressif__esp_diagnostics espressif__esp_encrypted_img espressif__esp_insights espressif__esp_rcp_update espressif__esp_secure_cert_mgr espressif__jsmn espressif__json_generator espressif__json_parser espressif__led_strip espressif__mdns espressif__rmaker_common esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 iot_button json led_driver log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table protobuf-c protocomm pthread riscv rt sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant
-- Component paths: /Users/olavt/.espressif/esp-matter/examples/common/app_bridge /Users/olavt/.espressif/esp-matter/examples/common/app_reset /Users/olavt/esp/v5.4/esp-idf/components/app_trace /Users/olavt/esp/v5.4/esp-idf/components/app_update /Users/olavt/esp/v5.4/esp-idf/components/bootloader /Users/olavt/esp/v5.4/esp-idf/components/bootloader_support /Users/olavt/esp/v5.4/esp-idf/components/bt /Users/olavt/.espressif/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip /Users/olavt/esp/v5.4/esp-idf/components/cmock /Users/olavt/esp/v5.4/esp-idf/components/console /Users/olavt/esp/v5.4/esp-idf/components/cxx /Users/olavt/.espressif/esp-matter/device_hal/device /Users/olavt/esp/v5.4/esp-idf/components/driver /Users/olavt/esp/v5.4/esp-idf/components/efuse /Users/olavt/esp/v5.4/esp-idf/components/esp-tls /Users/olavt/esp/v5.4/esp-idf/components/esp_adc /Users/olavt/esp/v5.4/esp-idf/components/esp_app_format /Users/olavt/esp/v5.4/esp-idf/components/esp_bootloader_format /Users/olavt/esp/v5.4/esp-idf/components/esp_coex /Users/olavt/esp/v5.4/esp-idf/components/esp_common /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_ana_cmpr /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_cam /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_dac /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_gpio /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_gptimer /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_i2c /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_i2s /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_isp /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_jpeg /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_ledc /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_mcpwm /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_parlio /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_pcnt /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_ppa /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_rmt /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_sdio /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_sdm /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_sdmmc /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_sdspi /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_spi /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_touch_sens /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_tsens /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_uart /Users/olavt/esp/v5.4/esp-idf/components/esp_driver_usb_serial_jtag /Users/olavt/esp/v5.4/esp-idf/components/esp_eth /Users/olavt/esp/v5.4/esp-idf/components/esp_event /Users/olavt/esp/v5.4/esp-idf/components/esp_gdbstub /Users/olavt/esp/v5.4/esp-idf/components/esp_hid /Users/olavt/esp/v5.4/esp-idf/components/esp_http_client /Users/olavt/esp/v5.4/esp-idf/components/esp_http_server /Users/olavt/esp/v5.4/esp-idf/components/esp_https_ota /Users/olavt/esp/v5.4/esp-idf/components/esp_https_server /Users/olavt/esp/v5.4/esp-idf/components/esp_hw_support /Users/olavt/esp/v5.4/esp-idf/components/esp_lcd /Users/olavt/esp/v5.4/esp-idf/components/esp_local_ctrl /Users/olavt/.espressif/esp-matter/components/esp_matter /Users/olavt/.espressif/esp-matter/components/esp_matter_bridge /Users/olavt/.espressif/esp-matter/components/esp_matter_console /Users/olavt/.espressif/esp-matter/components/esp_matter_controller /Users/olavt/.espressif/esp-matter/components/esp_matter_ota_provider /Users/olavt/.espressif/esp-matter/components/esp_matter_rainmaker /Users/olavt/esp/v5.4/esp-idf/components/esp_mm /Users/olavt/esp/v5.4/esp-idf/components/esp_netif /Users/olavt/esp/v5.4/esp-idf/components/esp_netif_stack /Users/olavt/esp/v5.4/esp-idf/components/esp_partition /Users/olavt/esp/v5.4/esp-idf/components/esp_phy /Users/olavt/esp/v5.4/esp-idf/components/esp_pm /Users/olavt/esp/v5.4/esp-idf/components/esp_psram /Users/olavt/esp/v5.4/esp-idf/components/esp_ringbuf /Users/olavt/esp/v5.4/esp-idf/components/esp_rom /Users/olavt/esp/v5.4/esp-idf/components/esp_security /Users/olavt/esp/v5.4/esp-idf/components/esp_system /Users/olavt/esp/v5.4/esp-idf/components/esp_timer /Users/olavt/esp/v5.4/esp-idf/components/esp_vfs_console /Users/olavt/esp/v5.4/esp-idf/components/esp_wifi /Users/olavt/esp/v5.4/esp-idf/components/espcoredump /Users/olavt/Source/Repos/light/managed_components/espressif__button /Users/olavt/Source/Repos/light/managed_components/espressif__cbor /Users/olavt/Source/Repos/light/managed_components/espressif__cmake_utilities /Users/olavt/Source/Repos/light/managed_components/espressif__esp-serial-flasher /Users/olavt/Source/Repos/light/managed_components/espressif__esp_delta_ota /Users/olavt/Source/Repos/light/managed_components/espressif__esp_diag_data_store /Users/olavt/Source/Repos/light/managed_components/espressif__esp_diagnostics /Users/olavt/Source/Repos/light/managed_components/espressif__esp_encrypted_img /Users/olavt/Source/Repos/light/managed_components/espressif__esp_insights /Users/olavt/Source/Repos/light/managed_components/espressif__esp_rcp_update /Users/olavt/Source/Repos/light/managed_components/espressif__esp_secure_cert_mgr /Users/olavt/Source/Repos/light/managed_components/espressif__jsmn /Users/olavt/Source/Repos/light/managed_components/espressif__json_generator /Users/olavt/Source/Repos/light/managed_components/espressif__json_parser /Users/olavt/Source/Repos/light/managed_components/espressif__led_strip /Users/olavt/Source/Repos/light/managed_components/espressif__mdns /Users/olavt/Source/Repos/light/managed_components/espressif__rmaker_common /Users/olavt/esp/v5.4/esp-idf/components/esptool_py /Users/olavt/esp/v5.4/esp-idf/components/fatfs /Users/olavt/esp/v5.4/esp-idf/components/freertos /Users/olavt/esp/v5.4/esp-idf/components/hal /Users/olavt/esp/v5.4/esp-idf/components/heap /Users/olavt/esp/v5.4/esp-idf/components/http_parser /Users/olavt/esp/v5.4/esp-idf/components/idf_test /Users/olavt/esp/v5.4/esp-idf/components/ieee802154 /Users/olavt/.espressif/esp-matter/device_hal/button_driver/iot_button /Users/olavt/esp/v5.4/esp-idf/components/json /Users/olavt/.espressif/esp-matter/device_hal/led_driver /Users/olavt/esp/v5.4/esp-idf/components/log /Users/olavt/esp/v5.4/esp-idf/components/lwip /Users/olavt/Source/Repos/light/main /Users/olavt/esp/v5.4/esp-idf/components/mbedtls /Users/olavt/esp/v5.4/esp-idf/components/mqtt /Users/olavt/esp/v5.4/esp-idf/components/newlib /Users/olavt/esp/v5.4/esp-idf/components/nvs_flash /Users/olavt/esp/v5.4/esp-idf/components/nvs_sec_provider /Users/olavt/esp/v5.4/esp-idf/components/openthread /Users/olavt/esp/v5.4/esp-idf/components/partition_table /Users/olavt/esp/v5.4/esp-idf/components/protobuf-c /Users/olavt/esp/v5.4/esp-idf/components/protocomm /Users/olavt/esp/v5.4/esp-idf/components/pthread /Users/olavt/esp/v5.4/esp-idf/components/riscv /Users/olavt/esp/v5.4/esp-idf/components/rt /Users/olavt/esp/v5.4/esp-idf/components/sdmmc /Users/olavt/esp/v5.4/esp-idf/components/soc /Users/olavt/esp/v5.4/esp-idf/components/spi_flash /Users/olavt/esp/v5.4/esp-idf/components/spiffs /Users/olavt/esp/v5.4/esp-idf/components/tcp_transport /Users/olavt/esp/v5.4/esp-idf/components/ulp /Users/olavt/esp/v5.4/esp-idf/components/unity /Users/olavt/esp/v5.4/esp-idf/components/usb /Users/olavt/esp/v5.4/esp-idf/components/vfs /Users/olavt/esp/v5.4/esp-idf/components/wear_levelling /Users/olavt/esp/v5.4/esp-idf/components/wifi_provisioning /Users/olavt/esp/v5.4/esp-idf/components/wpa_supplicant
-- Configuring done (8.5s)
-- Generating done (1.4s)
-- Build files have been written to: /Users/olavt/Source/Repos/light/build
olavt@Olavs-MacBook-Pro light %

From Build:

/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:340:5: error: 'mbedtls_ssl_conf_handshake_timeout' was not declared in this scope; did you mean 'mbedtls_ssl_conf_read_timeout'?
340 | mbedtls_ssl_conf_handshake_timeout(&mConf, 8000, 60000);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_read_timeout
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:349:9: error: 'mbedtls_ssl_conf_dtls_cookies' was not declared in this scope; did you mean 'mbedtls_ssl_conf_dn_hints'?
349 | mbedtls_ssl_conf_dtls_cookies(&mConf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &mCookieCtx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_dn_hints
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:365:16: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
365 | rval = mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'ot::Error ot::MeshCoP::SecureTransport::SetClientId(const uint8_t*, uint8_t)':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:746:16: error: 'mbedtls_ssl_set_client_transport_id' was not declared in this scope; did you mean 'mbedtls_ssl_conf_transport'?
746 | int rval = mbedtls_ssl_set_client_transport_id(&mSsl, aClientId, aLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_conf_transport
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp: In member function 'void ot::MeshCoP::SecureTransport::Process()':
/Users/olavt/esp/v5.4/esp-idf/components/openthread/openthread/src/core/meshcop/secure_transport.cpp:1126:17: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
1126 | mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[262/1685] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/net/netif.cpp.obj
ninja: build stopped: subcommand failed.

  • The terminal process "ninja" terminated with exit code: 1.

@Jerry-ESP
Copy link
Contributor

Please share your current esp-matter and esp-idf commit-id.

@olavt
Copy link
Author

olavt commented Mar 25, 2025

@Jerry-ESP

ESP-IDF:

olavt@Mac esp-idf % git log -1
commit 67c1de1eebe095d554d281952fde63c16ee2dca0 (HEAD, tag: v5.4)
Author: Xiao Xufeng xiaoxufeng@espressif.com
Date: Tue Dec 31 14:57:04 2024 +0800

change(version): Update version to 5.4.0

ESP-MATTER:

olavt@Mac esp-matter % git log -1
commit 9be61fd (HEAD -> main, origin/main, origin/HEAD)
Merge: 6dd7925 3bd14ff
Author: Shu Chen chenshu@espressif.com
Date: Thu Mar 20 12:25:12 2025 +0800

Merge branch 'revert_bsp_in_light' into 'main'

revert 41ec0e29431456dfc904ac8fa4b2be14facb52ca

See merge request app-frameworks/esp-matter!1073

@olavt olavt changed the title Change light example from WiWi to Thread? (CON-1611) Change light example from WiFi to Thread? (CON-1611) Mar 26, 2025
@Jerry-ESP
Copy link
Contributor

I have tried on my side, it seems have some issue in this idf version, can you change a idf version, latest release/v5.3, release/v5.4 , v5.2.3, v5.3.2 ... are OK

@olavt
Copy link
Author

olavt commented Mar 27, 2025

Using "release/v5.4" worked"

What's the difference between "v5.4" and "release/v5.4"? Does "release/v5.4" contain some changes that was committed after "v5.4" was released?

@Jerry-ESP
Copy link
Contributor

The release/v5.4 branch will keep update, after release v5.4 tag, it should have many commits.
But for the matter development, you can use the idf version which we suggested in the sdk if you don't have special request, the current version is v5.2.3.

For other newer idf version, as we haven't tested fully, there maybe some unknown issues.

@olavt
Copy link
Author

olavt commented Mar 27, 2025

Where can I see that the current version is v5.2.3?

Normally I would assume that the release with the highest version number (v5.4) would be the current version and that it have been fully tested.

@olavt
Copy link
Author

olavt commented Mar 27, 2025

Another related question:

I want to change the sensors example from WiFi to Thread, but there is no "sdkconfig.defaults.c6_thread" file in the sensors example. Can I copy the file from the light example and use it with the sensor example with no problems?

I tried and it failed with:

FAILED: partition_table/partition-table.bin /Users/olavt/Source/Repos/sensors/build/partition_table/partition-table.bin
cd /Users/olavt/Source/Repos/sensors/build/esp-idf/partition_table && /Users/olavt/.espressif/python_env/idf5.4_py3.9_env/bin/python /Users/olavt/esp/v5.4/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB -- /Users/olavt/Source/Repos/sensors/partitions.csv /Users/olavt/Source/Repos/sensors/build/partition_table/partition-table.bin && /Users/olavt/.espressif/tools/cmake/3.30.2/CMake.app/Contents/bin/cmake -E echo "Partition table binary generated. Contents:" && /Users/olavt/.espressif/tools/cmake/3.30.2/CMake.app/Contents/bin/cmake -E echo "" && /Users/olavt/.espressif/python_env/idf5.4_py3.9_env/bin/python /Users/olavt/esp/v5.4/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB -- /Users/olavt/Source/Repos/sensors/build/partition_table/partition-table.bin && /Users/olavt/.espressif/tools/cmake/3.30.2/CMake.app/Contents/bin/cmake -E echo ""
Partitions tables occupies 3.9MB of flash (4087808 bytes) which does not fit in configured flash size 2MB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu.
[20/2291] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_platform.cpp.obj
ninja: build stopped: subcommand failed.

  • The terminal process "ninja" terminated with exit code: 1.

I didn't see any settings related to the flash size in "sdkconfig.defaults.c6_thread".

@Jerry-ESP
Copy link
Contributor

Where can I see that the current version is v5.2.3?

Normally I would assume that the release with the highest version number (v5.4) would be the current version and that it have been fully tested.

In our esp-matter SDK, we have the specified idf version in the readme.md

@Jerry-ESP
Copy link
Contributor

Another related question:

I want to change the sensors example from WiFi to Thread, but there is no "sdkconfig.defaults.c6_thread" file in the sensors example. Can I copy the file from the light example and use it with the sensor example with no problems?

I tried and it failed with:

FAILED: partition_table/partition-table.bin /Users/olavt/Source/Repos/sensors/build/partition_table/partition-table.bin cd /Users/olavt/Source/Repos/sensors/build/esp-idf/partition_table && /Users/olavt/.espressif/python_env/idf5.4_py3.9_env/bin/python /Users/olavt/esp/v5.4/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB -- /Users/olavt/Source/Repos/sensors/partitions.csv /Users/olavt/Source/Repos/sensors/build/partition_table/partition-table.bin && /Users/olavt/.espressif/tools/cmake/3.30.2/CMake.app/Contents/bin/cmake -E echo "Partition table binary generated. Contents:" && /Users/olavt/.espressif/tools/cmake/3.30.2/CMake.app/Contents/bin/cmake -E echo "" && /Users/olavt/.espressif/python_env/idf5.4_py3.9_env/bin/python /Users/olavt/esp/v5.4/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB -- /Users/olavt/Source/Repos/sensors/build/partition_table/partition-table.bin && /Users/olavt/.espressif/tools/cmake/3.30.2/CMake.app/Contents/bin/cmake -E echo "" Partitions tables occupies 3.9MB of flash (4087808 bytes) which does not fit in configured flash size 2MB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu. [20/2291] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_platform.cpp.obj ninja: build stopped: subcommand failed.

  • The terminal process "ninja" terminated with exit code: 1.

I didn't see any settings related to the flash size in "sdkconfig.defaults.c6_thread".

From the log, the issue is that in the partition.csv, Partitions tables occupies 3.9MB of flash (4087808 bytes), but in your sdkconfig, the flash size you specified is 2M, you should change the flash size to 4MB in the sdkconfig.

Image

If it still not work, you can show me your operation step by step, and share me the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants