Based on zigbee sdk 4.1, in the sample code of light_switch, leaving the network and joining the network are completed by buttons, the code is as follows:
static void forget_network(void)
{
if (ZB_JOINED())
{
zb_bdb_reset_via_local_action(0);
}
}
static void buttons_handler(bsp_event_t evt)
{
zb_int32_t button;
zb_int32_t ret;
zb_ret_t zb_err_code;
switch(evt)
{
case BSP_EVENT_KEY_0:
break;
case BSP_EVENT_KEY_1:
ret = bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
NRF_LOG_INFO("bdb_start_top_level_commissioning >> STEERING:%d", ret);
break;
case BSP_EVENT_KEY_2:
forget_network();
return;
case BSP_EVENT_KEY_3:
return;
default:
NRF_LOG_INFO("Unhandled BSP Event received: %d", evt);
return;
}
}
Seen from the log, after pressing button3 to let the device leave the network (line 415). The coordinator prohibits the device from joining the network, but the device can still join the network by pressing button2. Through the packet capture, we can see that the Permit Join Request has timed out for 180s (line 334). But the device can still join the network (lines 418-460). The screenshot of the captured packet is as follows: Complete packet capture data:

Complete packet capture data:leave network and join network.pcapng
Under normal circumstances, after the device leaves the network, if the coordinator prohibits the device from joining the network, the device should not join the coordinator's network.
Question: 1. After the device leaves the network, there is no "Permit Join Request" broadcast in the network. Why does the device still join the network?
2. After the device leaves the network, the "Permit Join Request" is not broadcast in the network. How can the device not join the network?
