[Zigbee] The zigbee terminal device enters the network.
(1) The Coordinator powers on and sends a request to the Beacon request frame.
(2) When the Endpoint is powered on, the Beacon request of the Beacon frame is also sent.
(3) After Coordinator receives the Beacon request from the Endpoint, it sends a superframe containing its own IEEE address and delivers the MAC address to the Endpoint.
(4) After an Endpoint receives a superframe, it saves the MAC address of the Coordinator and sends a packet to the Coordinator requesting to join the network. Then, the MAC-layer confirmation frame of Coordinator is received.
After receiving confirmation from the MAC layer of the Coordinator, the Endpoint sends a Data request to the Coordinator to assign it a 16-bit network address.
(5) After the Coordinator receives the Data request, it is allocated a unique network short address through the NWK layer algorithm, and then sends a packet containing some short addresses to the Endpoint, this package is sent through the MAC address.
(6) When the Endpoint receives the package, configure its own short address as XXXX, and then you can use this short address to communicate with the Coordinator at the application layer. This indicates that the Endpoint has been successfully added to the network.