[Matter] Compiling chip-tool failed.

Hi all,

    I want to compile chip-tool so that I can make 5340 into a matter network. But I always fail to compile.

    environment:

    raspberry pi 4B + ubuntu-22.04.1-preinstalled-server-arm64+raspi.img.xz

    test steps:

    1. sudo apt update

    2. sudo apt upgrade -y

    3. sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
    4. sudo reboot

    5. sudo git clone https://github.com/project-chip/connectedhomeip

    6. cd connectedhomeip

    7. git submodule update --init

    8. source scripts/bootstrap.sh

output:

root@raspberrypi:/home/pi/work/connectedhomeip# source scripts/bootstrap.sh
Synchronizing submodule url for 'examples/common/QRCode/repo'
Synchronizing submodule url for 'examples/common/m5stack-tft/repo'
Synchronizing submodule url for 'third_party/boringssl/repo/src'
Synchronizing submodule url for 'third_party/bouffalolab/repo'
Synchronizing submodule url for 'third_party/bouffalolab/repo/components'
Synchronizing submodule url for 'third_party/bouffalolab/repo/customer_app'
Synchronizing submodule url for 'third_party/bouffalolab/repo/docs'
Synchronizing submodule url for 'third_party/bouffalolab/repo/tools'
Synchronizing submodule url for 'third_party/cirque/repo'
Synchronizing submodule url for 'third_party/editline/repo'
Synchronizing submodule url for 'third_party/freertos/repo'
Synchronizing submodule url for 'third_party/infineon/cyw30739_sdk/repos/30739A0'
Synchronizing submodule url for 'third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01'
Synchronizing submodule url for 'third_party/infineon/cyw30739_sdk/repos/btsdk-include'
Synchronizing submodule url for 'third_party/infineon/cyw30739_sdk/repos/btsdk-tools'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/btstack'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/clib-support'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/core-lib'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/core-make'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/freertos'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/kv-store'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/lwip'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver'
Synchronizing submodule url for 'third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core'
Synchronizing submodule url for 'third_party/jsoncpp/repo'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/cypress/libs/core-lib'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/cypress/libs/cy-mbedtls-acceleration'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/cypress/libs/mtb-pdl-cat1'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/cypress/libs/pdl/psoc6pdl'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/cypress/libs/psoc6hal'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/cypress/libs/retarget-io'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/boot/espressif/hal/esp-idf'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/ext/cddl-gen'
Synchronizing submodule url for 'third_party/mbed-mcu-boot/repo/ext/mbedtls'
Synchronizing submodule url for 'third_party/mbed-os-cypress-capsense-button/repo'
Synchronizing submodule url for 'third_party/mbed-os-posix-socket/repo'
Synchronizing submodule url for 'third_party/mbed-os/repo'
Synchronizing submodule url for 'third_party/mbedtls/repo'
Synchronizing submodule url for 'third_party/mt793x_sdk/filogic'
Synchronizing submodule url for 'third_party/mt793x_sdk/lwip'
Synchronizing submodule url for 'third_party/mt793x_sdk/mDNSResponder'
Synchronizing submodule url for 'third_party/nanopb/repo'
Synchronizing submodule url for 'third_party/nlassert/repo'
Synchronizing submodule url for 'third_party/nlfaultinjection/repo'
Synchronizing submodule url for 'third_party/nlio/repo'
Synchronizing submodule url for 'third_party/nlunit-test/repo'
Synchronizing submodule url for 'third_party/nxp/libs/mbedtls/repo'
Synchronizing submodule url for 'third_party/nxp/mw320_sdk/repo'
Synchronizing submodule url for 'third_party/open-iot-sdk/sdk'
Synchronizing submodule url for 'third_party/open-iot-sdk/sdk/developer-tools'
Synchronizing submodule url for 'third_party/open-iot-sdk/storage'
Synchronizing submodule url for 'third_party/open-iot-sdk/storage/developer-tools'
Synchronizing submodule url for 'third_party/openthread/ot-efr32'
Synchronizing submodule url for 'third_party/openthread/ot-efr32/openthread'
Synchronizing submodule url for 'third_party/openthread/ot-efr32/third_party/silabs/gecko_sdk'
Synchronizing submodule url for 'third_party/openthread/ot-ifx'
Synchronizing submodule url for 'third_party/openthread/ot-ifx/openthread'
Synchronizing submodule url for 'third_party/openthread/ot-ifx/third_party/infineon/btsdk-include'
Synchronizing submodule url for 'third_party/openthread/ot-ifx/third_party/infineon/btsdk-tools'
Synchronizing submodule url for 'third_party/openthread/ot-ifx/third_party/infineon/platform/cyw30739/30739a0'
Synchronizing submodule url for 'third_party/openthread/ot-ifx/third_party/infineon/platform/cyw30739/bsp/cyw930739m2evb-01/TARGET_CYW930739M2EVB-01'
Synchronizing submodule url for 'third_party/openthread/ot-nxp'
Synchronizing submodule url for 'third_party/openthread/ot-nxp/openthread'
Synchronizing submodule url for 'third_party/openthread/ot-qorvo'
Synchronizing submodule url for 'third_party/openthread/ot-qorvo/openthread'
Synchronizing submodule url for 'third_party/openthread/ot-qorvo/third_party/Qorvo/repo'
Synchronizing submodule url for 'third_party/openthread/repo'
Synchronizing submodule url for 'third_party/ot-br-posix/repo'
Synchronizing submodule url for 'third_party/ot-br-posix/repo/third_party/cJSON/repo'
Synchronizing submodule url for 'third_party/ot-br-posix/repo/third_party/http-parser/repo'
Synchronizing submodule url for 'third_party/ot-br-posix/repo/third_party/openthread/repo'
Synchronizing submodule url for 'third_party/pigweed/repo'
Synchronizing submodule url for 'third_party/pybind11/repo'
Synchronizing submodule url for 'third_party/qpg_sdk/repo'
Synchronizing submodule url for 'third_party/silabs/gecko_sdk'
Synchronizing submodule url for 'third_party/silabs/matter_support'
Synchronizing submodule url for 'third_party/silabs/wiseconnect-wifi-bt-sdk'
Synchronizing submodule url for 'third_party/simw-top-mini/repo'
Synchronizing submodule url for 'third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx'
Synchronizing submodule url for 'third_party/ti_simplelink_sdk/repo_cc32xx'

WELCOME TO...



▄ █ ▄ █ █
▀▀█████▀▀ ▄▀▀▀▄ ▄▀▀▀▄ ▄▀▀▀▀▄█ ▀▀█▀▀▀▀▀█▀▀ ▄▀▀▀▀▄ ▄▀▀
▀█▄ ▄█▀ █ █ █ █ █ █ █ █▄▄▄▄▄▄█ █
▀█▄ ▄█▀ █ █ █ █ █ █ █ █ █
▄██▀▀█ █▀▀██▄ █ █ █ ▀▄▄▄▄▀█ ▀▄▄ ▀▄▄ ▀▄▄▄▄▀ █
▀▀ █ █ ▀▀

BOOTSTRAP! Bootstrap may take a few minutes; please be patient.

Downloading and installing packages into local source directory:

Setting up CIPD package manager...[|]======================================================================
It looks like this version of Python does not support SSL. This is common
when using Homebrew. If using Homebrew please run the following commands.
If not using Homebrew check how your version of Python was built.

brew install openssl # Probably already installed, but good to confirm.
brew uninstall python && brew install python
======================================================================
Traceback (most recent call last):
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 857, in <module>
sys.exit(main())
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 849, in main
return EnvSetup(**vars(parse())).setup()
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 501, in setup
result = step(spin)
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 595, in cipd
cipd_client = cipd_wrapper.init(
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/wrapper.py", line 378, in init
bootstrap(client, silent, rosetta=rosetta)
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/wrapper.py", line 328, in bootstrap
tmp.write(client_bytes(rosetta))
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/wrapper.py", line 228, in client_bytes
conn = https_connect_with_proxy(CIPD_HOST)
File "/home/pi/work/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/wrapper.py", line 201, in https_connect_with_proxy
conn = httplib.HTTPSConnection(url.hostname, url.port)
File "/usr/lib/python3.10/http/client.py", line 1409, in __init__
super(HTTPSConnection, self).__init__(host, port, timeout,
File "/usr/lib/python3.10/http/client.py", line 851, in __init__
(self.host, self.port) = self._get_hostport(host, port)
File "/usr/lib/python3.10/http/client.py", line 885, in _get_hostport
i = host.rfind(':')
AttributeError: 'NoneType' object has no attribute 'rfind'
root@raspberrypi:/home/pi/work/connectedhomeip#

Parents
  • Hi,

    Instead of compiling chiptool yourself, we have a precompiled version.

    Try to download it form https://github.com/nrfconnect/sdk-connectedhomeip/releases/tag/v2.2.0

    Does this work for you?

    Regards,
    Sigurd Hellesvik

  • Hi,

        I am running nordic compiled chip-tool 2.2.0 on a raspberry pi. It keeps showing bluetooth connection failed.

    I tried 20 times, all the bluetooth connection failed.

    EDIT: A DevZone support engineer changed this post to put logs inside "Insert->Code"

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    sudo ./chip-tool-debug pairing ble-thread 1 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd8b82b14d7699d8051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f010212340410445f2b5ca6f2a93a55ce570a70efeecb0c0402a0f7f8 20202021 3840
    [1672200153.842732][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
    [1672200153.843308][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini
    [1672200153.843497][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini
    [1672200153.843626][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini
    [1672200153.843981][1772:1772] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-MMti01)
    [1672200153.844626][1772:1772] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
    [1672200153.844680][1772:1772] CHIP:DL: NVS set: chip-counters/reboot-count = 20 (0x14)
    [1672200153.845756][1772:1772] CHIP:DL: Failed to get Ethernet interface
    [1672200153.846557][1772:1772] CHIP:DL: Failed to reset Ethernet statistic counts
    [1672200153.846922][1772:1772] CHIP:DL: Got WiFi interface: wlan0
    [1672200153.848813][1772:1772] CHIP:DL: Found the primary WiFi interface:wlan0
    [1672200153.848916][1772:1772] CHIP:IN: UDP::Init bind&listen port=0
    [1672200153.849019][1772:1772] CHIP:IN: UDP::Init bound to port=38753
    [1672200153.849041][1772:1772] CHIP:IN: UDP::Init bind&listen port=0
    [1672200153.849127][1772:1772] CHIP:IN: UDP::Init bound to port=45846
    [1672200153.849146][1772:1772] CHIP:IN: BLEBase::Init - setting/overriding transport
    [1672200153.849163][1772:1772] CHIP:IN: TransportMgr initialized
    [1672200153.849197][1772:1772] CHIP:FP: Initializing FabricTable from persistent storage
    [1672200153.849350][1772:1772] CHIP:TS: Last Known Good Time: 2022-11-30T10:24:19
    [1672200153.849774][1772:1772] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x834684A513D3CD75, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reply
  • Hi,

        I am running nordic compiled chip-tool 2.2.0 on a raspberry pi. It keeps showing bluetooth connection failed.

    I tried 20 times, all the bluetooth connection failed.

    EDIT: A DevZone support engineer changed this post to put logs inside "Insert->Code"

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    sudo ./chip-tool-debug pairing ble-thread 1 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd8b82b14d7699d8051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f010212340410445f2b5ca6f2a93a55ce570a70efeecb0c0402a0f7f8 20202021 3840
    [1672200153.842732][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
    [1672200153.843308][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini
    [1672200153.843497][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini
    [1672200153.843626][1772:1772] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini
    [1672200153.843981][1772:1772] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-MMti01)
    [1672200153.844626][1772:1772] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
    [1672200153.844680][1772:1772] CHIP:DL: NVS set: chip-counters/reboot-count = 20 (0x14)
    [1672200153.845756][1772:1772] CHIP:DL: Failed to get Ethernet interface
    [1672200153.846557][1772:1772] CHIP:DL: Failed to reset Ethernet statistic counts
    [1672200153.846922][1772:1772] CHIP:DL: Got WiFi interface: wlan0
    [1672200153.848813][1772:1772] CHIP:DL: Found the primary WiFi interface:wlan0
    [1672200153.848916][1772:1772] CHIP:IN: UDP::Init bind&listen port=0
    [1672200153.849019][1772:1772] CHIP:IN: UDP::Init bound to port=38753
    [1672200153.849041][1772:1772] CHIP:IN: UDP::Init bind&listen port=0
    [1672200153.849127][1772:1772] CHIP:IN: UDP::Init bound to port=45846
    [1672200153.849146][1772:1772] CHIP:IN: BLEBase::Init - setting/overriding transport
    [1672200153.849163][1772:1772] CHIP:IN: TransportMgr initialized
    [1672200153.849197][1772:1772] CHIP:FP: Initializing FabricTable from persistent storage
    [1672200153.849350][1772:1772] CHIP:TS: Last Known Good Time: 2022-11-30T10:24:19
    [1672200153.849774][1772:1772] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x834684A513D3CD75, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Children