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.

Creating a ZigBee Light Link (ZLL) Co-ordinator with CC2530 Mini ZNP Kit

Other Parts Discussed in Thread: Z-STACK, CC2530

Currently it seems that the ZStack ZLL is not available as of writing this post.  I hope it's back soon so I can start testing.  I want to use this Kit from TI here.

http://www.digikey.ca/product-detail/en/CC2530ZDK-ZNP-MINI/296-28166-ND/2520904

My startup questions are basically.  Can the eZ430 USB Dongle be used to create a ZigBee Light Link (ZLL) Co-ordinator? And if so using the ZStack ZLL will it be possible to communicate with currently available commercial products like the Phillips Hue Lights?

I've read the ZStack is certified or certifiable, but does this mean that I would still need to get my product certified through ZigBee.org so that I could have use of the ZigBee Master Key?

 

  • According to page 4 of Z-Stack Lighting Developer's Guide the answer is "No you cannot".

    Thanks,

  • John,

        to answer your question:

    "My startup questions are basically.  Can the eZ430 USB Dongle be used to create a ZigBee Light Link (ZLL) Co-ordinator?"

    There is no coordinator in a ZLL network. When the initiator (End Device Remote) is factory new it will instruct the target (Router Light) to create a new network during the TouchLink (This will be a ZLL network). If you want to run ZStack-Lighting on the  eZ430 USB Dongle then this should be very easy, you might need to change the button and LED mapping in ha_board_cfg.h to match the one in the eZ430 platform, but that should be it. However the ZLL spec mandates that ZLL device must be able to join a HA network. So you could program the ez430 as a HA Coordinator and make the ZLL Lights join this network. After that the ZLL Lights will respond to standard HA/ZCL Lighting commands. 

    "And if so using the ZStack ZLL will it be possible to communicate with currently available commercial products like the Phillips Hue Lights?"

    Yes, this is possible, but this must be on a HA network and not a ZLL network. The reason is that (for obvious reasons) the secret ZLL Master Key is not contained in the ZStack-Lighting release, as such the standard ZStack-Lighting FW will not touchlink with ZLL products when they are factory new or already on a ZLL network. But when on a HA network HA security is used and this is not an issue.

    Typically a factory new/reset ZLL Light will search for a HA network when it is powered. Off the shelf ZLL products can be set to factory new by the ZStack-Lighting FW if you enable the MASTER_KEY, the actual key is not used during the reset, you just need the correct key bit mask during the initial touchlink phase. See section 3.1 of  the "ZStack Lighting Developers Guide.pdf" for more information about enabling the MASTER_KEY. To send a reset from a ZStack-Lighting Remote you need to start a touchlink with zllInitiator_StartDevDisc(), then when the ZLL Light flashes send the zllInitiator_ResetToFNSelectedTarget().

    "I've read the ZStack is certified or certifiable, but does this mean that I would still need to get my product certified through ZigBee.org so that I could have use of the ZigBee Master Key?"

    This is correct ZStack-Lighting is certified, but as soon as you change 1 line of code you will invalidate that certification. TI ZLL certified the ZStack-Lighting release so customers are starting development from a ZLL certified application and it should be simple to re-certify after making their product level customization's,  reducing development time, risk and time to market.

     Regards, TC.


  • Hi TC,

    Thank you very much, that is really get information to get going since purchasing the kit would be the next step I wanted to make sure this was going to be possible first and after a day of reading I'm getting closer.

    In Section 3 of the Z-Stack Lighting Developer's guide it says "Note that any ZLL implementation will not be able to interoperate with commercial ZLL devices without the ZLL master keys. Once the ZLL master keys have been achieved, they should be installed in the code with the following modifications:"

    Which would tend to suggest that without paying Zigbee for this Master Key I'm not going to be able to achieve a first run device that can communicate with Current products like the Hue Light.

    However, you say I can get around this limitation by using a HA network.  when a ZLL device joins a HA network will it still respond to ZLL commands such as color changing?  Or simple HA stuff like On and Off?

    A factory new Hue bulb will search for a HA network when it is powered. Off the shelf ZLL products can be set to factory new by the ZStack-Lighting FW if you enable the MASTER_KEY, the actual key is not used during the reset, you just need the correct key bit mask during the initial touchlink phase. See section 3.1 of  the "ZStack Lighting Developers Guide.pdf" for more information about enabling the MASTER_KEY. To send a reset from a ZStack-Lighting Remote you need to start a touchlink with zllInitiator_StartDevDisc(), then when the ZLL Light flashes send the zllInitiator_ResetToFNSelectedTarget().

     

    So with the Master Key I would have been able to Touch Link lights that had already been connected to another ZLL network, but the actual key is not used when the lights are factory new? So does that mean if I enabled the master key but used a random number I could still actually use my own ZLL network?

    So now I'll go through the HA documentation from ZigBee and see what I can find.

    Thanks,

    John

     

  • John,

        If you are developing a ZLL product you would certainly want to certify and apply for the Master Key. The comment in the User Guide is a little miss leading as there are ways to make devices that have not got the Master Key interoperate with ZLL products that have the Master Key. But this is not something that the consumer would understand. The interoperability I mentioned previously is good for product testing and demo's, but if you plan to finally release a ZLL product (Light or Remote) then I would strongly recommend certification and getting the Master Key, without certification you will also not be able to market you product as a ZLL device. That said this might be ok if you are developing an "IoT gateway" of some kind and just want the ability to add ZLL products.

    "However, you say I can get around this limitation by using a HA network.  when a ZLL device joins a HA network will it still respond to ZLL commands such as color changing?  Or simple HA stuff like On and Off?"

    Any of the normal HA Lighting commands or the Enhanced ZLL Lighting commands can be sent.

    "So with the Master Key I would have been able to Touch Link lights that had already been connected to another ZLL network, but the actual key is not used when the lights are factory new? So does that mean if I enabled the master key but used a random number I could still actually use my own ZLL network?"

    The Master Key is used during touchlink and also when joining a network created by a touchlink, lets refer to this as a ZLL network. You will not be able to join this network without the master key. However if you make the ZLL product (with Master key) join a HA network then they will use the normal HA mechanisms and the HA trustcenter link key and no longer use the master key (not even for a touch link with other devices aready on the network). Enabling the Master Key but used a random number would allow you to reset ZLL products, making them leave and existing ZLL network and join your HA network.

    I created an FAQ to explain this: http://processors.wiki.ti.com/index.php/ZStack-Lighting-1.0.1_FAQ please let me know if this is still not clear (it is quite a complex topic).

    Regards, TC.

  • Hi,

     I would like to develop a software solution based on Z-Lightning Stack and CC2531-EMK which could control and communicate with Hue. Unfortunately as John said, I can't inter operate with Hue because of Master Key given at the certification by the ZigBee Alliance.  You said a way to communicate with Hue is to open a HA network as a coordinator.

    But if I want to use the ZLL profile are there any way to communicate with Hue without getting the Master Key? (I tried the solution on the wiki but it didn't work). Because I need to make some interoperability preliminary test  without certification.

    Another point is I saw here http://www.everyhue.com/vanilla/discussion/141/getting-hue-to-join-my-coordinator-and-related-zigbee-questions/p1#Comment_1189 the bulb need to be Factory New in order to search and join an HA network, which is not the case of starter kit bulbs (already touchlinked with the Hub so NFN).

    I wonder if it is possible to send a resetToFN since the bulb is not yet in the HA network? (If I understand the touchlink initiator and target could touchlink in a HA network using the Trust Link center instead of Master Key and process to a send_resetToFN)

    Regards, Kevin

  • Kevin,

        The only way to control ZLL certified device (including Hue) is with a ZLL device with the master key or to make the ZLL certified device join a HA network. After joining the HA network it will use the HA trust centre key and can be controlled by any HA or certified/uncertified ZLL device that is on the same HA network.

    you can use the instruction in the FAQ to reset to FN Hue that is part of  the start kit. It does not need to be part of a HA network. after reset to FN it may need a power cycle to search for a HA network.

    The instruction on this wiki show you how to build a Linux HA gateway capable of controlling Hue. An example Android control App and cloud service connection (using NniaBlocks) is supplied so the Lights can be controlled by a smartphone or any Internet enabled device.

    http://processors.wiki.ti.com/index.php/ZigBee_Lighting_Gateway

    Regards, TC.


  • TC,

      Thanks to your advise, I managed to reset a hue Bulb to Factory New. And as you said, the dongle is now programmed as a HA coordinator. With the Z light, the system works pretty well, the light classically join the HA network and could be controlled via the coordinator.  But when I do a power cycle on Hue, I can see a Beacon request, and the coordinator (which is in permit join state), answer to this request, but the association doesn't go further. I can't control my Hue with the Hue Hub that show the reset to FN worked. 

     Did I miss a step?

     Just for information do you know where I could find the source code of HA Lightning Gateway?

    Regards, Kevin

  • Kevin,

        No it does not sound like you have missed a step, if you are seeing the joining device send beacon request and the Coord responding with a good beacon then it should work. Many people have done this successfully with a bulb from the starter kit. The Antenna is small and not as good performance as other more expensive (and larger) Antenna designs, it could be the the Light does not consider the signal strong enough to join, can you try moving it closer? If this does not work please post a packet trace so I can check the beacon is ok to allow a device to join.

    The source for HA LightingGateway is provided as a patch on top of ZStack-CC2530-2.5.1a, here: http://processors.wiki.ti.com/index.php/File:Z-Stack-Lighting-gateway.zip. It is linked from http://processors.wiki.ti.com/index.php?title=ZigBee_Lighting_Gateway_SW (note the "_SW"), this describes more of the details and where to get the source code from.

    Regards, TC. 

  • TC,

     Thanks a lot for the source code, I tried an other classical association as near as possible. But it behaves exactly the same way, I send you a sniffer file with the communication between Hue Bulb and HA Coordinator. The Buld makes beacon request on channels and then open it own network on channel 0x14, I send you this sniffer packet trace too. Perhaps the bulb doesn't try to rejoin an HA network (which is strange), or the resetToFN fail and perhaps the buld keeps it network parameters ? (the created PANID is always the same 0x1B0D)

    5722.incorrect_association.psd2330.Hue_open_network.psd

    Regards, Kevin

  • Kevin,

        This is strange, I have done this many times with no issues. Are you sure the bulb is resetting? It should turn Red after a reset to FN.

    I suspect it is not being reset and just going back to the old network, the beacon on power up may just be to see if the old network has moved channel (ZLL supports frequency Agility).

    Regards, TC.

  • TC,

     Indeed, the Hue hasn't reset and tried to find the former network. After a correct reset, it joined the HA network without any issue and could be controlled. Thank you for your help.

    Regards, Kevin

  • Tony,

    I am coming back to you for some informations on commissioning. I see in the host interface that there is a way to select device which could be able to join the HA network when a permit join command is sent to CC2530. On what ground the selection is done ?

    Regards,

    Kevin