Hi DevZone Team,
Is there a way to stop the ZigBee network steering after a device has successfully joined instead of waiting for the timeout to expire?
Thanks
Hi DevZone Team,
Is there a way to stop the ZigBee network steering after a device has successfully joined instead of waiting for the timeout to expire?
Thanks
Hi,
since I was looking at a related case, I came up with the following solution:
static void network_close_global_cb(zb_bufid_t buf)
{
NRF_LOG_INFO("Network closed");
if (buf)
{
zb_buf_free(buf);
}
}
static void network_close_global(zb_bufid_t buf)
{
zb_zdo_mgmt_permit_joining_req_param_t * p_req;
NRF_LOG_INFO("Zigbee network closed locally...");
p_req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_permit_joining_req_param_t);
p_req->dest_addr = ZB_NWK_BROADCAST_ROUTER_COORDINATOR;
p_req->permit_duration = 0;
p_req->tc_significance = 1;
zb_zdo_mgmt_permit_joining_req(buf, network_close_global_cb);
}
void network_close(zb_bufid_t buf)
{
zb_zdo_mgmt_permit_joining_req_param_t * p_req = NULL;
if (!ZB_JOINED())
{
return;
}
if (buf == 0)
{
(void)zb_buf_get_out_delayed(network_close);
return;
}
NRF_LOG_INFO("Close Zigbee network...");
p_req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_permit_joining_req_param_t);
p_req->dest_addr = ZB_PIBCACHE_NETWORK_ADDRESS();
p_req->permit_duration = 0;
p_req->tc_significance = 1;
zb_zdo_mgmt_permit_joining_req(buf, network_close_global);
}
It is true, that the BDB forces you to open the network for 180 seconds, but it does not prevent you from issuing permit join request, specified in Zigbee PRO specification .
Kind Regards,
Tomchy
Hi,
since I was looking at a related case, I came up with the following solution:
static void network_close_global_cb(zb_bufid_t buf)
{
NRF_LOG_INFO("Network closed");
if (buf)
{
zb_buf_free(buf);
}
}
static void network_close_global(zb_bufid_t buf)
{
zb_zdo_mgmt_permit_joining_req_param_t * p_req;
NRF_LOG_INFO("Zigbee network closed locally...");
p_req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_permit_joining_req_param_t);
p_req->dest_addr = ZB_NWK_BROADCAST_ROUTER_COORDINATOR;
p_req->permit_duration = 0;
p_req->tc_significance = 1;
zb_zdo_mgmt_permit_joining_req(buf, network_close_global_cb);
}
void network_close(zb_bufid_t buf)
{
zb_zdo_mgmt_permit_joining_req_param_t * p_req = NULL;
if (!ZB_JOINED())
{
return;
}
if (buf == 0)
{
(void)zb_buf_get_out_delayed(network_close);
return;
}
NRF_LOG_INFO("Close Zigbee network...");
p_req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_permit_joining_req_param_t);
p_req->dest_addr = ZB_PIBCACHE_NETWORK_ADDRESS();
p_req->permit_duration = 0;
p_req->tc_significance = 1;
zb_zdo_mgmt_permit_joining_req(buf, network_close_global);
}
It is true, that the BDB forces you to open the network for 180 seconds, but it does not prevent you from issuing permit join request, specified in Zigbee PRO specification .
Kind Regards,
Tomchy
Hi.
I am developing a zigbee coordinator. To open and close the network I also use the zb_zdo_mgmt_permit_joining_req request.
When I open the network and the callback function is called (zdo_mgmt_permit_joining_req_cb) I evaluate the answer from the buffer using the struct zb_zdo_mgmt_permit_joining_resp_s.
It seems as if the status in zb_zdo_mgmt_permit_joining_resp_s always contains the duration time I transmitted with the request. If that correct?
Is there a possibility to read the current joining state of the network?
Best regards,
Lutz