### Setup Repository and Install Dependencies Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/openthread/tools/harness-automation/doc/quickstart.rst Clones the OpenThread repository, navigates to the harness automation directory, and installs required Python libraries using pip. ```bash git clone https://github.com/openthread/openthread.git cd openthread/tools/harness-automation pip install -r requirements.txt ``` -------------------------------- ### Build and Install wpantund Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/wpantund/INSTALL.md Compiles the wpantund project after configuration and installs the binaries and associated files to the system. Supports parallel building with the -j flag. ```bash # To speed up build, use -jN where N is number of cores, e.g., make -j4 # For debugging, add --enable-debug to configure: ./configure --sysconfdir=/etc --enable-debug sudo make install ``` -------------------------------- ### OpenThread CoAP CLI Quick Start Example Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/openthread/src/cli/README_COAP.md Demonstrates forming a network and performing basic CoAP operations like starting the server, registering a resource, and performing GET and PUT requests between two nodes. ```bash > coap start Done > coap resource test-resource Done ``` ```bash > coap start Done > coap get fdde:ad00:beef:0:d395:daee:a75:3964 test-resource Done coap response from [fdde:ad00:beef:0:2780:9423:166c:1aac] with payload: 30 > coap put fdde:ad00:beef:0:2780:9423:166c:1aac test-resource con payload Done coap response from [fdde:ad00:beef:0:2780:9423:166c:1aac] ``` ```bash coap request from [fdde:ad00:beef:0:b3:e3f6:2dcc:4b79] GET coap response sent coap request from [fdde:ad00:beef:0:b3:e3f6:2dcc:4b79] PUT with payload: 7061796c6f6164 coap response sent ``` -------------------------------- ### Starting AP Application Example Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/app/bluetooth/example_host/bt_host_esl_ap/readme/readme.md Example command to start the AP application on Windows, specifying a COM port for an NCP connection. Assumes Python is installed and in the PATH. ```bash python .\app.py COM4 ``` -------------------------------- ### Setup Configuration File Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/openthread/tools/harness-automation/doc/quickstart.rst Copies the sample settings file and renames it for customization. ```bash cp autothreadharness/settings_sample.py autothreadharness/settings.py ``` -------------------------------- ### Install Dependencies on Arch Linux Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/ot-br-posix/third_party/Simple-web-server/repo/README.md Installs the Boost libraries required for compiling and running the examples on Arch Linux. ```shell sudo pacman -S boost ``` -------------------------------- ### Start wpantund Daemon Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/wpantund/INSTALL.md Launches the wpantund daemon to connect to a Network Co-Processor (NCP). Requires specifying the serial port and optionally the WPAN interface name. ```bash # Connect to NCP on /dev/ttyUSB0 sudo /usr/local/sbin/wpantund -o NCPSocketName /dev/ttyUSB0 # Connect to wpan0 on /dev/ttyUSB0 and wpan1 on /dev/ttyUSB1 sudo /usr/local/sbin/wpantund -o NCPSocketName /dev/ttyUSB0 -o WPANInterfaceName wpan0 sudo /usr/local/sbin/wpantund -o NCPSocketName /dev/ttyUSB1 -o WPANInterfaceName wpan1 ``` -------------------------------- ### CMake Packaging Example Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/ot-br-posix/third_party/cJSON/repo/README.md Example of building and installing cJSON for distribution packaging, setting specific CMake options and using DESTDIR for staging. ```Shell mkdir build cd build cmake .. -DENABLE_CJSON_UTILS=On -DENABLE_CJSON_TEST=Off -DCMAKE_INSTALL_PREFIX=/usr make make DESTDIR=$pkgdir install ``` -------------------------------- ### Install and Setup wpantund Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/wpantund/README.md These commands demonstrate the installation and setup process for wpantund, including bootstrapping and configuring the daemon. It assumes an existing OpenThread Border Router (OTBR) agent setup. ```shell cd protocol/openthread/ sudo INFRA_IF_NAME=eth0 ./script/bootstrap_wpantund sudo INFRA_IF_NAME=eth0 ./script/setup_wpantund ``` -------------------------------- ### Get Help Information Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/openthread/tools/harness-automation/doc/quickstart.rst Displays help information and available command-line arguments for the harness script. ```bash ./start.sh -h ``` ```windows-cmd start.bat -h ``` -------------------------------- ### Bootstrap and Configure wpantund Build Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/wpantund/INSTALL.md Prepares the wpantund source code for building by running the bootstrap script and then configuring the build process. Requires libtool, autoconf, and autoconf-archive. ```bash git checkout origin/master sudo apt-get install libtool autoconf autoconf-archive ./bootstrap.sh ./configure --sysconfdir=/etc make ``` -------------------------------- ### wpanctl Utility Commands Source: https://github.com/siliconlabs/simplicity_sdk/blob/sisdk-2024.12/util/third_party/wpantund/INSTALL.md Demonstrates common commands for interacting with the wpantund daemon using the wpanctl utility. Includes leaving a network, setting properties, forming a network, and checking status. ```APIDOC wpanctl: Description: Command-line utility to control the wpantund daemon. Usage: sudo wpanctl [options] [command] Commands: leave Description: Leaves the current WPAN. Example: wpanctl:wpan0> leave setprop Description: Sets a property for the current interface. Parameters: property: The name of the property to set (e.g., NetworkKey). value: The value for the property. Use --data for raw byte strings. Example: wpanctl:wpan0> setprop NetworkKey --data 000102030405060708090a0b0c0d0e0f form [-c ] Description: Forms a new WPAN network. Parameters: network_name: The name of the network to form. -c channel: The channel to use (optional). Example: wpanctl:wpan0> form "MyCoolNetwork" -c 26 permit-join