Setting the network security key
The coordinator selects the network security key for the network using the Network Encryption Key (NK) parameter (write-only). If NK = 0 (default), the coordinator will selects a random network key. Otherwise, you set NK to a non-zero value, it uses this value as network security key.
NK is only supported on the coordinator. Routers and end devices with security enabled (EE = 1) acquire the network key when they join a network. They receive the network key encrypted with the link key if they share a preconfigured link key with the coordinator.
Note In Zigbee, if EE and EO are set to 0x01, then the device sends the network key in the clear (unencrypted) with the link key at association time. This may be a useful setting in development environments, but we discourage it for product deployment for security reasons.