802.15.4 tutorial

IMPORTANT: Tutorial just for 802.15.4 users

The aim of this tutorial is to help the 802.15.4 user in 2 operations:

  • to send data frames from Waspmote to Meshlium, using XBee 802.15.4 modules

  • to receive those frames on Meshlium

All the information explained here was already available on the documentation, so this is just a summary.

The structure of this tutorial is as follows:

  • First, we will shown the steps needed to send 802.15.4 frames to Meshlium and receive them.

  • Last, there is valuable theory information that must be read and studied to be able to build 802.15.4 projects:

    • some explanation on the 802.15.4 protocol, MACs, channel and PANID parameters

    • FAQ’s

Three steps to receive frames on Meshlium

1 – Download the latest version of the Waspmote’s API

2 – With the Waspmote’s IDE, upload this example on your Waspmote:

802.15.4 example – Configure XBee

This first sketch will configure 3 parameters for your Waspmote’s XBee.

IMPORTANT: In this first sketch, you should change 3 parameters according to the XBee-802.15.4 inside your Meshlium. You must keep in mind:

  • Channel: Change the channel for the one used by your Meshlium’s XBee.

  • PAN ID: Change the PAN ID for the one used by your Meshlium’s XBee.

  • Encryption mode and key: If you want to enable encryption security change the parameters related to that in the code according to the parameters you have set in your Meshlium’s XBee. No encryption by default.

If you do not know how to set and get the Meshlium’s XBee parameters please check the next step 3.

Now you will upload and execute a second sketch which will send frames to your Meshlium’s MAC address:

802.15.4 example – Send packets

3 – How can you know the XBee-802.15.4 module parameters inside Meshlium?

It is supposed that all the Waspmotes will send frames to Meshlium, so it is crucial to know its address and other parameters like the PAN ID, channel and encryption mode.

For that, we will connect to the Manager System and read the Meshlium’s XBee 802.15.4 module MAC address.

3.1 – Press “Load MAC”:

This operation queries the XBee 802.15.4 module for getting the MAC address. You should get the MAC address divided in 2 halves.

3.2 – Press “Check status” in order to check the XBee parameters:

This operation queries the XBee 802.15.4 module for checking the Network ID, the channel, the network address, the Node ID and Encryption Mode. You should get green OK’s for correct values.

3.3 – Press “Save”. It is mandatory to press “Save”, at least the first time.

4 – Show data on the Manager System

4.1 – Connect to Meshlium and open the Manager System. Go to the RF modules tab.

4.2 – Check that the Sensor Parser is running, if it isn’t click on the “Star” button; the icon should be like this:

4.3 – Go to the Capturer tab. In the Local Database tab you are able to check the last registered frames. You can also select the number of frames to be shown:

The data received from Waspmote will be displayed parsed in the local data base.


Forming a Network

All XBee modules must be configured with the same network parameters. Libelium provides XBee modules set with the default parameters. In the case the user wants to set another setting, all XBees have to be configured. Basically, there are 3 different network parameters which identify uniquely a network: PAN ID, channel and encryption mode.

More information:

Last updated