OpenThread Border Router (OTBR) includes a variety of tools and scripts that can be used for testing purposes.
pskc generates a Pre-Shared Key for the Commissioner (PSKc). The
PSKc is used to authenticate an external Thread Commissioner to a Thread
network. Build and install OTBR to use this tool.
pskc is located at
The PSKc is generated from the following parameters:
- Commissioner Credential
- Thread Network Extended PAN ID
- Thread Network Name
pskc <commissioner-credential> <extpanid> <network-name>
./pskc J01NME 1234AAAA1234BBBB MyOTBRNetwork
See External Thread
Commissioning for how to
use this tool with
Steering data generator
steering-data uses a Bloom filter to generate a hash of the set of Joiners
intended for commissioning. During commissioning, the Joiner only looks for
networks advertising steering data that includes the Joiner itself. Build and
install OTBR to use this tool.
steering-data is located at
The steering data is generated from the following parameters:
- Joiner ID (EUI-64)
- Byte length of steering data (optional, default is 16)
steering-data [length] <joiner-id>
Use multiple Joiner IDs to include them all in the steering data:
./steering-data 0000b57fffe15d68 0000c57fffe15d68
length parameter to change the byte length of the resulting steering
./steering-data 8 0000b57fffe15d68
otbr-commissioner to commission a Thread device from the command line.
This tool is used in MeshCop (Mesh Commissioning Protocol) tests during
continuous integration. Build and install OTBR to use this tool.
otbr-commissioner is located at
To successfully commissioner a Thread device with
suggest using the following parameters at a minimum:
--help for a full list of parameters.
./otbr-commissioner --network-name MyOTBRNetwork --network-password J01NME \
--xpanid 1234AAAA1234BBBB --joiner-eui64 0000b57fffe15d68 \
--joiner-pskd J01NU5 --agent-host 192.168.1.2 --agent-port 49191
For a shell script example, see the
meshcop test script.
libcoap is an open-source C implementation of CoAP. By default, OTBR builds libcoap with examples and documentation disabled.
To build the examples:
- Remove the
--disable-examplesflag from the root
- Rebuild OTBR:
After building, libcoap examples are located at
coap-client example to test the IPv6 connectivity of your Thread
network featuring OTBR.
coap-client can send non-secure CoAP requests to
Thread devices on the Thread network.
When sending CoAP requests to a Thread network, use the device's Global IPv6 address. This address uses the On-Mesh Prefix specified during formation of the Thread network.
For example, if a resource of
/some/path has been setup on a Thread node with
a Global IPv6 address of
send a non-secure GET request to that node:
coap-client -m get coap://[fd11:22::287f:87ca:f4b3:498a]/some/path
The libcoap library also includes the following examples:
coap-server—Server-side CoAP features
coap-rd—Implements a CoAP Resource Directory
For more information on the libcoap library, see libcoap.net.
standalone_ipv6 script to test IPv6 functionality if your test or
development environment does not have a full IPv6 infrastructure available (for
example, if your network is not connected to an upstream IPv6 provider).
This script installs extra features on the platform running OTBR to enable the device to serve IPv6 addresses.
This script is located at