Skip to content

Econotag Configuration

laurentderu edited this page Feb 19, 2013 · 9 revisions

Introduction

The Econotag is an open hardware development kit based on the FreeScale MC13224 ARM7 802.15.4 System on Chip. Amongst other things, it provides 96KB of RAM and 128KB of flash and a variety of I/O, which makes it a great platform to develop a standalone Border Router. In order to connect the Econotag to the Ethernet network without relying on an additional host, we need to add an Ethernet controller. We choose to use a development kit based on the ENC28J60 controller chip, the Olimex ENC28J60-H using the SPI bus to communicate with the Econotag platform.

Econotag and ENC28J60-H

This document does not describe how to set up a cross-compilation environment for mc1322x, for a good starter check libmc1322x

Wiring

Econotag and ENC28J60-H Wiring

Note that we do not use the interrupt pin (INT) as the 6LBR driver is using polling instead. The reset pin (RST) is grounded as the driver is using soft reset only. The wake-on-lan (WOL) is not used.

Build and upload

Build

  1. Obtain the latest version of 6LBR:
git clone https://github.com/cetic/6lbr
cd 6lbr/examples/6lbr
  1. In 6lbr source directory, do the following commands :
make all_econotag
make tools

Binaries for all the three modes are created in bin_econotag/

Binary loading

Use the mc1322x-load(.pl) program to load the 6LBR on the Econotag

 mc1322x-load.pl -t /dev/ttyUSB1 -f bin_econotag/cetic_6lbr_smart_bridge 

Note that you have to upload the 6LBR again when the Econotag is reset/restarted

You can program the Econotag NVM with the flasher tool provided with libmc322x :

mc1322x-load.pl -t /dev/ttyUSB1 -f flasher_econotag.bin -s bin_econotag/cetic_6lbr_smart_bridge

Configuration update

Due to the limited size of the Econotag RAM, it is not possible to update configuration parameters of the 6LBR directly. In order to modify these configuration parameters, one has to create a NVM configuration file using nvm_tool and flash the Econotag NVM with it.

A flashing script is available to help flashing the configuration parameters into the NVM without erasing the whole NVM.

tools/econotag/flasher.sh   []

For example, il you want to use the channel 24, with "cccc::" as WSN prefix, you will do :

nvm_tool --new --channel 24 --wsn-net-prefix 'cccc::' nvm.dat
flasher.sh nvm.dat /dev/ttyUSB1 

Your parameters should be now present in the NVM and will be used at 6LBR restart. This tool does not erase the whole NVM nor does it alter the boot flag, so you do not need to flash again the 6LBR binary.

Rebuild

The 6lbr_nvm_flasher binary can be rebuilt using the following command in 6lbr/tools/econotag :

make MC1322X= BOARD=redbee-econotag
Clone this wiki locally