Several demo programs are provided with the BitCloud Software API in order to demonstrate how to develop user's applications.
The BitCloud 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
configuration files are given at
The BitCloud library and Makerules files are contained at
To compile an application, run make utility from the directory where its Makefile is located:
make clean all
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 User's Guide or the ZDK User's Guide contained in this kit.
Most of the sample applications 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 WSNDemo 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 (unless stated otherwise for a particular application):
Parameter | Value |
Data Rate | 38400 bps |
Data Bits | 8 |
Parity | None |
Stop Bits | 1 |
Flow Control | None |
Most of the user-adjustable application's configuration parameters are isolated in a file named Configuration which is then included in the Makefile.
To select a channel to work on, the user may change the channel mask definition (APP_CHANNEL_MASK) in the application's configuration file, recompile the application and burn it into the nodes. By default, the channel is set either to 0x16 or to 0x18 for devices working in the 2.4 GHz band (ZigBit, ZigBit Amp) or to 0x00 for those working in the 868/915 MHz band (ZigBit 900).
By default, the NWK layer security implemented in BitCloud 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 configuration file.
To switch on the security in an application, one should perform the following changes in its configuration file: change the SECURITY_MODE value to STD_SECURITY and select one of the two following modes of operation:
Note that switching on security option enlarges firmware image, so that for some programs it may become too large to fit into the board's memory. In such case, the user may try to reduce it by decreasing CS_NEIB_TABLE_SIZE, CS_ROUTE_TABLE_SIZE, CS_MAX_CHILDREN_AMOUNT and other parameters that control memory allocation.