Several demo programs are provided with the ZigBeeNet Software API in order to demonstrate how to develop user's applications. These demos include:
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 | |
---|---|
CPU | Intel Pentium III or higher, 800 MHz |
RAM | 128 MB |
Hard disk free space | 50 MB |
Software | |
Operating system | Windows2000/XP |
USB driver | CP210x USB to UART Bridge VCP Driver |
Java machine | Java Runtime Environment JRE 5.0 Update 8 (version 1.5.0) |
Compiler | AVR 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.
Source codes of all sample applications along with the corresponding Makefiles
are given at
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.
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.,
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:
Parameter | Value |
Data Rate | 38400 bps |
Data Bits | 8 |
Parity | None |
Stop Bits | 1 |
Flow Control | None |
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: