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.

ZigBee ZAP port to Linux

Other Parts Discussed in Thread: CC2531, Z-STACK, AM3517, CC2530

I'm planning on porting the ZigBee Application Processor (from ZAP-MSP430-2.5.1) to Linux. My environment is a desktop Linux PC and a CC2531 USB stick running the ZNP firmware. (I also have two CC2530s with SmartRF05 boards that I can use to populate a Zigbee network.) I'll also be using a gcc-based toolchain for this instead of IAR. I have already used the ZNP to join a ZigBee network by sending simple commands over UART (as documented in CC2530ZNP Interface Specification) without any libraries from TI, so I know I won't have any connection issues. However, I want to implement ZigBee SE Profile, and of course I'd like to use TI's library from ZAP-MSP430-2.5.1 for this instead of writing it from scratch, so that means porting the ZAP framework to Linux.

I see several forum posts from people asking about this same thing as well as people who say they have already done this. Is there a completed Linux ZAP port that is available online? Considering how many times it has been done, it would be nice not to reinvent the wheel. As for doing the port myself, any advice? I know I'll have to port the OSAL and HAL source code. The OSAL API and HAL Driver API documents both appear to be very helpful for this. Besides those, I have the ZAP source code and ZCL code (which is required for the Zigbee SE Profile application), but should not need to make changes to them since they rely on the OSAL and HAL for platform-specific functionality. Am I on the right track here? Is there anything else I need to watch out for?

  • I would suggest youbto have a look at zigbee gateway that is provided by TI http://processors.wiki.ti.com/index.php/ZigBee_Lighting_Gateway . You can try to porting it to your PC linux.

  • YiKai,

    Thanks for this example.  It has a significantly different structure than the MSP430 project, though.  It doesn't use the same Z-Stack ZCL library as the MSP430 project, which contains an API for ZigBee SE profile.  Instead, the ZLL API is implemented as direct calls to the ZNP.  For example, zllSocGetState, zllSocGetLevel, zllSocGetHue, and zllSocGetSat all directly generate a ZNP command string representing a ZCL Read Attributes command for a particular ZLL attribute and write it to the serial line.  This approach is an option, but I was hoping to avoid it since SE profile has a large number of functions and callbacks to implement, and since I wanted to follow TI's example of a ZAP application with SE profile, which used the Z-Stack ZCL library.

  • Hi Anthony Sorvari,

    I have exactly the same problem as you mentioned in this forum and this bother me for awhile. 

    My environment is a AM3517 running embedded linux and has a cc2530 ZNP attached via UART.

    I ported top two blocks shown in ZigBee Lighting Gateway SW and communicate ZNP over UART interface. They works just fine by directly sending ZNP commands. Now, I am trying to port ZAP, profile and application onto linux, I don't know how to start it since those examples provided by TI are for MSP430.

    My I ask have you ported it successfully? and can you teach me how to do that?

    Thanks 

  • Hi,

    We have just released a new ZNP host framework that runs in any POSIX compliant OS as well as in TI-RTOS, you can run it on a Linux machine or on a MCU running TI-RTOS and it can be easily ported to any other OS. This framework is built in C and has an easy to use API to exchange MT commands with the ZNP, you don't need to write your own drivers or libraries everything is already included in the framework all you have to do is write your application. Also it comes with sample application that will help you understand how to develop your own application. One of the examples is an interactive command line program that lists and lets you use all the available MT commands. You can find step by step instructions on how to use the framework in the design guide document at www.ti.com/.../TIDC-ZNP-HOST-SW3 and you can get the framework from this git repository git.ti.com/.../znp-host-framework

    Hector