TI E2E Community
ZigBee®, 6LoWPAN & 802.15.4 MAC Forum
Application Tips with CC2530/CC2531 and Z-Stack
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
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.
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! :-)
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). :)
The sensor demo application (SimpleApp) should be included in the Z-Stack release, 2.5.0, just like what Igor is referring to.
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
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
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.
You can compile the project, and download it to the dongle.
Are you experiencing problem with this?
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?
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?
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).
Regarding the errors you get while compilation:
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.
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:
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.
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
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.