This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Remove a dead/disconnected device from ZigBee controller.

Hi 
I have this code that works like a charm when the device is connected and I want it to leave the network.
But if the device is dead or disconnected and I want to  remove it from the controller it fails and I am
looking for the best way to handle this any thoughts ? 
    zb_buf_t *buf = ZB_BUF_FROM_REF(param);
    zb_zdo_mgmt_leave_param_t *req = NULL;
    zb_uint8_t tsn;
    LOG("send_leave 0x%04hX\n", dst_addr);
    req = ZB_GET_BUF_PARAM(buf, zb_zdo_mgmt_leave_param_t);
    ZB_MEMSET(req->device_address, 0, sizeof(zb_ieee_addr_t));
    req->remove_children = ZB_FALSE;
    req->rejoin = ZB_FALSE;
    req->dst_addr = dst_addr;
    tsn = zdo_mgmt_leave_req(param, leave_callback);
Parents Reply
  • Hi,

    My apologies for the long delay before my reply in this case.

    In current version of the Zigbee stack there is no API to perform removal of device that cannot be communicated. As a workaround, please call zdo_mgmt_leave_req when device to be removed arrives the network (in ZB_ZDO_SIGNAL_DEVICE_ANNCE signal). This is not an optimal solution since DEVICE_ANNCE is a broadcast message and could be missed by the coordinator, but in lack of other API this is currently the best solution.

    Best regards,
    Jørgen

Children
No Data
Related