본문으로 바로가기

[ESP-IDF][Matter] [1] light 프로젝트

category ESP32 2024. 1. 2. 20:23

: ESP matter light 프로젝트를 esp32c6 보드에 build/flash 한후 Samsung SmartThings

  앱을 사용해 on/off 동작 테스트 하기.

 

목차

     

    ▶ 준비사항

      ↓ esp-matter 소스코드 github 에서 clone   하기

    git clone --recursive https://github.com/espressif/esp-idf.git

     

      ↓ github 에서 복사한 esp-matter  설치하기

    cd esp-matter
    ./install.sh

     

      ↓ 환경변수 설정

    cd esp-idf; source ./export.sh; cd ..
    cd esp-matter; source ./export.sh; cd ..

     

      ↓ 위의 과정이 정상적으로 되었으면  esp-matter/examples/light  프로젝트를 로컬의 프로젝트 폴더 아래에

        복사하기.

        : nautilus 에서 Ctrl + C , Ctrl +V 사용

     

      환경설정

      ↓ 타겟 설정 ( idf.py set-target esp32c6 )  : 아래 사진에 나온 칩만 지원하니  선택시 참고하세요.

      ↓ usb to serial 포트 설정

         : flash 명령시 이미지 다운로드할 포트 설정 저는 /dev/ttyACM0 로 사용

           export ESPPORT=/dev/ttyACM0

    ▶ menuconfig

       : 안에 내용 참고하시고 저는 수정없이 그냥 진행했습니다.

      $ idf.py menuconfig

     

    ▶ idf.py build

      : 이미지 빌딩이 노트북일 경우 좀 느려서 ubuntu PC 사용하니 30초정도 걸리네요.

    더보기
    
    $ idf.py build
    Executing action: all (aliases: build)
    Running ninja in directory /home/xxx/Project/esp32-matter/light/build
    Executing "ninja all"...
    [0/1] Re-running CMake...
    -- Component directory /home/xxx/esp/esp-matter/examples/common/blemesh_platform does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/xxx/esp/esp-matter/examples/common/external_platform does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/xxx/esp/esp-matter/examples/common/relinker does not contain a CMakeLists.txt file. No component will be added
    -- Building ESP-IDF components for target esp32c6
    NOTICE: Skipping optional dependency: espressif/cmake_utilities
    Processing 16 dependencies:
    [16/16] idf (5.2.0)
    -- Found Python3: /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python3.10 (found version "3.10.12") found components: Interpreter 
    NOTICE: Skipping optional dependency: espressif/cmake_utilities
    -- Project sdkconfig file /home/xxx/Project/esp32-matter/light/sdkconfig
    warning: default on the choice symbol SEC_CERT_DAC_PROVIDER (defined at /home/xxx/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:853, /home/xxx/esp/esp-matter/components/esp_matter/Kconfig:41) will have no effect, as defaults do not affect choice symbols
    warning: the choice symbol SEC_CERT_DAC_PROVIDER (defined at /home/xxx/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:853, /home/xxx/esp/esp-matter/components/esp_matter/Kconfig:41) is defined with a prompt outside the choice
    Loading defaults file /home/xxx/Project/esp32-matter/light/sdkconfig.defaults...
    Loading defaults file /home/xxx/Project/esp32-matter/light/sdkconfig.defaults.esp32c6...
    /home/xxx/Project/esp32-matter/light/sdkconfig.defaults.esp32c6:10 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE was replaced with CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE
    -- App "light" version: 1.0
    -- Adding linker script /home/xxx/Project/esp32-matter/light/build/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_system/ld/esp32c6/sections.ld.in
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
    
    ~~중략 ~~
    -- Adding linker script /home/xxx/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
    ESP Insights Project commit: 15608ad
    -- 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_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_rainmaker esp_matter_thread_br esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__button espressif__cbor espressif__esp-serial-flasher 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 sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant
    -- Component paths: /home/xxx/esp/esp-matter/examples/common/app_bridge /home/xxx/esp/esp-matter/examples/common/app_reset /home/xxx/esp/esp-idf/components/app_trace /home/xxx/esp/esp-idf/components/app_update /home/xxx/esp/esp-idf/components/bootloader /home/xxx/esp/esp-idf/components/bootloader_support /home/xxx/esp/esp-idf/components/bt /home/xxx/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip /home/xxx/esp/esp-idf/components/cmock /home/xxx/esp/esp-idf/components/console /home/xxx/esp/esp-idf/components/cxx /home/xxx/esp/esp-matter/device_hal/device /home/xxx/esp/esp-idf/components/driver /home/xxx/esp/esp-idf/components/efuse /home/xxx/esp/esp-idf/components/esp-tls /home/xxx/esp/esp-idf/components/esp_adc /home/xxx/esp/esp-idf/components/esp_app_format /home/xxx/esp/esp-idf/components/esp_bootloader_format /home/xxx/esp/esp-idf/components/esp_coex /home/xxx/esp/esp-idf/components/esp_common /home/xxx/esp/esp-idf/components/esp_eth /home/xxx/esp/esp-idf/components/esp_event /home/xxx/esp/esp-idf/components/esp_gdbstub /home/xxx/esp/esp-idf/components/esp_hid /home/xxx/esp/esp-idf/components/esp_http_client /home/xxx/esp/esp-idf/components/esp_http_server /home/xxx/esp/esp-idf/components/esp_https_ota /home/xxx/esp/esp-idf/components/esp_https_server /home/xxx/esp/esp-idf/components/esp_hw_support /home/xxx/esp/esp-idf/components/esp_lcd /home/xxx/esp/esp-idf/components/esp_local_ctrl /home/xxx/esp/esp-matter/components/esp_matter /home/xxx/esp/esp-matter/components/esp_matter_bridge /home/xxx/esp/esp-matter/components/esp_matter_console /home/xxx/esp/esp-matter/components/esp_matter_controller /home/xxx/esp/esp-matter/components/esp_matter_rainmaker /home/xxx/esp/esp-matter/components/esp_matter_thread_br /home/xxx/esp/esp-idf/components/esp_mm /home/xxx/esp/esp-idf/components/esp_netif /home/xxx/esp/esp-idf/components/esp_netif_stack /home/xxx/esp/esp-idf/components/esp_partition /home/xxx/esp/esp-idf/components/esp_phy /home/xxx/esp/esp-idf/components/esp_pm /home/xxx/esp/esp-idf/components/esp_psram /home/xxx/esp/esp-idf/components/esp_ringbuf /home/xxx/esp/esp-idf/components/esp_rom /home/xxx/esp/esp-idf/components/esp_system /home/xxx/esp/esp-idf/components/esp_timer /home/xxx/esp/esp-idf/components/esp_wifi /home/xxx/esp/esp-idf/components/espcoredump /home/xxx/Project/esp32-matter/light/managed_components/espressif__button /home/xxx/Project/esp32-matter/light/managed_components/espressif__cbor /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp-serial-flasher /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp_diag_data_store /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp_diagnostics /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp_encrypted_img /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp_insights /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp_rcp_update /home/xxx/Project/esp32-matter/light/managed_components/espressif__esp_secure_cert_mgr /home/xxx/Project/esp32-matter/light/managed_components/espressif__jsmn /home/xxx/Project/esp32-matter/light/managed_components/espressif__json_generator /home/xxx/Project/esp32-matter/light/managed_components/espressif__json_parser /home/xxx/Project/esp32-matter/light/managed_components/espressif__led_strip /home/xxx/Project/esp32-matter/light/managed_components/espressif__mdns /home/xxx/Project/esp32-matter/light/managed_components/espressif__rmaker_common /home/xxx/esp/esp-idf/components/esptool_py /home/xxx/esp/esp-idf/components/fatfs /home/xxx/esp/esp-idf/components/freertos /home/xxx/esp/esp-idf/components/hal /home/xxx/esp/esp-idf/components/heap /home/xxx/esp/esp-idf/components/http_parser /home/xxx/esp/esp-idf/components/idf_test /home/xxx/esp/esp-idf/components/ieee802154 /home/xxx/esp/esp-matter/device_hal/button_driver/iot_button /home/xxx/esp/esp-idf/components/json /home/xxx/esp/esp-matter/device_hal/led_driver /home/xxx/esp/esp-idf/components/log /home/xxx/esp/esp-idf/components/lwip /home/xxx/Project/esp32-matter/light/main /home/xxx/esp/esp-idf/components/mbedtls /home/xxx/esp/esp-idf/components/mqtt /home/xxx/esp/esp-idf/components/newlib /home/xxx/esp/esp-idf/components/nvs_flash /home/xxx/esp/esp-idf/components/nvs_sec_provider /home/xxx/esp/esp-idf/components/openthread /home/xxx/esp/esp-idf/components/partition_table /home/xxx/esp/esp-idf/components/protobuf-c /home/xxx/esp/esp-idf/components/protocomm /home/xxx/esp/esp-idf/components/pthread /home/xxx/esp/esp-idf/components/riscv /home/xxx/esp/esp-idf/components/sdmmc /home/xxx/esp/esp-idf/components/soc /home/xxx/esp/esp-idf/components/spi_flash /home/xxx/esp/esp-idf/components/spiffs /home/xxx/esp/esp-idf/components/tcp_transport /home/xxx/esp/esp-idf/components/ulp /home/xxx/esp/esp-idf/components/unity /home/xxx/esp/esp-idf/components/usb /home/xxx/esp/esp-idf/components/vfs /home/xxx/esp/esp-idf/components/wear_levelling /home/xxx/esp/esp-idf/components/wifi_provisioning /home/xxx/esp/esp-idf/components/wpa_supplicant
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/xxx/Project/esp32-matter/light/build
    [5/1261] Generating ../../partition_table/partition-table.bin
    Partition table binary generated. Contents:
    *******************************************************************************
    # ESP-IDF Partition Table
    # Name, Type, SubType, Offset, Size, Flags
    esp_secure_cert,63,6,0xd000,8K,encrypted
    nvs,data,nvs,0x10000,48K,
    nvs_keys,data,nvs_keys,0x1c000,4K,encrypted
    otadata,data,ota,0x1d000,8K,
    phy_init,data,phy,0x1f000,4K,
    ota_0,app,ota_0,0x20000,1920K,
    ota_1,app,ota_1,0x200000,1920K,
    fctry,data,nvs,0x3e0000,24K,
    *******************************************************************************
    [412/1261] Performing configure step for 'bootloader'
    
    ~~중략 ~~
    -- Adding linker script /home/xxx/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
    -- Bootloader project name: "bootloader" version: 1
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
    
    ~~중략 ~~
    -- Adding linker script /home/xxx/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.rom.ld
    -- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table riscv soc spi_flash
    -- Component paths: /home/xxx/esp/esp-idf/components/bootloader /home/xxx/esp/esp-idf/components/bootloader_support /home/xxx/esp/esp-idf/components/efuse /home/xxx/esp/esp-idf/components/esp_app_format /home/xxx/esp/esp-idf/components/esp_bootloader_format /home/xxx/esp/esp-idf/components/esp_common /home/xxx/esp/esp-idf/components/esp_hw_support /home/xxx/esp/esp-idf/components/esp_rom /home/xxx/esp/esp-idf/components/esp_system /home/xxx/esp/esp-idf/components/esptool_py /home/xxx/esp/esp-idf/components/freertos /home/xxx/esp/esp-idf/components/hal /home/xxx/esp/esp-idf/components/log /home/xxx/esp/esp-idf/components/bootloader/subproject/main /home/xxx/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /home/xxx/esp/esp-idf/components/newlib /home/xxx/esp/esp-idf/components/partition_table /home/xxx/esp/esp-idf/components/riscv /home/xxx/esp/esp-idf/components/soc /home/xxx/esp/esp-idf/components/spi_flash
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/xxx/Project/esp32-matter/light/build/bootloader
    [107/108] Generating binary image from built executable
    esptool.py v4.7.0
    Creating esp32c6 image...
    Merged 3 ELF sections
    Successfully created esp32c6 image.
    Generated /home/xxx/Project/esp32-matter/light/build/bootloader/bootloader.bin
    [108/108] cd /home/xxx/Project/esp32.../light/build/bootloader/bootloader.bin
    Bootloader binary size 0x5430 bytes. 0x6bd0 bytes (56%) free.
    [664/1261] Performing configure step for 'chip_gn'
    Done. Made 286 targets from 223 files in 186ms
    
    ~~ 중략 ~~
    [1257/1261] Generating ld/sections.ld
    warning: default on the choice symbol SEC_CERT_DAC_PROVIDER (defined at /home/xxx/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:853, /home/xxx/esp/esp-matter/components/esp_matter/Kconfig:41) will have no effect, as defaults do not affect choice symbols
    warning: the choice symbol SEC_CERT_DAC_PROVIDER (defined at /home/xxx/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:853, /home/xxx/esp/esp-matter/components/esp_matter/Kconfig:41) is defined with a prompt outside the choice
    [1260/1261] Generating binary image from built executable
    esptool.py v4.7.0
    Creating esp32c6 image...
    Merged 3 ELF sections
    Successfully created esp32c6 image.
    Generated /home/xxx/Project/esp32-matter/light/build/light.bin
    [1261/1261] cd /home/xxx/Project/esp...ect/esp32-matter/light/build/light.bin
    light.bin binary size 0x1891f0 bytes. Smallest app partition is 0x1e0000 bytes. 0x56e10 bytes (18%) free.
    
    Project build complete. To flash, run:
     idf.py flash
    or
     idf.py -p /dev/ttyACM0 flash
    or
     idf.py -p PORT flash
    or
     python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset -p /dev/ttyACM0 write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x0 build/bootloader/bootloader.bin 0xc000 build/partition_table/partition-table.bin 0x1d000 build/ota_data_initial.bin 0x20000 build/light.bin
    or from the "/home/xxx/Project/esp32-matter/light/build" directory
     python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset -p /dev/ttyACM0 write_flash "@flash_args"

     

    ▶빌드 로그

      : build/log 디렉토리 아래에 2개의 로그파일이 생성이 됩니다.

    ESP32C6 장치로 이미지 배포 (deploy)

       :  bootloader , application, partition 등의 이미지를 장치에 업로드합니다.

    더보기

     

    $ idf.py flash
    Executing action: flash
    Running ninja in directory /home/xxx/Project/esp32-matter/light/build
    Executing "ninja flash"...
    [1/10] Performing build step for 'chip_gn'
    ninja: no work to do.
    [1/1] cd /home/xxx/Project/esp32-mat.../light/build/bootloader/bootloader.bin
    Bootloader binary size 0x5430 bytes. 0x6bd0 bytes (56%) free.
    [3/4] cd /home/xxx/Project/esp32-mat...ect/esp32-matter/light/build/light.bin
    light.bin binary size 0x1891f0 bytes. Smallest app partition is 0x1e0000 bytes. 0x56e10 bytes (18%) free.
    [3/4] cd /home/xxx/esp/esp-idf/compo...nents/esptool_py/run_serial_tool.cmake
    esptool.py --chip esp32c6 -p /dev/ttyACM0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 bootloader/bootloader.bin 0x20000 light.bin 0xc000 partition_table/partition-table.bin 0x1d000 ota_data_initial.bin
    esptool.py v4.7.0
    Serial port /dev/ttyACM0
    Connecting....
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00000000 to 0x00005fff...
    Flash will be erased from 0x00020000 to 0x001a9fff...
    Flash will be erased from 0x0000c000 to 0x0000cfff...
    Flash will be erased from 0x0001d000 to 0x0001efff...
    Compressed 21552 bytes to 12992...
    Writing at 0x00000000... (100 %)
    Wrote 21552 bytes (12992 compressed) at 0x00000000 in 0.3 seconds (effective 545.5 kbit/s)...
    Hash of data verified.
    Compressed 1610224 bytes to 978468...
    Writing at 0x001a3108... (100 %)
    Wrote 1610224 bytes (978468 compressed) at 0x00020000 in 11.6 seconds (effective 1107.6 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 181...
    Writing at 0x0000c000... (100 %)
    Wrote 3072 bytes (181 compressed) at 0x0000c000 in 0.0 seconds (effective 671.0 kbit/s)...
    Hash of data verified.
    Compressed 8192 bytes to 31...
    Writing at 0x0001d000... (100 %)
    Wrote 8192 bytes (31 compressed) at 0x0001d000 in 0.1 seconds (effective 770.7 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    Done

     

     

    monitor

    : 장치의 시리얼 출력 내용을 터미널창에서 직접 보고 싶을때 사용합니다.

      저는 다른 시리얼 터미널 프로그램을 이용해 항상 켜고 쓰고 있어서 잘 사용하지 않습니다.

      $ idf.py monitor 

    $ idf.py monitor
    Executing action: monitor
    Running idf_monitor in directory /home/xxx/Project/esp32-matter/light
    Executing "/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
               /home/xxx/esp/esp-idf/tools/idf_monitor.py 
                   -p /dev/ttyACM0 -b 115200 --toolchain-prefix riscv32-esp-elf- 
                   --target esp32c6 --revision 0 --decode-panic 
                   backtrace /home/xxx/Project/esp32-matter/light/build/light.elf 
                   -m '/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python' 
                      '/home/xxx/esp/esp-idf/tools/idf.py'"...
    --- esp-idf-monitor 1.3.4 on /dev/ttyACM0 115200 ---
    --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    ESP-ROM:esp32c6-20220919
    Build:Sep 19 2022
    rst:0x15 (USB_UART_HPSYS),boot:0xc (SPI_FAST_FLASH_BOOT)
    Saved PC:0x40809ab8
    0x40809ab8: rv_utils_wait_for_intr at /home/xxx/esp/esp-idf/components/riscv/include/riscv/rv_utils.h:52
     (inlined by) esp_cpu_wait_for_intr at /home/xxx/esp/esp-idf/components/esp_hw_support/cpu.c:143
    
    SPIWP:0xee
    mode:DIO, clock div:2
    load:0x40875720,len:0x1804
    load:0x4086c410,len:0xde0
    load:0x4086e610,len:0x2df8
    entry 0x4086c41a
    I (23) boot: ESP-IDF v5.2-beta1-263-ge49823f10c 2nd stage bootloader
    I (23) boot: compile time Jan  3 2024 09:41:08
    I (24) boot: chip revision: v0.0
    I (27) boot.esp32c6: SPI Speed      : 80MHz
    I (32) boot.esp32c6: SPI Mode       : DIO
    I (37) boot.esp32c6: SPI Flash Size : 4MB
    I (42) boot: Enabling RNG early entropy source...
    I (47) boot: Partition Table:
    I (51) boot: ## Label            Usage          Type ST Offset   Length
    I (58) boot:  0 esp_secure_cert  unknown          3f 06 0000d000 00002000
    I (65) boot:  1 nvs              WiFi data        01 02 00010000 0000c000
    I (73) boot:  2 nvs_keys         NVS keys         01 04 0001c000 00001000
    I (80) boot:  3 otadata          OTA data         01 00 0001d000 00002000
    I (88) boot:  4 phy_init         RF data          01 01 0001f000 00001000
    I (95) boot:  5 ota_0            OTA app          00 10 00020000 001e0000
    I (103) boot:  6 ota_1            OTA app          00 11 00200000 001e0000
    I (110) boot:  7 fctry            WiFi data        01 02 003e0000 00006000
    I (118) boot: End of partition table
    I (122) esp_image: segment 0: paddr=00020020 vaddr=42130020 size=3d6a0h (251552) map
    I (182) esp_image: segment 1: paddr=0005d6c8 vaddr=40800000 size=02950h ( 10576) load
    I (185) esp_image: segment 2: paddr=00060020 vaddr=42000020 size=12e648h (1238600) map
    I (439) esp_image: segment 3: paddr=0018e670 vaddr=40802950 size=1ab4ch (109388) load
    I (465) esp_image: segment 4: paddr=001a91c4 vaddr=50000000 size=00004h (     4) load
    I (472) boot: Loaded app from partition at offset 0x20000
    I (472) boot: Disabling RNG early entropy source...
    I (485) cpu_start: Unicore app
    W (494) clk: esp_perip_clk_init() has not been implemented yet
    I (501) cpu_start: Pro cpu start user code
    I (501) cpu_start: cpu freq: 160000000 Hz
    I (501) cpu_start: Application information:
    I (504) cpu_start: Project name:     light
    I (508) cpu_start: App version:      1.0
    I (513) cpu_start: Compile time:     Jan  3 2024 09:41:02
    I (519) cpu_start: ELF file SHA256:  ea3870f4f...
    I (525) cpu_start: ESP-IDF:          v5.2-beta1-263-ge49823f10c
    I (531) cpu_start: Min chip rev:     v0.0
    I (536) cpu_start: Max chip rev:     v0.99 
    I (541) cpu_start: Chip rev:         v0.0
    I (545) heap_init: Initializing. RAM available for dynamic allocation:
    I (553) heap_init: At 4082F950 len 0004CCC0 (307 KiB): RAM
    I (559) heap_init: At 4087C610 len 00002F54 (11 KiB): RAM
    I (565) heap_init: At 50000004 len 00003FE4 (15 KiB): RTCRAM
    I (572) spi_flash: detected chip: generic
    I (576) spi_flash: flash io: dio
    W (581) rmt(legacy): legacy driver is deprecated, please migrate to `driver/rmt_tx.h` and/or `driver/rmt_rx.h`
    I (591) sleep: Configure to isolate all GPIO pins in sleep state
    I (597) sleep: Enable automatic switching of GPIO sleep configuration
    I (604) coexist: coex firmware version: e41c5cb
    I (610) coexist: coexist rom version 5b8dcfa
    I (615) main_task: Started on CPU0
    I (615) main_task: Calling app_main()
    I (625) led_driver_ws2812: Initializing light driver
    I (625) gpio: GPIO[9]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
    I (635) app_main: Light created with endpoint_id 1
    I (645) pp: pp rom version: 5b8dcfa
    I (645) net80211: net80211 rom version: 5b8dcfa
    I (655) wifi:wifi driver task: 4083c6b8, prio:23, stack:6656, core=0
    I (655) wifi:wifi firmware version: a75e5ea
    I (655) wifi:wifi certification version: v7.0
    I (665) wifi:config NVS flash: enabled
    I (665) wifi:config nano formating: disabled
    I (665) wifi:mac_version:HAL_MAC_ESP32AX_761,ut_version:N
    I (675) wifi:Init data frame dynamic rx buffer num: 32
    I (675) wifi:Init static rx mgmt buffer num: 5
    I (685) wifi:Init management short buffer num: 32
    I (685) wifi:Init dynamic tx buffer num: 32
    I (695) wifi:Init static tx FG buffer num: 2
    I (695) wifi:Init static rx buffer size: 1700
    I (695) wifi:Init static rx buffer num: 10
    I (705) wifi:Init dynamic rx buffer num: 32
    I (705) wifi_init: rx ba win: 6
    I (715) wifi_init: tcpip mbox: 32
    I (715) wifi_init: udp mbox: 6
    I (715) wifi_init: tcp mbox: 6
    I (725) wifi_init: tcp tx win: 5760
    I (725) wifi_init: tcp rx win: 5760
    I (735) wifi_init: tcp mss: 1440
    I (735) wifi_init: WiFi IRAM OP enabled
    I (735) wifi_init: WiFi RX IRAM OP enabled
    I (765) chip[DL]: NVS set: chip-counters/reboot-count = 2 (0x2)
    I (765) chip[DL]: Real time clock set to 946684800 (0100/00/01 00:00:00 UTC)
    I (765) BLE_INIT: Using main XTAL as clock source
    controller lib commit: [9a23742]
    I (775) phy_init: phy_version 230,c773401,Oct 30 2023,15:07:16
    I (815) phy: libbtbb version: 7243671, Oct 30 2023, 15:07:30
    I (825) NimBLE: GAP procedure initiated: stop advertising.
    
    I (825) NimBLE: Failed to restore IRKs from store; status=8
    
    I (825) CHIP[DL]: BLE host-controller synced
    I (1335) chip[DL]: Starting ESP WiFi layer
    W (1335) wifi:(bf)761:0x600a7cac:0x01b4b4b0
    W (1335) wifi:(agc)0x600a7128:0xd2117800, min.avgNF:0xce->0xd2(dB), RCalCount:0x117, min.RRssi:0x800(-128.00)
    W (1335) wifi:(TB)WDEV_PWR_TB_MCS0:19
    W (1345) wifi:(TB)WDEV_PWR_TB_MCS1:19
    W (1345) wifi:(TB)WDEV_PWR_TB_MCS2:19
    W (1345) wifi:(TB)WDEV_PWR_TB_MCS3:19
    W (1355) wifi:(TB)WDEV_PWR_TB_MCS4:19
    W (1355) wifi:(TB)WDEV_PWR_TB_MCS5:19
    W (1355) wifi:(TB)WDEV_PWR_TB_MCS6:18
    W (1365) wifi:(TB)WDEV_PWR_TB_MCS7:18
    W (1365) wifi:(TB)WDEV_PWR_TB_MCS8:17
    W (1365) wifi:(TB)WDEV_PWR_TB_MCS9:15
    W (1375) wifi:(TB)WDEV_PWR_TB_MCS10:15
    W (1375) wifi:(TB)WDEV_PWR_TB_MCS11:15
    I (1375) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).
    
    I (1385) wifi:mode : sta (40:4c:ca:43:15:18)
    I (1385) wifi:enable tsf
    W (1395) wifi:Haven't to connect to a suitable AP now!
    I (1395) chip[DL]: Done driving station state, nothing else to do...
    W (1405) wifi:Haven't to connect to a suitable AP now!
    I (1405) chip[DL]: Done driving station state, nothing else to do...
    I (1415) chip[SVR]: Initializing subscription resumption storage...
    I (1425) chip[SVR]: Server initializing...
    I (1425) chip[TS]: Last Known Good Time: 2023-10-14T01:16:48
    I (1435) chip[DMG]: AccessControl: initializing
    I (1435) chip[DMG]: Examples::AccessControlDelegate::Init
    I (1445) chip[DMG]: AccessControl: setting
    I (1445) chip[DMG]: DefaultAclStorage: initializing
    I (1455) chip[DMG]: DefaultAclStorage: 0 entries loaded
    I (1475) chip[ZCL]: Using ZAP configuration...
    I (1475) esp_matter_cluster: Cluster plugin init common callback
    I (1475) chip[DMG]: AccessControlCluster: initializing
    I (1485) chip[ZCL]: 0x42135f78ep 0 clus 0x0000_0030 attr 0x0000_0000 not supported
    I (1495) chip[ZCL]: Initiating Admin Commissioning cluster.
    I (1495) chip[DIS]: Updating services using commissioning mode 1
    I (1505) chip[DIS]: CHIP minimal mDNS started advertising.
    I (1505) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
    I (1525) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: EAA53EBEF8EB4DA5.
    I (1535) chip[DIS]: mDNS service published: _matterc._udp
    I (1535) chip[IN]: CASE Server enabling CASE session setups
    I (1545) chip[SVR]: Joining Multicast groups
    I (1545) chip[SVR]: Server Listening...
    I (1555) esp_matter_core: Dynamic endpoint 0 added
    I (1555) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000003's Attribute 0x00000001 is 0 **********
    I (1565) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000004's Attribute 0x00000000 is 128 **********
    I (1585) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000004's Attribute 0x0000FFFC is <invalid type: 0> **********
    I (1595) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x0000FFFC is 1 **********
    I (1605) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00004003 is null **********
    I (1615) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
    I (1625) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
    I (1645) chip[ZCL]: Endpoint 1 On/off already set to new value
    I (1645) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000002 is 1 **********
    I (1655) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000003 is 254 **********
    I (1675) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x0000FFFC is 3 **********
    I (1685) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000000 is 64 **********
    I (1695) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00004000 is 64 **********
    I (1705) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000000 is 64 **********
    I (1715) led_driver_ws2812: led set r:0, g:0, b:0
    I (1725) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000300's Attribute 0x00004010 is null **********
    I (1735) esp_matter_core: Dynamic endpoint 1 added
    I (1745) chip[DL]: WIFI_EVENT_STA_START
    W (1745) wifi:Haven't to connect to a suitable AP now!
    I (1755) chip[DL]: Done driving station state, nothing else to do...
    I (1755) chip[DL]: Configuring CHIPoBLE advertising (interval 25 ms, connectable)
    I (1765) NimBLE: GAP procedure initiated: advertise; 
    I (1775) NimBLE: disc_mode=2
    I (1775) NimBLE:  adv_channel_map=0 own_addr_type=1 adv_filter_policy=0 adv_itvl_min=40 adv_itvl_max=40
    I (1785) NimBLE: 
    
    I (1785) chip[DL]: CHIPoBLE advertising started
    I (1795) app_main: Commissioning window opened
    I (1795) led_driver_ws2812: led set r:0, g:0, b:0
    I (1805) led_driver_ws2812: led set r:0, g:0, b:0
    I (1805) led_driver_ws2812: led set r:63, g:51, b:40
    > I (2325) main_task: Returned from app_main()
    I (31505) chip[DL]: Configuring CHIPoBLE advertising (interval 500 ms, connectable)
    I (31505) chip[DL]: Device already advertising, stop active advertisement and restart
    I (31515) NimBLE: GAP procedure initiated: stop advertising.
    
    I (31515) NimBLE: GAP procedure initiated: advertise; 
    I (31525) NimBLE: disc_mode=2
    I (31525) NimBLE:  adv_channel_map=0 own_addr_type=1 adv_filter_policy=0 adv_itvl_min=800 adv_itvl_max=800
    I (31535) NimBLE:

      > 처음 부팅시 기본적으로  Bluetooth advertising 이 자동으로 시작이 되고 SmartThings 앱에서 검색이 됩니다.

     

    ▶ Samsung SmartThings Commissioning 

      : SmartThings Station 이 있고 , SmartThings 앱이 설치되어 있다는 가정하게 설명입니다.

    →  기기 추가 하기

    →  주변검색 선택 , QR 코드 스캔을 바로해도 동작합니다.

     

      Matter device (3840)  이 연결 가능한 장치로 나오네요.  선택해 줍니다.

       : 아래사진의 3840 은 10진수값으로  discriminator 입니다.

     

     

    → QR Code 스캔 하라고 나오네요.

     

     

        아래의 QR code 스캔해 줍니다.  (아래링크의 2.2.1.1 commissioning 항목참조)

       > https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AY.K9042C00KA0648G00

    QR 코드값 >       MT:Y.K9042C00KA0648G00

     

     

      Matter 인증기기가 아니라고 나오고 "계속" 버튼을 눌러줍니다.

     

     

    → 기존에 연결된 WIFI 선택화면이 나오네요.

        : esp light 장치와 커미션닝 완료시 아래에서 선택한 WIFI 로 ​연결을 시도합니다.

           chip_tool  사용 pairing 명령 (참고용입니다.)

          ./chip-tool pairing ble-wifi ..... < SSID> <passcode> .....

     

     

     

     

     

    ▶ commissioning log

        →  smartThings 앱 사용 commissioning 시 나오는 시리얼 로그 첨부합니다.

    commissioning_log.txt
    0.08MB

     

        → chip-tool 사용 commissioning 시 나오는 로그

    commissioning_log_3.txt
    0.03MB

     

     

    ▶ light 장비  turn on LED 로그

       : Samsung SmartThings 앱 사용

         앱화면은 생략합니다. (전원버튼 클릭)

    I (101065) chip[EM]: >>> [E:9360r S:19104 M:198256622] (S) Msg RX from 1:5D63ACC59E0B41DD [406B] --- Type 0001:08 (IM:InvokeCommandRequest)
    I (101075) esp_matter_command: Received command 0x00000001 for endpoint 0x0001's cluster 0x00000006
    I (101075) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 0 **********
    I (101085) chip[ZCL]: Toggle ep1 on/off from state 0 to 1
    I (101095) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x0000FFFC is 1 **********
    I (101105) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00004001 is 0 **********
    I (101125) chip[ZCL]: On Command - OffWaitTime :  0
    I (101125) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00004002 is 0 **********
    I (101135) chip[ZCL]: On/Toggle Command - Stop Timer
    I (101145) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00004000 is 1 **********
    I (101155) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
    I (101165) led_driver_ws2812: led set r:63, g:51, b:40
    I (101175) chip[EM]: <<< [E:9360r S:19104 M:189080430 (Ack:198256622)] (S) Msg TX to 1:5D63ACC59E0B41DD [406B] [UDP:192.168.19.41%st1:38353] --- Type 0001:09 (IM:InvokeCommandResponse)
    I (101185) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
    I (101205) chip[EM]: <<< [E:55895i S:19104 M:189080431] (S) Msg TX to 1:5D63ACC59E0B41DD [406B] [UDP:192.168.19.41%st1:38353] --- Type 0001:05 (IM:ReportData)
    I (101215) chip[EM]: >>> [E:9360r S:19104 M:198256623 (Ack:189080430)] (S) Msg RX from 1:5D63ACC59E0B41DD [406B] --- Type 0000:10 (SecureChannel:StandaloneAck)
    I (101225) chip[EM]: >>> [E:55895i S:19104 M:198256624 (Ack:189080431)] (S) Msg RX from 1:5D63ACC59E0B41DD [406B] --- Type 0001:01 (IM:StatusResponse)
    I (101245) chip[IM]: Received status response, status is 0x00
    I (101255) chip[EM]: <<< [E:55895i S:19104 M:189080432 (Ack:198256624)] (S) Msg TX to 1:5D63ACC59E0B41DD [406B] [UDP:192.168.19.41%st1:38353] --- Type 0000:10 (SecureChannel:StandaloneAck)

     

     

    ▶ turn off led 로그

        : Samsung SmartThings 앱 사용

         앱화면은 생략합니다. (전원버튼 클릭)

    I (25725) chip[EM]: >>> [E:9359r S:19104 M:198256617] (S) Msg RX from 1:5D63ACC59E0B41DD [406B] --- Type 0001:08 (IM:InvokeCommandRequest)
    I (25735) esp_matter_command: Received command 0x00000000 for endpoint 0x0001's cluster 0x00000006
    I (25745) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
    I (25755) chip[ZCL]: Toggle ep1 on/off from state 1 to 0
    I (25765) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 0 **********
    I (25775) led_driver_ws2812: led set r:0, g:0, b:0
    I (25785) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x0000FFFC is 1 **********
    I (25795) chip[ZCL]: Off completed. reset OnTime to  0
    I (25795) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00004001 is 0 **********
    I (25805) chip[EM]: <<< [E:9359r S:19104 M:189080423 (Ack:198256617)] (S) Msg TX to 1:5D63ACC59E0B41DD [406B] [UDP:192.168.19.41%st1:38353] --- Type 0001:09 (IM:InvokeCommandResponse)
    I (25825) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 0 **********
    I (25835) chip[EM]: <<< [E:55892i S:19104 M:189080424] (S) Msg TX to 1:5D63ACC59E0B41DD [406B] [UDP:192.168.19.41%st1:38353] --- Type 0001:05 (IM:ReportData)
    I (26035) chip[EM]: >>> [E:9359r S:19104 M:198256618 (Ack:189080423)] (S) Msg RX from 1:5D63ACC59E0B41DD [406B] --- Type 0000:10 (SecureChannel:StandaloneAck)
    I (26055) chip[EM]: >>> [E:55892i S:19104 M:198256619 (Ack:189080424)] (S) Msg RX from 1:5D63ACC59E0B41DD [406B] --- Type 0001:01 (IM:StatusResponse)
    I (26065) chip[IM]: Received status response, status is 0x00
    I (26065) chip[EM]: <<< [E:55892i S:19104 M:189080425 (Ack:198256619)] (S) Msg TX to 1:5D63ACC59E0B41DD [406B] [UDP:192.168.19.41%st1:38353] --- Type 0000:10 (SecureChannel:StandaloneAck)

     

     

    < 기타 >

      matter 명령 예제

      → 장치의 시리얼을 통한 WIFI  연결하기

       : matter esp wifi connect SSID PSK

    > matter esp wifi connect NETGEAR pwd12345
    
    W (1412152) wifi:(itwt)itwt_stop_process!
    I (1412152) wifi:flush txq
    I (1412152) wifi:stop sw txq
    I (1412152) wifi:lmac stop hw txq
    W (1412172) wifi:(bf)761:0x600a7cac:0x01b4b4b0
    W (1412172) wifi:(agc)0x600a7128:0xd20fca24, min.avgNF:0xce->0xd2(dB), RCalCount:0xfc, min.RRssi:0xa24(-93.75)
    W (1412182) wifi:(TB)WDEV_PWR_TB_MCS0:19
    W (1412182) wifi:(TB)WDEV_PWR_TB_MCS1:19
    W (1412182) wifi:(TB)WDEV_PWR_TB_MCS2:19
    W (1412192) wifi:(TB)WDEV_PWR_TB_MCS3:19
    W (1412192) wifi:(TB)WDEV_PWR_TB_MCS4:19
    W (1412192) wifi:(TB)WDEV_PWR_TB_MCS5:19
    W (1412202) wifi:(TB)WDEV_PWR_TB_MCS6:18
    W (1412202) wifi:(TB)WDEV_PWR_TB_MCS7:18
    W (1412202) wifi:(TB)WDEV_PWR_TB_MCS8:17
    W (1412202) wifi:(TB)WDEV_PWR_TB_MCS9:15
    W (1412212) wifi:(TB)WDEV_PWR_TB_MCS10:15
    W (1412212) wifi:(TB)WDEV_PWR_TB_MCS11:15
    I (1412212) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).
    
    I (1412222) wifi:mode : sta (40:4c:ca:43:b1:d0)
    I (1412222) wifi:enable tsf
    Done
    I (1412242) chip[DL]: WIFI_EVENT_STA_STOP
    W (1412242) wifi:Haven't to connect to a suitable AP now!
    I (1412242) chip[DL]: Attempting to connect WiFi station interface
    E (1412252) wifi:sta is connecting, return error
                                                                                                                                       E (1412252) chip[DL]: esp_wifi_connect() failed: ESP_ERR_WIFI_CONN
    I (1412262) chip[DL]: WIFI_EVENT_STA_START
    W (1412262) wifi:Haven't to connect to a suitable AP now!
    I (1412282) chip[DL]: Attempting to connect WiFi station interface
    E (1412282) wifi:sta is connecting, return error
    E (1412282) chip[DL]: esp_wifi_connect() failed: ESP_ERR_WIFI_CONN
    > I (1412552) wifi:new:<3,0>, old:<1,0>, ap:<255,255>, sta:<3,0>, prof:1
    I (1412552) wifi:(connect)dot11_authmode:0x3, pairwise_cipher:0x3, group_cipher:0x3
    I (1412902) wifi:state: init -> auth (b0)
    I (1412912) wifi:state: auth -> assoc (0)
    I (1412922) wifi:state: assoc -> run (10)
    I (1412922) wifi:(trc)phytype:CBW20-SGI, snr:39, maxRate:144, highestRateIdx:0
    I (1412922) wifi:(trc)rate(S-MCS7, schedIdx:0), ampdu(rate:S-MCS7, schedIdx(0, stop:8)), snr:39, ampduState:wait operational
    I (1412932) wifi:ifidx:0, rssi:-57, nf:-96, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:1440, he:0
    I (1412952) wifi:max ampdu length exponent:2(32767 bytes), mmss:7(16 us)
    I (1412972) wifi:(extcap)mbssid:0, enhanced_mbssid_advertise:0, complete_nontxbssid_profiles:0, twt_responder: 0
    I (1412972) wifi:connected with NETGEAR, aid = 4, channel 3, BW20, bssid = 70:5d:cc:e7:65:26
    I (1412982) wifi:cipher(pairwise:0x3, group:0x3), pmf:0, security:WPA2-PSK, phy:11bgn, rssi:-57
    I (1413042) wifi:pm start, type: 1, itwt_start:0
    
    I (1413042) wifi:pm start, type:1, aid:0x4, trans-BSSID:70:5d:cc:e7:65:26, BSSID[5]:0x26, mbssid(max-indicator:0, index:0), he:0
    I (1413052) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
    I (1413062) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 10, mt_time: 10000
    I (1413062) wifi:[ADDBA]TX addba request, tid:0, dialogtoken:1, bufsize:64, A-MSDU:0(not supported), policy:1(IMR), ssn:0(0x0)
    I (1413072) wifi:[ADDBA]TX addba request, tid:7, dialogtoken:2, bufsize:64, A-MSDU:0(not supported), policy:1(IMR), ssn:0(0x20)
    I (1413082) wifi:[ADDBA]TX addba request, tid:5, dialogtoken:3, bufsize:64, A-MSDU:0(not supported), policy:1(IMR), ssn:0(0x0)
    I (1413102) wifi:AP's beacon interval = 102400 us, DTIM period = 3
    I (1413112) wifi:[ADDBA]RX addba response, status:0, tid:0/tb:1(0xa1), bufsize:16, batimeout:0, txa_wnd:16
    I (1413112) wifi:[ADDBA]RX addba response, status:0, tid:7/tb:1(0xa1), bufsize:16, batimeout:0, txa_wnd:16
    I (1413122) wifi:[ADDBA]RX addba response, status:0, tid:5/tb:1(0xa1), bufsize:16, batimeout:0, txa_wnd:16
    I (1413102) chip[DL]: WIFI_EVENT_STA_CONNECTED
    I (1413132) chip[DL]: WiFi station state change: NotConnected -> Connected
    I (1413142) chip[DL]: WiFi station interface connected
    I (1413152) chip[ZCL]: WiFiDiagnosticsDelegate: OnConnectionStatusChanged
    I (1413162) chip[DL]: Done driving station state, nothing else to do...
    I (1413172) chip[DL]: Updating advertising data
    W (1413612) wifi:<ba-add>idx:0, ifx:0, tid:0, TAHI:0x1002665, TALO:0xe7cc5d70, (ssn:2, win:64, cur_ssn:2), CONF:0xc0000005
    I (1414602) esp_netif_handlers: sta ip: 192.168.19.10, mask: 255.255.255.0, gw: 192.168.19.1
    I (1414602) chip[DL]: IP_EVENT_STA_GOT_IP
    I (1414612) chip[DL]: IPv4 address changed on WiFi station interface: 192.168.19.10/255.255.255.0 gateway 192.168.19.1
    I (1414622) chip[DL]: IPv4 Internet connectivity ESTABLISHED
    I (1414622) app_main: Interface IP Address changed
    I (1414632) chip[DIS]: Updating services using commissioning mode 0
    I (1414632) chip[DIS]: CHIP minimal mDNS started advertising.
    I (1414652) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=0
    I (1414652) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: 8EBEFA92EEA52A8A.
    E (1414662) chip[DIS]: Failed to advertise records: 46
    I (1414662) chip[DIS]: mDNS service published: _matterc._udp
    I (1414672) chip[DL]: IP_EVENT_GOT_IP6
    I (1414682) chip[DL]: IPv6 addr available. Ready on WIFI_STA_DEF interface: fe80:0000:0000:0000:424c:caff:fe43:b1d0
    I (1414692) app_main: Interface IP Address changed
    I (1414702) chip[DIS]: Updating services using commissioning mode 0
    I (1414702) chip[DIS]: CHIP minimal mDNS started advertising.
    I (1414722) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=0
    I (1414722) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: 8EBEFA92EEA52A8A.
    I (1414732) chip[DIS]: mDNS service published: _matterc._udp
    I (1414742) chip[SVR]: Server initialization complete
    I (1414742) chip[DIS]: Updating services using commissioning mode 0
    I (1414762) chip[DIS]: CHIP minimal mDNS started advertising.
    I (1414762) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=0
    I (1414772) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: 8EBEFA92EEA52A8A.
    I (1414782) chip[DIS]: mDNS service published: _matterc._udp
    I (1414792) chip[SWU]: Stopping the watchdog timer
    I (1414792) chip[SWU]: Starting the periodic query timer, timeout: 86400 seconds
    I (1414802) chip[IM]: No subscriptions to resume
    I (1414812) esp_matter_attribute: ********** R : Endpoint 0x0000's Cluster 0x0000002A's Attribute 0x00000002 is 0 **********
    I (1414822) esp_matter_attribute: ********** W : Endpoint 0x0000's Cluster 0x0000002A's Attribute 0x00000002 is 1 **********
    I (1414832) esp_matter_attribute: ********** R : Endpoint 0x0000's Cluster 0x0000002A's Attribute 0x00000003 is 0 **********
    I (1414842) esp_matter_attribute: ********** W : Endpoint 0x0000's Cluster 0x0000002A's Attribute 0x00000003 is null **********
    I (1418012) ROUTE_HOOK: Received RIO
    I (1418022) ROUTE_HOOK: prefix FD17:7253:A729:1:: lifetime 1800
    W (1418022) wifi:<ba-add>idx:1, ifx:0, tid:6, TAHI:0x1002665, TALO:0xe7cc5d70, (ssn:0, win:64, cur_ssn:0), CONF:0xc0006005

     

      factory reset

       : 장치 초기화시 사용하세요.

       > matter device factoryreset

    > matter device factoryreset
    
    Performing factory reset ...
    Done
    I (808022) chip[DL]: Performing factory reset
    > I (808052) wifi:state: run -> init (0)
    I (808052) wifi:ifidx:0, rssi:-56, nf:-90, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:1440, he:0
    I (808062) wifi:max ampdu length exponent:2(32767 bytes), mmss:7(16 us)
    I (808062) wifi:pm stop, total sleep time: 576453709 us / 806202209 us
    
    I (808072) wifi:<ba-del>idx:0, tid:0
    I (808072) wifi:<ba-del>idx:1, tid:6
    I (808072) wifi:new:<3,0>, old:<3,0>, ap:<255,255>, sta:<3,0>, prof:1
    I (808122) wifi:flush txq
    I (808122) wifi:stop sw txq
    I (808122) wifi:lmac stop hw txq
    I (808192) chip[DL]: System restarting

     

      →  matter esp attribute get

         :  특정 Endpoint > Cluster > Attribute 의 값 읽기

    > matter esp attribute get 0x1 0x6 0x0
    
    I (831289) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 0 **********
    I (831289) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 0 **********
    Done
    >
    
    > matter esp attribute get 0x1 0x5 0x0
    
    I (837899) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000005's Attribute 0x00000000 is 0 **********
    I (837909) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000005's Attribute 0x00000000 is 0 **********
    Done
    > matter esp attribute get 0x1 0x4 0x0
    
    I (847079) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000004's Attribute 0x00000000 is 128 **********
    I (847079) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000004's Attribute 0x00000000 is 128 **********
    Done
    >

     

      파티션 정보

       : light 프로젝트의 파티션 정보 읽기위해 light 프로젝트 안에서 다음 명령실행

        $ idf.py partition-table

    # ESP-IDF Partition Table
    # Name, Type, SubType, Offset, Size, Flags
    esp_secure_cert,63,6,0xd000,8K,encrypted
    nvs,data,nvs,0x10000,48K,
    nvs_keys,data,nvs_keys,0x1c000,4K,encrypted
    otadata,data,ota,0x1d000,8K,
    phy_init,data,phy,0x1f000,4K,
    ota_0,app,ota_0,0x20000,1920K,
    ota_1,app,ota_1,0x200000,1920K,
    fctry,data,nvs,0x3e0000,24K,

     

     

    그럼 오늘도 수고하세요.

    반응형