• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF ZigBee® Software & IEEE 802.15.4 Forum » Application Tips with CC2530/CC2531 and Z-Stack
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

Application Tips with CC2530/CC2531 and Z-Stack

This question is answered
Daniel Morim
Posted by Daniel Morim
on Sep 28 2011 09:23 AM
Intellectual300 points

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

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Igor Sherer
    Posted by Igor Sherer
    on Sep 28 2011 10:54 AM
    Suggested Answer
    Guru21965 points

    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

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel Morim
    Posted by Daniel Morim
    on Sep 28 2011 13:19 PM
    Intellectual300 points

    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! :-)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Sep 28 2011 14:21 PM
    Guru21965 points

    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

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • LPRF Rocks the World
    Posted by LPRF Rocks the World
    on Sep 30 2011 14:11 PM
    Genius10415 points

    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

    "Customer Centricity, Enthusiasm, Mass collaboration and Great minds are the best path towards great products"

    “Victory awaits him who has everything in order – luck people call it. Defeat is certain for him who has neglected to take the necessary precautions in time; this is called bad luck.” 
    Roald Amundsen, The South Pole

    SimpleApp Sensor Demo
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel Morim
    Posted by Daniel Morim
    on Sep 30 2011 14:37 PM
    Intellectual300 points

    What's the difference between SimpleApp and SensorDemo?

    Could SensorDemo be better to me, couldn't?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • LPRF Rocks the World
    Posted by LPRF Rocks the World
    on Sep 30 2011 15:42 PM
    Genius10415 points

    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

    "Customer Centricity, Enthusiasm, Mass collaboration and Great minds are the best path towards great products"

    “Victory awaits him who has everything in order – luck people call it. Defeat is certain for him who has neglected to take the necessary precautions in time; this is called bad luck.” 
    Roald Amundsen, The South Pole

    cc2530zdk Sensor Demo Z-Sensor Monitor
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel Morim
    Posted by Daniel Morim
    on Oct 04 2011 14:29 PM
    Intellectual300 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Oct 04 2011 14:40 PM
    Guru21965 points

    Hi Daniel,

     

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

    Are you experiencing problem with this?

     

    Br,

    Igor

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel Morim
    Posted by Daniel Morim
    on Oct 05 2011 07:23 AM
    Intellectual300 points

    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?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Oct 05 2011 07:30 AM
    Guru21965 points

    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

     

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel Morim
    Posted by Daniel Morim
    on Oct 05 2011 08:02 AM
    Intellectual300 points

    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).

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Oct 05 2011 08:39 AM
    Verified Answer
    Verified by Daniel Morim
    Guru21965 points

    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

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel Morim
    Posted by Daniel Morim
    on Oct 05 2011 09:13 AM
    Intellectual300 points

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

    Thank you very much! :-)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • nick wolf
    Posted by nick wolf
    on Dec 08 2011 13:41 PM
    Prodigy170 points

    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

     

     

     

     

    ZigBee PRO CC2531 usb
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jinkang Cen
    Posted by Jinkang Cen
    on Apr 10 2012 16:24 PM
    Intellectual430 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use