This is a practical guide for forming a Thread Network for the first time. It includes an overview of the forming process - more detail can be found in the Thread Specification.
The very first device on a Thread Network must ‘Form’ it, before any other nodes are able to join and participate in it. The formation of a network includes selecting a network name and channel, setting the admin password (aka Network Passphrase or Commissioning Credential) generating a network key (aka master key), extended PANID and PANID. This then becomes the active operational dataset of the network, and is shared between every node participating in the network.
The form procedure only needs to be followed once for any given network. After the network is formed, additional nodes can join the network, and be provided with the active operational dataset by following the commissioning process. If the network parameters need to be changed, then a commissioner can be used in order to reconfigure the active dataset.
In the Cascoda SDK, there are two possible mechanisms to form a network, depending on if the forming device is a Border Router or not.
After forming a network, new devices can be added to it by following the commissioning process.
pskc
tool included on the Border Router, under System - Custom Commands
. The documentation for using this tool lives on the OpenThread website.To form a network using the OpenThread CLI, follow the following steps with a serial-adapter instance connected to an ot-cli instance, or with an ot-cli-posix-ftd running locally.
>factoryreset
> ifconfig up
Done
> dataset init new
Done
> dataset
Active Timestamp: 1
Channel: 16
Channel Mask: 07fff800
Ext PAN ID: 4c72b0a2d8ecd611
Mesh Local Prefix: fd34:74cd:ae4:1c3e/64
Master Key: 11ba68ecc258e4db3af612c2c73967ca
Network Name: OpenThread-7045
PAN ID: 0x7045
PSKc: 9bf4d7f0de6fa8d4b604d1a541f4894e
Security Policy: 0, onrcb
Done
> dataset help
help
active
activetimestamp
channel
channelmask
clear
commit
delay
extpanid
init
masterkey
meshlocalprefix
mgmtgetcommand
mgmtsetcommand
networkname
panid
pending
pendingtimestamp
pskc
securitypolicy
Done
> dataset networkname cascoda-net
Done
> dataset
Active Timestamp: 1
Channel: 16
Channel Mask: 07fff800
Ext PAN ID: 4c72b0a2d8ecd611
Mesh Local Prefix: fd34:74cd:ae4:1c3e/64
Master Key: 11ba68ecc258e4db3af612c2c73967ca
Network Name: cascoda-net
PAN ID: 0x7045
PSKc: 9bf4d7f0de6fa8d4b604d1a541f4894e
Security Policy: 0, onrcb
Done
> dataset commit active
Done
> thread start
Done
> state
leader
Done