Atmel AVR2131: Lightweight Mesh Getting Started Guide [APPLICATION NOTE]
42029A
−
AVR
−
09/2012
4
3.
WSNDemo sample application
The WSNDemo application implements a typical wireless sensor network scenario, in which one central node collects
the data from a network of sensors and passes this data over a serial connection for further processing. In the case of
the WSNDemo this processing is performed by the WSNMonitor PC application. The BitCloud
®
Quick Start Guide
provides a detailed description of the WSNDemo application scenario, and instructions on how to use WSNMonitor.
The majority of the information in
applies to the WSNDemo application running on top of Lightweight Mesh stack.
However since BitCloud is a ZigBee
®
PRO stack, there are a few differences in the protocol:
•
Device types (Coordinator, Router and End Device) are simulated on the application level; there is no such
separation in Lightweight Mesh on the stack level
•
The value of the extended address field is set equal to the value of the short address field
•
For all frames, the LQI and RSSI fields are filled in by the coordinator with the values of LQI and RSSI from the
received frame. This means that nodes that are not connected to the coordinator directly will have the same
values as the last node on the route to the coordinator
•
Sensor data values are generated randomly on all platforms
•
Sending data to the nodes on the network is not implemented and not supported in this demo application
4.
Using precompiled binaries
4.1
Overview
The SDK comes with a set of ready-to-use binary images of the WSNDemo application. It includes a set of images for
different roles, which are preconfigured with distinct network addresses so they can be used for creating a small sensor
network right away. Precompiled binaries have the following naming convention:
WSNDemo_ <Board> _<DeviceType>_<Address>.hex
Here
<Board>
is a shortened name of the board or the module for which this image is compiled,
<DeviceType>
specifies a logical device type (“Coord”, “Router” or “EndDev”) and
<Address>
is a preconfigured network address of
the node.
4.2
Programming the boards
To program the precompiled binaries provided with the SDK using Atmel Studio, follow the steps below:
•
Start Atmel Studio
•
Open “AVR Programming” dialog (Tools -> AVR Programming)
•
Select correct tool, device, interface and press “Apply”
•
Connect programming tool to the board and power on the board
•
Press “Read” button located near the “Device ID” field. Make sure that Device ID is correct
•
On the “Fuses” tab set the fuse values and then press “Program” to write them to the device. Refer to
for correct fuse settings
•
On the “Memories” tab, provide image file name in the “Flash” field and press “Program”
•
Disconnect the programming tool and power cycle (or reset) the board. Device should be working now