This guide covers the basic build and configuration of OpenThread Commissioner (OT Commissioner). Upon completion of this procedure, you will have an OT Commissioner CLI executable and a static Commissioner library.
Set up the Commissioner
- Clone the OT Commissioner repository:
git clone https://github.com/openthread/ot-commissioner
- Install dependencies:
- Build OT Commisioner:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -GNinja ..
- Optional. Run unit tests:
Install the Commissioner
Install OT Commissioner in the
/usr/local directory. This will install:
- OT Commissioner library and header files
- OT Commissioner CLI executable binary
- Default configuration files and credentials
- Scripts to run OT Commissioner CLI as daemon
To change the installation directory, set
Verify the installation by checking the help menu:
The OT Commissioner CLI supports both Thread 1.2 Commercial Commissioning Mode (CCM) and Thread 1.1 commissioning (Non-CCM). To connect to different Thread networks, a JSON configuration file is needed to start OT Commissioner CLI:
ccm-config.json— The default configuration file for CCM Thread Network.
non-ccm-config.json— The default configuration file for Non-CCM Thread Network.
By default, these configuration files are installed in
To connect to a CCM Thread network, update these fields in
||Unique identifier within the Enterprise Domain.|
||The private key file in PEM format.|
||The certificate file in PEM format.|
||The trust anchor file in PEM format.|
These key and certificate files are used to establish secure sessions between the Commissioner and Border Agent.
To connect to a Non-CCM Thread network, update this field in
||The Pre-Shared Key used to establish secure session between the Commissioner and Border Agent.|
Commission a joiner
To use OT Commissioner to commission a joiner, see External Thread Commissioning.