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.

Making a device leave the network via ZNP

Other Parts Discussed in Thread: Z-STACK

Hello, 

im encountering a very strange behavior when i try to make a ZigBee HA Lamp (Hue) leave my coordinator.

I set up the coordinator as described in the ZNP-Interface Specification and setting the join permit flag for the first time. The Lamp joins the network properly, making a device announce. I can switch the light on and off and do various other things with it. My problem is that i want to make the lamp leave my network. I issue a 

ZDO_MGMT_LEAVE_REQ (0x2534)

and getting a correct response from my lamp that it left the network. It also disappears from the list of associated devices which i access through 

 UTIL_GET_DEVICE_INFO (0x2700)

My problem is now, once i enable the join permit again, the lamp somehow secretly joins my network again. It does not announce itself to the coordinator, nor is it in the list i mentioned before (get_device_info). But i can still switch the lamp on and off like i could do when it joined normally and ask for its IEEE address for instance. But i cannot issue a 

ZDO_MGMT_LEAVE_REQ (0x2534)

to this lamp again. this time it sends me 

Status: 194 (0xC2)

So my question is how do i remove this lamp completely without this stealth join? It might be ok if it joined again correctly with a device announce and so on, but this sneaky joining of the network isn't normal, isn't it?

thanks!

  • Hi Thomas,

    Are you using the Phillips HUE light? I tried to recreate your scenario while capturing a sniffer trace, and it seems that the HUE (at least the version that I tested with) does not support the management leave command at all - it returns 0x84 - Not Supported (support for this command is optional according to the ZigBee spec).

    After sending the management leave command, the hue is still in the associated device list, as expected, since the leave request failed.

    I'm using the Z-Stack home 1.2.0, available here: http://www.ti.com/tool/z-stack

    Which version of Z-Stack are you using? Please make sure to use the latest release, if you are not already using it.

    Regards,

    OD

  • Hi,

    thanks a lot for even taking the time for recreating my problem! I really appreciate the help here in this forums! But after some hours more trying i got it even figured out! Now the Phillips Hue acts like i expected it to work.

    The problem was on my side, i did misunderstand the description for the leave command in the interface specification. But i think it could made a little more clear thou. The problem was the last byte of the command. The specification states that the "RemoveChildren_Rejoin" Attribute is set bitwise,...since the Z-Tool does not provide the option to enter things there bitwise (only hex or dec) i made a mistake to enter in the field a 0x01 rather than a 0x02. After long thinking and drawing some bits it finally came to me. With the 0x01 which i put there at first the rejoin flag was set of course. My Bad. Now the lamp leaves the network and turns its light red, to indicate a reset of its network settings. Just like it should.

    I don't know if its just me, but maybe the explanation in the interface specification could be more clear about it. Maybe it was just me who was too stupid to see that in the first place :)

    Although im still wondering why my coordinator was able to switch the rejoined lamp on and off, but the list of associated devices was not able to show this associated lamp anymore.

    The behavior you described ( 0x84 - Not Supported ) did not occur to me at all. Im using the newest stack like you.

     

  • Hi Thomas Hartwig,

    What is the Philips Hue model id you use?

    Mine is LLC011 with datecode 20130201 but I am also facing the (0x84 - Not Supported) response when I send a leave request...

    I have also another request, did you try to use the Light Link Commissioning Cluster (0x1000), is it working?

    Kind Regards,

    Leo