The ESB (Embedded Sensor Board) is a prototype wireless sensor network device developed at FU Berlin. More...
Modules | |
ESB RS232 | |
Beeper interface | |
TR1001 radio tranciever device driver | |
Introduction to Over The Air Reprogramming under Windows | |
Files | |
file | codeprop-otf.c |
Code propagation and storage. |
The ESB (Embedded Sensor Board) is a prototype wireless sensor network device developed at FU Berlin.
The ESB consists of a Texas Instruments MSP430 low-power microcontroller with 2k RAM and 60k flash ROM, a TR1001 radio transceiver, a 32k serial EEPROM, an RS232 port, a JTAG port, a beeper, and a number of sensors (passive IR, active IR sender/receiver, vibration/tilt, microphone, temperature).
The Contiki/ESB port contains drivers for most of the sensors. The drivers were mostly adapted from sources from FU Berlin.
The ESB is equipped with an MSP430 microcontroller. The first step to getting started with Contiki for the ESB is to install the development tools for compiling Contiki for the MSP430.
Windows users, see Setting up the Windows environment. FreeBSD users, see Setting up the FreeBSD environment
The Contiki development environment under Windows uses the Cygwin environment. Cygwin is a Linux-like environment for Windows. Cygwin can be found at http://www.cygwin.com. Click on the icon "Install Cygwin Now" to the right to get the installation started.
Choose "Install from Internet" and then specify where you want to install cygwin (recommended installation path: C:\cygwin
). Continue with the installation until you are asked to select packages. Most packages can be left as "Default" but there is one package that are not installed by default. Install the following package by clicking at "Default" until it changes to "Install":
When cygwin is installed there should be a cygwin icon that starts up a cygwin bash when clicked on. Whenever it is time to compile and send programs to the ESB nodes it will be done from a cygwin shell.
If you do not already have a nice programming editor it is a good idea to download and install one. The Crimson editor is a nice windows based editor that is both easy to get started with and fairly powerful.
Crimson Editor can be found at: http://www.crimsoneditor.com/
The editor is useful both when editing C programs and when modifying scripts and configuration files.
A compiler is needed to compile the programs to the MSP430 microprocessor that is used on the ESB sensor nodes. Download and install the GCC toolchain for MSP430 (recommended installation path: C:\MSP430\).
The GCC toolchain for MSP430 can be found at: http://sourceforge.net/projects/mspgcc/
When the above software is installed you also need to set-up the PATH so that all of the necessary tools can be reached. In cygwin this is done by the following line (given that you have installed at recommended locations):
export PATH=$PATH:/cygdrive/c/MSP430/mspgcc/bin
This line can also be added to the .profile startup file in your cygwin home directory (C:\cygwin\home\<YOUR USERNAME>\.profile
).
If your home directory is located elsewhere you can find it by starting cygwin and running cd
followed by pwd
.
When programming the ESB sensor nodes it is very useful to have an operating system that takes care of some of the low-level tasks and also gives you as a programmer APIs for things like events, hardware and networking. We will use the Contiki operating system developed by Adam Dunkels, SICS, which is very well suited when programming small embedded systems.
The Contiki OS can be found at: http://www.sics.se/contiki/
Unzip the Contiki OS at (for example) C:\ and you will get the following directories among others:
Now everything necessary to start developing Contiki-based sensor net applications should be installed. Start cygwin and change to the directory contiki-2.x/examples/esb/
. Then call make beeper.esb
.
If you get an error about multiple cygwin dlls when compiling, you need to delete cygwin1.dll
from the MSP430 GCC toolchain (C:\MSP430\bin\cygwin1.dll
).
Connect a node and turn it on. Upload the test application by calling make beeper.u
.
make <SPEC>
will compile and make a executable file ready for sending to the ESB nodes. Depending on the SPEC
it might even startup the application that sends the executable to the node. Typically you would write things like "make beeper.u"
to get the file beeper.c
compiled, linked and sent out to the ESB node. cd <DIR>
change to a specified directory (same as in DOS) pwd <DIR>
shows your current directory ls
list the directory mkdir <DIR>
creates a new directory cp <SRC> <DEST>
copies a fileDownload the msp430-gcc, msp430-binutils, and msp430-libc packages from http://www.sics.se/~adam/contiki/freebsd-packages/. Install the packages (as root) with pkg_add
.
The Contiki ESB port comes with a small program, burn-nodeid
that semi-permanently stores a (unique) node ID number in the ESB EEPROM. When the Contiki ESB port boots up, this node ID is restored from the EEPROM. To compile and run this program, go into your project directory and run
make burn-nodeid.u nodeid=X
where X
is the node ID that will be burned into EEPROM. The burn-nodeid
program stores the node ID in EEPROM, reads it back, and writes the output to the serial port.
The ESB is equipped with an MSP430 microcontroller. The first step to getting started with Contiki for the ESB is to install the development tools for compiling Contiki for the MSP430.
For Windows users, see Setting up the Windows environment