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

Zigbee with the nRF52840 - How to get started in 2019?

Hi there!

I am looking to implement a Zigbee powered device using the nRF52840. I have very good hardware knowledge of said chip, but not so much of the software part (especially the Nordic SDK in C)

Can anyone give me a headsup where to start? There is a multitude of SDK options. I am guessing I need the SDK for Thread and Zigbee 3.0. Why is this not integrated into the normal SDK? I mean why have a different API? Is it the same just with integrated ZBOSS? :)
Where have the docs gone? The old docs sections is somehow not there anyomore? Where can I find the ZBOSS API? The official ZBOSS website seams heavily outdated. Is it wise to use ZBOSS?

Furthermore, what is the recommended way to get a clean project setup started? Please no "Use the examples" answer ... that never works and leads to really bad firmware just hacked up quickly. That is a messy approach and does no good.

How do I set up a proper config file (it's about a thousand config flags which are differently ordered for each example, so that file can't be diffed. How do you generate it internally?)?
One of my biggest issues in the past was the different APIs that do the same but are completely mixed in the samples. Am I supposed to use the nrfx API or the old legacy nrf API? The examples do not tell as they use a wild mix. In the past the SDK config file also had a bug where the override switch to use the legacy API would completely mix up everything. Has that been fixed?

And how do I set up the linker scripts properly (is it documented somewhere, what sections I need for which bit?)? In the past there was always trouble because this was not really clear :/

Thanks a lot for any information :) I would love to see the SDK has improved as the HW seems to be the best out there by far and I would love to it in all of my devices!

Best,
Noah

  • I and others have found it somewhat difficult to develop Zigbee applications due to inconsistencies and omissions in the documentation so it is a bit of uncharted territory that will require patience and willingness to work through problems. I cannot answer all of your questions but will try to pass along some of the things that I have been able to pick up.

    SDK
    From what I can tell, you can get away with developing any type of solution using the new Thread and Zigbee 3.0 SDK. I imagine they have a separate SDK package because the development cycle is not in sync with the main SDK cycle. I am not positive but I believe the previous versions of the SDK modified files included in the base SDK and that could also be a reason for them being separate. According to the changelog for SDK 3.0 however it is mentioned that none of the files in the base 15.3 SDK were modified to accommodate the Thread and Zigbee portion. Apart from the Thread and ZBOSS APIs the SDKs use the same API.

    Documentation
    I did notice today that the new Thread and Zigbee SDK has been released sometime in the last day or so and that the documentation has also been moved from DocLib (dead already?!?) back to infocenter. Having briefly skimmed over the latest documentation I can already see they have added some information that was not in the 2.0 documentation.

    As far as the ZBOSS documentation is concerned, reading the documentation on infocenter, looking over the examples, and reading the threads regarding Zigbee here are what we have. The ZBOSS documentation is not available from DSR and if you reach out to ask, they will gladly ignore your request but offer to develop a solution for you. The outdated documentation you referred to in your question is not useful for any purpose so forget you even found it.

    Projects/Config
    The official method for managing the sdk_config is by using the CMSIS tool included in the SDK. I usually cobble together a sdk_config based on the full (I think it has everything) config found in the config folder in the SDK. You will have to add the Zigbee related config items manually but it is a good start. One thing to note about manually editing sdk_config and later want to use the CMSIS tool, it is VERY picky about having the proper internal tags and headers. It is very easy to "break" the sdk_config to where it will not open in CMSIS.

    To setup a clean project I would frankly look through the examples and find the functions you need. Many of the event handlers and callback functions are not implemented consistently but I'd argue that the examples are really just there to get us started.  While it would be nice to have a clean zigbee example project to use as a base, we do not have one available to us. This is how I have created my current Zigbee project and it is working just fine. I do not use any of the Nordic supported IDEs for development but I have found it useful to open up the included example projects to get an idea of what they are including in the project.

    Use the linker script applicable to your board from one of the Zigbee examples.

  • Thanks a lot for the really elaborate answer. Unfortunately during the last few weeks I tried working with the ZBOSS stack. And while it is really cleanly coded (as far as I can see from the outside), and the documentation is quite extensive, the used english is oftentimes horribe to understand and it lacks lots of information.

    Enabling the ZBOSS trace outputs tons of binary to no avail, obviously. I laughed at that one.

    So basically I am sharing your experience :(

    I really would have loved some official Nordic reply with actual help instead of just confirming that the documentation and support for their product sucks, even tho they advertise it as feature complete, production ready and certified. A real shame. For me, not even the examples can join a Zigbee network and all I get as an error hint is a "-1". That's just sad.

    Best,

    Noah

Related