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.

How to add new functionallity to Z-stack SimpleApp Application (post without the formatting errors)

Other Parts Discussed in Thread: CC2430, Z-STACK

Hello everyone,

I hope you are all doing great. I would really appreciate your help in solving a problem I have been facing for more than 2 weeks now. I am a new programmer using the Z-stack (v1.4.3-1.2.1). I am currently working with the Zigbee Simple Api and using the application SimpleApp (with CC2430).

Conceptually my project consists of a wireless sensor network, formed using the Zigbee standard and a Finite State Machine (which beings operation right after the Zigbee network is formed). I have found the SimpleApp project and wanted to build on it and extend its functionality by adding my FSM.

I have NOT been able to determine where in the code of SimpleApp can I add my own code to call the FSM. I tried a simpler operation (writing an message to the LCD) but still have not been able to do that.

What I want to know specifically (and I am happy to provide more details if someone needs it) is where in the SimpleApp code (which file or files) can I add my own code so I can add extra functions (like writing a simple message to LCD and calling my FSM to start working) to SimpleApp.

I have looked at some files already in SimpleApp (including ZDApp.c and thought and added extra code, after line 436 (if you are using IAR EW8051 IDE) but it does not seem to have worked at all). I would really appreciate any help from more experienced developers.

Thank you very much

Hazem Awad

  • Basically you can add your code wherever you want, but usually (based on the functionality and what you wanna do) it is common to add it to the folder of APP. You can add new .c/.h-files (FILE >> New >> File) or you can insert your code into the already existing files there.

    For example:

    If you would like to use the SmartRF04EB and would like to add some functionality like switching on a LED with teh joystick, you have to add your code into the function void zb_HandleKeys( uint8 shift, uint8 keys ) under the appropriate KEY you are using.

     

    It depends on how you wanna do sth. If you give us an example what you wanna do how, then we can give you some code or other info.