Once a Thread network is created it is possible to add other devices to it such as routers, full end devices, sleepy end devices, etc. The only need for a node is to satisfy the network credentials previously established by the Leader. This authentication process is called commissioning.
There are two ways to do the commissioning:
- Out-of-band commissioning (OBC): If the network credentials and settings are known they can be configured for each node (joiner) which want to become part of the network and then proceed with the connection to the network.
- In-band-commissioning (IBC): In this mode no network credentials and settings are needed for a joiner. A node with the commissioner role is needed in the network, which deals with the authentication process. It could be the Leader itself or other router which belongs to the network (previously authenticated). Then a list of entitled nodes should be configured in the commissioner. Finally, when the commissioner receives a petition from one of these nodes to become part of the network it starts an over the air secure communication process by which the joiner node gets network credentials and authenticates automatically.
For now this article covers the In-band-commissioning mode since it is assumed that it is the most helpful and simple way to start. So let’s go to connect an end device to the network.
Set node in joiners list
To topThe EUI-64 (you could see it in the label attached to the device) and the joiner credential are required to set the node (joiner) in the admitted joiners list of the commissioner, so type:
84-04-d2-00-00-00-00-03
kinos@local:~$ show joincred
8404D20000000003
This information should be set on the commissioner joiners list to authorize this node to proceed with the commissioning. Refer to configuring a commissioner article on to how to do it.
kinos@local:~$ debug level all
Role configuration
To topOnce the node is set on the commissioner joiners list the desired role must be configured:
Thread interface up
To topStart up the Thread interface of the node and wait until the commissioning process ends.
kinos@local:~$ #1902 inf: sys kinos – user configuration stored
#1902 log: app tx mle ch=14 – discovery request
#1902 log: ipv6 tx udp da=ff02::1 dp=19788 bs=8
#1902 log: radio tx data da=ffff bs=38
#1902 log: radio rx data sa=b2-77-d6-15-0e-11-ce-51 br=86 lq=80
#1902 log: ipv6 rx udp sa=fe80::b077:d615:e11:ce51 dp=19788 br=51
#1902 log: app rx mle – discovery response
#1902 inf: sys thread – set channel 14
#1902 inf: sys thread – set pan id b293
#1904 log: app tx dtls – handshake flight 1
…
…
…
#1914 log: app tx mle – parent request
#1914 log: ipv6 tx udp da=ff02::2 dp=19788 bs=36
#1914 log: radio tx data da=ffff bs=64
#1914 log: radio rx data sa=b2-77-d6-15-0e-11-ce-51 br=111 lq=81
#1914 log: ipv6 rx udp sa=fe80::b077:d615:e11:ce51 dp=19788 br=78
#1914 log: app rx mle – parent response
#1915 log: app tx mle – child id request
#1915 log: ipv6 tx udp da=fe80::b077:d615:e11:ce51 dp=19788 bs=55
#1915 log: radio tx data da=b2-77-d6-15-0e-11-ce-51 bs=88
#1915 log: radio rx data sa=b2-77-d6-15-0e-11-ce-51 br=119 lq=81
#1915 log: radio rx data sa=b2-77-d6-15-0e-11-ce-51 br=119 lq=80
#1915 log: radio rx data sa=b2-77-d6-15-0e-11-ce-51 br=52 lq=80
#1915 log: ipv6 rx udp sa=fe80::b077:d615:e11:ce51 dp=19788 br=165
#1915 log: radio rx data sa=b2-77-d6-15-0e-11-ce-51 br=70 lq=81
#1915 log: ipv6 rx udp sa=fe80::b077:d615:e11:ce51 dp=19788 br=42
#1915 log: app rx mle – child id response
#1915 inf: sys thread – set rloc16 0001
#1915 inf: sys kinos – active data set stored
#1915 inf: sys thread – leader data update
#1915 inf: sys thread – joining done
To know when ifup process has finished it is recommended to execute the show status command repeatedly until one among joined or none responses are replied.
joined
Now the node is joined on the network, its parent is the Leader and it has the mesh short address 0x0001 (called “RLOC16”).