Example: Join a secure network using a preconfigured link key
The following examples show you how join an existing network that has security enabled and the preconfigured link key configured on the network is known. Using this example, it is easy to deploy a secure network, because each device is preconfigured to join the network. An installer only needs to be concerned with opening the join window for new devices.
Configure a joining XBee 3 Zigbee RF Module with the following parameters:
- EE = 1
The joining node must have the same encryption settings as the network it will be joining.
- EO = 2
- If joining a centralized trust center, EO bit 1 must be set so the joining device is aware that a link key exchange is needed.
- If joining a distributed trust center, clear EO bit 1.
- KY = KY from trust center
Because the KY value is known, it should be preconfigured on the joining device. Provided the KY values match, it will be able to obtain the network key and join.
- NJ < 0xFF
Consider the join time that is configured on joining devices. If the device successfully joins the network as a router (SM = 0), it immediately opens the join window for NJ seconds, effectively refreshing the window. If you do not wish to reopen the join window in this manner, set NJ = 0 on all joining devices.
To join the device to the network, write the previous configuration to flash with a WR command, and bring it within RF range of the network.
To open the join window, press the commissioning button twice on a network router or the trust center. If the pushbutton is not available, you can issue a CB2 command.
Joining devices continuously attempt to join a network (unless explicitly told not to via a DJ = 0 command). However, if you want to have the module immediately attempt to join, press the commissioning button once, or issue a CB1 command on the joining node.