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.

Application Tips with CC2530/CC2531 and Z-Stack

Other Parts Discussed in Thread: CC2530-CC2591EM, CC2531EMK, CC2530, CC2531, Z-STACK, CC2530EM

Hello everybody,

I'd like to start develop an application based on two CC2530-CC2591EM + SmartRF05EB and a  usb dongle CC2531EMK.

One of my CC2530+CC2591EM will be a Router and the other one my End Device which aquires data by its ADC.

The CC2531 dongle will be my data concentrator (coordinator, right?) that will send all  received data to PC via USB (Serial Com Port).

The communication will be done with ZigBee (z-stack), so I can add more End Devices (and  Routers) in the future!

I'd like to know which example should I get to start developing (generic app, serial app or  other one, for example?).

Thank you,

Daniel

  • Hi Daniel,

     

    SensorDemo application suits the most your purpose (can be found in the same folder as the GenericApp).

    I'll have to make some changes in Z-Stack in order to use the USB in the dongle.

    One more thing, the dongle is a perfect solution for wireless traffic sniffing, so you may consider to use it for

    that purpose, while developing your application on other devices.

     

    Br,

    Igor

  • In the same folder just has GenericApp, SimpleApp and SampleApp (I installed the ZStack-CC2530-2.5.0). Am I at the wrong folder? I'm at ..\ZStack-CC2530-2.5.0\Projects\zstack\Samples

    I'll consider to use CC2531 for sniffing, but I'd also like to test it exchanging some data with my pc. Can you make this program avaiable for me?

    Thank you, Igor! :-)

  • Hi Daniel,

     

    Regarding the SensorDemo application, my mistake, please refer to this link, download and unzip it

    into Samples folder (the same folder with GenericApp and other sample projects).

     

    As for the USB part, on second thought (please forgive me for my laziness and the fact that it is a 

    "Rosh-ha-Shana" eve today in Israel, which I'm fully celebrating at this very moment) , you probably should be

    doing this by yourself (it's not so hard, and I think it really can help you to better understand what's going on).

    Please refer to this thread (it will link you to some other thread, but in the bottom line you'll get the point). :)

     

    Br,

    Igor

  • The sensor demo application (SimpleApp) should be included in the Z-Stack release, 2.5.0, just like what Igor is referring to.  

    C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SimpleApp\

    LPRF Rocks the World

  • What's the difference between SimpleApp and SensorDemo?

    Could SensorDemo be better to me, couldn't?

  • Sensor Demo should be the same as SimpleApp. If you download our Sensor Monitor Software and test it with CC2530ZDK  it is the factory installed application on our ZigBee Development Kit.

    See the CC2530ZDK Quick Start Guide:
    http://www.ti.com/lit/ug/swra274a/swra274a.pdf

    LPRF Rocks the World

  • I explored as much as I could the SensorDemo example and I like it.

    The problem now is to make the CC2531 dongle as coordinator. I looked this link and all the other on the forum but I'm still a little bit lost... I really don't know from where I should start it.

  • Hi Daniel,

     

    You can compile the project, and download it to the dongle.

    Are you experiencing problem with this?

     

    Br,

    Igor

  • Not really. I mean, I just changed the target device from CC2530F256 to CC2531F256. But I also need to change the way I communicate with the ZigBee Sensor Monitor (software running at Windows XP). In the original firmware, using the CC2530EM, I was using UART. Now, with the dongle CC2531, I need to change it to USB. Which files do I need to substitute? Just the HAL's ones? And in IAR options?

  • Hi Daniel,

     

    As I remember this, the changes to be made are only in the HAL section (plus that one

    you have mentioned in your post).

    You are experiencing problems with replacement of those files?

    You are not able to compile the project?

     

    Br,

    Igor

     

  • Yes, I'm not able to compile. I got these errors:

    Error[e46]: Undefined external "usbirqData" referred in hal_uart ( C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SensorDemo\CC2530DB\CollectorEB\Obj\hal_uart.r51 )
    Error[e46]: Undefined external "usbfwResetHandler::?relay" referred in hal_uart ( C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SensorDemo\CC2530DB\CollectorEB\Obj\
    hal_uart.r51 )
    Error[e46]: Undefined external "usbfwSetupHandler::?relay" referred in hal_uart ( C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SensorDemo\CC2530DB\CollectorEB\Obj\
    hal_uart.r51 )
    Error[e46]: Undefined external "currentLineCoding" referred in hal_uart ( C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SensorDemo\CC2530DB\CollectorEB\Obj\
    hal_uart.r51 )
    Error[e46]: Undefined external "usbfwInit::?relay" referred in hal_uart ( C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SensorDemo\CC2530DB\CollectorEB\Obj\hal_uart.r51
    )
    Error[e46]: Undefined external "usbirqInit::?relay" referred in hal_uart ( C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Samples\SensorDemo\CC2530DB\CollectorEB\Obj\
    hal_uart.r51 )


     In the project, I deleted the HAL\ TARGET\CC2530EB folder and create the CC2530USB folder. Into this new folder I added the same files (for example, hal_board_cfg.h in CONFIG subfolder, a lot of HAL_*.c in Drivers subfolder and HAL_*.h in INCLUDES subfolder). But I saw that I still have 3 files that I didn't use (hal_oad.c, hal_oad.h and hal_mac_cfg.h).

  • Hi Daniel,

     

    Regarding the errors you get while compilation:

    1. Open "project options"->C/C++ compiler -> preprocessor (tab) -> Additional include directories (sub window).
    2. Find this line "..\Components\hal\target\CC2530EB" and replace it with these lines:
      $PROJ_DIR$\..\..\..\..\..\COMPONENTS\HAL\TARGET\CC2530USB
      $PROJ_DIR$\..\..\..\..\..\COMPONENTS\HAL\TARGET\CC2530USB\usb\library
      $PROJ_DIR$\..\..\..\..\..\COMPONENTS\HAL\TARGET\CC2530USB\usb\library\cc2531
      $PROJ_DIR$\..\..\..\..\..\COMPONENTS\HAL\TARGET\CC2530USB\usb\class_cdc

    I also added two images of the HAL tree for you to compare with.

    8546.HAL tree images.zip

    As for hal_oad.c, hal_oad.h and hal_mac_cfg.h, at this moment leave it aside.

    Lets see if we can make you go through the compilation step without 1000 error messages popping out from nowhere.

     

    Br,

    Igor

  • Fantastic!! It's working! More simple than I thought!! :-)

    Thank you very much! :-)

  • Thank you Igor ( and Gary )

    I have tried your and Dirty Gary threads and still have problems:

    1) Linker:

    Error[e27]: Entry "HalUARTRx::?relay" in module _hal_uart_usb ( ...\Projects\zstack\HCP\SampleApp\CC2530DB\CoordinatorEB\Obj\_hal_uart_usb.r51 ) redefined in module hal_uart ( ...\Projects\zstack\HCP\ SampleApp\CC2530DB\CoordinatorEB\Obj\hal_uart.r51 )

    I saw community comments to e27 but not sure what is wrong.

    Also, while looking at the pictures with proposed, what needs to be done  to _hal_uart_usb.c file?

    2) Since I plan to use cc2531, do I need to use 2531.xcl instead of cc2530.xcl?

    I have tried and got   Fatal Error[e72]: Segment BANKED_CODE must be defined in a segment definition option (-Z, -b or -P)

    I have tried banked version of 2531.xcl and got   Fatal Error[e72]: Segment ZIGNV_ADDRESS_SPACE must be defined in a segment definition option (-Z, -b or -P)

     

    Again, I was trying to use cc2531 based dongle that runs Z Stack while communicating with to PC based application.

    Thanks

     

     

     

     

  • 1) Linker:

    When I excluded this _hal_uart_usb.c file from the project. The error[e27] was gone!! It seems this problem could be solved by this way. But I am not sure if it would influence the functionality of the dongle.

    2) It seems you could use the cc2530.xcl file rather than cc2531.xcl, but not for sure

  • Correct, you do not explicitly add _hal_uart_usb.c to the IAR project, it gets sucked into the build by this directive in hal_uart.c:

    #if HAL_UART_USB
    #include "_hal_uart_usb.c"
    #endif

    A Z-Stack Sample Application for the F256 SOC (e.g. CC2531) should use the standard linker file as any sample application:

    C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Tools\CC2530DB\f8w2530.xcl

    Bonus question: why the f8w in f8w2530.xcl and why the 'CC' in any part (CC2530, CC2531)?

  • Hi all,

    SensorDemo project is called with swrc147.zip file. But i couldn't find it in the web site. i believe there are lots of important file missing like that.

    The file exist but finding it from web site is really hard. So is there any list about swrcxxx.zip file system. i know there is a list for ANxx. what about swrcxxx ?

    f8w2530.xcl => For 8 Weeks  ( i believe the engineer who create the file give the name specificly and mean that He has spent **For 8 Weeks**  to create it. 

    So  f8w :))

  • Wow - you are right, it is very hard to find the sensor demo app! First, go here:

    http://www.ti.com/tool/cc2530zdk

    Then scroll down to find "Related Products" and click on the Tab for "TI Software (5)" and there you will find a link to the demo. This demo is just another "Z-Stack Sample Application", thus it needs the infrastructure provided by a full Z-Stack install - I recommend that you go get the latest Z-Stack 2.5.1:

    http://www.ti.com/tool/z-stack

     

    And for your guess about f8w - hilarious! But maybe the file is so obtuse (as any linker control file or makefile usually is) that it requires the new user 8 weeks to understand it ;)

    Anyway, f8w was the software module prefix used by a small software startup company named Figure8 Wireless which was an early implementer of the ZigBee protocol (pre 1.0 days). The F8W ZigBee stack was so successful that it attracted the interest of a Norwegian radio maker, ChipCon (thus the 'CC' in all radio part names). And ChipCon bought Figure8 Wireless. But during that process, ChipCon was so successful that it attracted the interest of TI, and TI bought ChipCon which now included F8W ;)

  • Hi,

    I was trying to check out serial app project and packet sniffer dongle cc2351. I used serial app project on cc2350 . cc2350 was sending out packets. I could see the packets using cc2351 dongle with packet sniffer. But in the packets captured I could not see the data I sent in any of the fields.

    I have few questions regarding this.

    1. How would the packet sniffer on the 2351 usb dongle pair up with any of the nodes?  For how can it have the required pan id cluster id .... to pair up with any zigbee unit which is on?

    2. Does this dongle sniff packets sent by

    MAC_McpsDataReq ( )?

    3. If the packet is encrypted how does the usb dongle decript the packet if it does not pair up with the zibee device and still sniff the packet?

    4. Can I download serial app project to the usb cc2351 dongle so that it pairs up with the  other zibee device wth the same serial app. In that case will the sniffer firmware on the USB dongle get corrupted?

     

    Your answers would help.

    Thanks and Regards,

    Vamsi.

     

  • i want to use the SensorDemo on cc2531

    is there a port already?

  • is there a port available already for cc2531 dongle to be used as a collector?

    #akrv

  • SensorDemo is used with the CC2530ZNP. No port available to my knowledge for the CC2531. However there is a CC2531ZNP project available in the TI Z-Stack SDK

    LPRF Rocks the World