OpenThread shell
Overview
This sample allows testing the Thread protocol and the underlying IEEE 802.15.4 drivers for various boards using the OpenThread shell.
Building and Running
Verify that the board and chip you are targeting provide IEEE 802.15.4 support.
There are configuration files for different boards and setups in the shell directory:
prj.confGeneric config file.prj-ot-host.confThis config file enables support of OpenThread RCP host running on NXP chips over IMU interface.
Build shell application like this:
west build -b <board to use> samples/net/openthread/shell -- -DCONF_FILE=<config file to use>
Example building for Nordic’s nRF52840 DK.
west build -b nrf52840dk/nrf52840 samples/net/openthread/shell -- -DCONF_FILE="prj.conf"
Example building for NXP’s RW612 FRDM (RCP host).
west build -b frdm_rw612 samples/net/openthread/shell -- -DEXTRA_CONF_FILE="prj-ot-host.conf"
Example building for NXP’s MCXW72 FRDM (host).
west build -b frdm_mcxw72/mcxw727c samples/net/openthread/shell -- -DEXTRA_CONF_FILE="prj-ot-host.conf"
Example building for NXP’s MCXW72 FRDM (host) with vendor specific radio implementation.
west build -b frdm_mcxw72/mcxw727c samples/net/openthread/shell -- -DEXTRA_CONF_FILE="prj-ot-host.conf;prj-ot-host-no-l2-nxp-mcxw.conf"
Example building for NXP’s MCXW72 FRDM (host) with the RGB status LED enabled. The board RGB LED blinks with a colour that reflects the Thread device role: white (disabled), red (detached), yellow (child), green (router) and blue (leader).
west build -b frdm_mcxw72/mcxw727c samples/net/openthread/shell -- -DEXTRA_CONF_FILE="prj-ot-host.conf" -DCONFIG_OT_SHELL_SAMPLE_RGB_STATUS_LED=y
The LED is controlled with the rgb shell command:
uart:~$ rgb off # stop blinking
uart:~$ rgb on # start blinking
uart:~$ rgb rate 200 # blink period in milliseconds
uart:~$ rgb color 255 0 255 # fixed colour, stops following the role
uart:~$ rgb role # follow the Thread device role again
Example building for Silicon Labs EFR32MG24 4187c radio board:
west build -b xg24_rb4187c samples/net/openthread/shell -- -DCONF_FILE="prj.conf"
Sample console interaction
uart:~$ ot scan
| PAN | MAC Address | Ch | dBm | LQI |
+------+------------------+----+-----+-----+
| fe09 | abcdef1234567890 | 15 | -78 | 60 |
Done