The Thread CLI example demonstrates a minimal OpenThread application that enables user interaction through built-in command line interface (CLI). You can use it as a base for more sophisticated applications.
This example has similar functionality as the OpenThread CLI Example, but has been adopted to use the nRF5 SDK.
The following table lists the available CLI example configurations.
Configuration | Description | Stack variant used | Available for |
---|---|---|---|
FTD UART | Uses the UART communication and SEGGER J-Link as a UART-USB converter. | Thread FTD | PCA10056, PCA10100 |
FTD USB | Uses the USB peripheral that is available in the nRF52 devices and communicates as a native USB CDC device. | Thread FTD | PCA10056, PCA10059 (with bootloader, see nRF52840 Dongle), PCA10100 |
MTD UART | Uses the UART communication and SEGGER J-Link as a UART-USB converter. | Thread MTD | PCA10056, PCA10068 with nRF52811, PCA10100 |
MTD USB | Uses the USB peripheral that is available in the nRF52 devices and communicates as a native USB CDC device. | Thread MTD | PCA10056, PCA10059 (with bootloader, see nRF52840 Dongle), PCA10100 |
The CLI example requires for the host PC to be able to connect to it. Some PC USB drivers might be needed. The driver installation depends on the host operating system.
Operating System | Installation procedure |
---|---|
Windows XP or 7 | If the native USB CDC connectivity is used, manually install the nordic_cdc_acm.inf driver.The file that is located at <InstallFolder>\examples\usb_drivers |
Windows 8 and later | Hosts pick the correct usbser.sys driver file automatically. |
Most of modern Linux and MacOS | Hosts handle the driver installation automatically. |
The CLI application starts in disconnected state and remains so until appropriate commands are issued by the user. These commands can be issued by using a serial line connection with a terminal application like PuTTy.
You can find the source code and the makefile in the following folder: <InstallFolder>\examples\thread\cli
.
This example uses LED assignments as described in Thread BSP LED and button reference for the following LEDs:
To test the example:
For a complete list of CLI commands, run the help
command. For complete CLI documentation, refer to OpenThread CLI Reference.