Atmel AVR2131: Lightweight Mesh Getting Started Guide [APPLICATION NOTE]
42029A
−
AVR
−
09/2012
5
Table 4-1. Fuse settings for the precompiled binaries.
Board or module
MCU
Extended
High
Low
RCB128RFA1
ATmega128RFA1
0xFE
0x9D
0xC2
RCB231
ATmega1281
0xFE
0x9D
0xC2
ZigBit
ATmega1281
0xFE
0x9D
0xC2
4.3
Running the application
After all boards are programmed connect coordinator board to the PC and run the WSNMonitor application. Observe
the coordinator and other node icons appearing on the screen. Refer to
for details on how to use the hardware and
PC software.
5.
Using provided projects
5.1
Overview
Applications are located in the
apps
directory in the SDK. All sample applications in the Lightweight Mesh SDK come
with the project files for Atmel Studio, IAR Embedded Workbench and GNU make utility.
All Lightweight Mesh applications include a configuration file
config.h
. This file contains settings for the application and
the stack. WSNDemo application settings are listed in
. For system settings mentioned in the configuration file
see
Table 5-1. WSNDemo application settings.
Parameter
Description
APP_ADDR
Node network address. This parameter also determines emulated device type:
•
0x0000 – Coordinator
•
0x0001-0x7fff – Router
•
0x8000-0xfffe – End Device
APP_CHANNEL
Radio transceiver channel. Valid range for 2.4GHz radios is 11 – 26 (0x0b – 0x1a)
APP_PANID
Network identifier
APP_SENDING_INTERVAL
This parameter has a different meaning for different device types:
•
Coordinator: interval between sending sensor values to the UART
•
Router: Interval between reporting sensor values to the coordinator
•
End Device: Sleep interval
APP_ENDPOINT
Application main data communication endpoint
APP_OTA_ENDPOINT
Over-the-Air upgrade service endpoint
APP_SECURITY_KEY
Security encryption key
Note:
For normal network operation all devices should have different network addresses. There is no automatic
address assignment mechanism, so it is the developer’s responsibility to ensure that addresses are
unique.
Refer to the respective development environment documentation for the information on how to compile and debug
projects.