This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2538, z-stack nodes offline, how to remove?

Other Parts Discussed in Thread: CC2538, Z-STACK

  1. hi,

    we use ZHA1.2 on cc2538 as coordinator.


    I have a question about z-stack and children nodes removal when target device is offline.

    We have configured z-stack to act as zigbee coordinator
    when we issue leave network command to a device that is paired and on everything works as expected:

    1) we send ZDO_IEEE_ADDR_REQ (0x25 0x01) with short address 0x0000 (coordinator), ReqType 0x01 to request associated devices list, StartIndex 0x00 (beginning) -> we receive the network address of the paired sensor

    2) we send ZDO_MGMT_LEAVE_REQ (0x25 0x34) with 2 bytes network address of the target device, 8 bytes 0L as DeviceAddress (IEEE), 0x01 as RemoveChildren_Rejoin (Remove children) -> we receive ZDO_MGMT_LEAVE_REQ (0x65 0x34) and status success (0x00), then we receive ZDO_MGMT_LEAVE_RSP (0x45 0xB4) with target device 2 bytes network address and status success (0x00), and finally we receive ZDO_LEAVE_IND (0x45 0xC9) from target device

    3) we issue ZDO_IEEE_ADDR_REQ again, as in point 1), device network address is no longer in list.

    On the contrary, if device is not reachable at point 2 we only receive first response ZDO_MGMT_LEAVE_REQ (0x65 0x34) and status success (0x00).
    ZDO_IEEE_ADDR_REQ request response shows that the network address is still in tables, occupied.

    Correct me if I'm wrong, but this network address counts as used up to maximum nodes defined in z-stack. (this is a possible scenario for a broken sensor that must be replaced for example, it can't be "deleted" from the z-stack devices so we can pair one sensor less than original maximum)

    The only workaround I found for this situation was to issue ZDO_MGMT_LEAVE_REQ to target network address 0x0000 (coordinator itself), then reboot z-stack and, after receiving coordinator status from z-stack, ZDO_IEEE_ADDR_REQ of point 1) returns an empty list of associated devices.
    This can be ok for a full factory default but it can't be used for a single device failure to "free" the used address.

    Is there a way to free the used network address when target device is offline? or maybe something is wrong in the commands we issue to z-stack?