2012年12月9日 星期日

[ZigBee][CC2530] SerialApp Smple Application - Bidirectional!

Z-Stack Sample Applications are useful examples which we can verify the EDK and learn Z-Stack software.

SerialApp is a sample application which enables two CC2530EM to act as serial cable (RS-232) so we can use hyper terminals on two computers to interact with each other over the air.

However, the guide document, Z-Stack Sample Applications.pdf(SWRA201), is not clear so I found that the communication is one way, instead of bi-directional. Few guys had the same problem and posted it to E2E forum. The symptom is that the data only gets transferred from ZED to ZC, but not reversely.

To make bidirectional transmission,


you have to Push SW4 at ZED and then SW4 at ZC
OR, you have to Push SW2 at ZC and then SW2 at ZED

quote from Zigbee Wireless Networking, "Binding is unidirectional, in that the switch is bound to the light, but the light isn’t bound to the switch"

The suggestion was also posted in this thread - Bidirectional communication in Serialapp,

2012年12月3日 星期一

[Zigbee][CC2531] make USB firmware with IAR

In order to change CC2531 USB dongle to USB CDC device, I downloaded swrc088c.zip (The Texas Instruments LPRF USB Firmware Library (Rev. B) ) and tried to make a CDC firmware of it.

the first problem I met is that the IAR project file (\ide\rfusb_cc2531\iar\rf_modem.eww) was made by  older IAR version so my IAR (8.10.3) asked me to convert it to this version. After doing so, the make operation still didn't go through because of [ Error[e12]: Unable to open file 'lnk51ew_cc2531b.xcl' ].

After quick searching at e2e, the thread IAR 7.6 linker error did provide solution of it.


-Right click on the top level project file in the 'Workspace' window
-Select 'Options'
-From the 'Category' box on the left, select 'Linker'
-Select the 'Config' tab
-In the 'Linker command file' box, make sure 'Override defaults' is checked
-Choose the proper linker file


in my case, the file is IAR Systems\Embedded Workbench 6.0\8051\config\devices\Texas Instruments\lnk51ew_cc2531F256.xcl

After reboot the dongle and installing the device driver (swrc088c\driver\usb_cdc_driver_cc2511.inf), the CC2531 CDC was successfully running.