ZigBeeNet Sample Applications

Several demo programs are provided with the ZigBeeNet Software API in order to demonstrate how to develop user's applications. These demos include:

System requirements

The ZigBeeNet sample applications are intended to run on MeshBeans and other compatible platform devices.

System requirements for the PC used to compile applications and program the nodes are:
PC
CPUIntel Pentium III or higher, 800 MHz
RAM128 MB
Hard disk free space50 MB
Software
Operating systemWindows2000/XP
USB driver CP210x USB to UART Bridge VCP Driver
Java machineJava Runtime Environment JRE 5.0 Update 8 (version 1.5.0)
CompilerAVR GCC 4.1.2 compiler available within the WinAVR 20070525 package.

To upload the firmware to the boards, you may use either JTAGICE mkII emulator in conjunction with AVR Studio or the Serial Bootloader utility.

How to build

Source codes of all sample applications along with the corresponding Makefiles are given at [ZBN]\Sample Applications\. Hereafter, [ZBN] denotes the root folder for ZDK installation. The compiled firmware image files are also contained in the same directory. However, it is not necessary to retain these files, since you can rebuild them at any time.

To compile an application, run make utility from the directory where its Makefile is located. Otherwise, find the corresponding *.aps file in the same directory, open it with AVR Studio and just press Build\Rebuild All in the main menu. The *.hex and *.srec image files will be generated. Now you may upload one of the image files onto a MeshBean2 board.

Programming the Boards

The boards can be programmed in one of the two ways: either by Serial Bootloader utility, or under AVR Studio using JTAG emulator, for example, JTAGICE mkII from Atmel.

Fuse bits should be set to the following values (in hex representation): 0xFF, 0x9C, 0x62 (factory default) when using Serial Bootloader, or 0xFF, 0x9D, 0x62 when using JTAG.

To learn more, see the Serial Bootloader Application Note contained in this kit, or the ZigBit™ Development Kit 1.3 User's Guide, MeshNetics Doc., S-ZDK-451.

Connecting to PC

All sample applications except Blink imply some interaction with a PC (although they may be run as well without connecting to PC, when the only observation of the state and activities of the boards is performed by their LEDs). While ZBNDemo uses a special custom program named WSN Monitor, other programs need just a general-purpose terminal application. The connection parameters must be set as follows:
ParameterValue
Data Rate38400 bps
Data Bits8
ParityNone
Stop Bits1
Flow ControlNone

Security

By default, the NWK layer security implemented in ZigBeeNet stack is switched off. The compiled stack libraries are supplied in versions for coordinator, router, end device, and all devices. Each of them is presented in two variants: "Security ON" and "Security OFF", thus making a total of 8 libraries. The choice of a particular library to include when compiling an application is defined by the values of STACK_TYPE and SECURITY_MODE parameters in its Makefile.

To switch on the security in an application, one should perform the following changes in its Makefile: change the SECURITY_MODE value to STD_SECURITY, uncomment the line containing DCS_APS_SECURITY_TIMEOUT_PERIOD definition, and select one of the two following modes of operation:


Generated on Mon Dec 3 13:00:04 2007 for ZigBeeNet API by  doxygen 1.5.1-p1