Wasp Mote Runner

From Glacsweb Wiki
Jump to: navigation, search

Instructions compiled from the technical documentation and other sources when needed.

Basic Install

  • install deps
sudo apt-get install mono-mcs mono-xsp2 mono-xsp2-base
  • install jdk
  • Download mote runner sdk from the IBM site
  • Extract to /opt
  • Add the following to /etc/bash.bashrc (that way it works for all users)
export PATH=$PATH:/opt/moterunner/linux64/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/moterunner/linux64/bin

Install AVR programmer

SUBSYSTEM!="usb", ACTION!="add", GOTO="avrisp_end"
# Atmel Corp. JTAG ICE mkII
ATTR{idVendor}=="03eb", ATTRS{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
ATTR{idVendor}=="03eb", ATTRS{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
ATTR{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="660", GROUP="dialout"

  • Restart udev
sudo service udev restart

Flash mote

Remove the radio first! This is only needed once for new nodes.

cd /opt/moterunner/firmware/
avrdude -cavrispmkII -pm1281 -P usb -b 115200 -e -u -U efuse:w:0xFF:m -U hfuse:w:0xD0:m -Ulfuse:w:0xFF:m
avrdude -cavrispmkII -pm1281 -P usb -b 115200 -U flash:w:waspmote.hex

Replace the radio and sticker

Compile MRv6

cd /opt/moterunner/examples/mrv6/src
make clean
make doc

Adding code to the nodes

Run mrsh

source examples/mrv6/lib/js/mrv6.js

mote-create -p /dev/ttyUSB0
v6-config --RADIO_SELECT=2 --CHANNEL 0 

(this last line is essential for the 868MHz radios)


source examples/mrv6/lib/js/mrv6.js 
v6-setup --MAX_MOTES=4 --RADIO_SELECT=2 --CHANNEL 0 
moma-load mrv6-edge
moma-ipv4 --ip x.x.x.x --subnwMask m.m.m.m --gateway y.y.y.y --udp 9999

Other nodes

moma-load mrv6-lib

Load an example code

cd /opt/moterunner/examples/mrv6/apps/reply
mote-create -p /dev/ttyUSB0
moma-load reply

Starting gateway

cd /opt/moterunner/examples/mrv6/tunnel
./tunnel --waspmote <ip>:<port>
use for additional debug
chmod +x router_setup_linux_ipv6.sh

The above file is where you choose the subnet for your nodes

Then run


The tunnel output should then give you a v6 address in the node list which you should be able to ping6

cd /opt/moterunner/
source examples/mrv6/lib/js/mrv6.js
mote-create -i <ip>:<port>

This will create a link to the real node

Instead use network list to find out the short name. This will give an output along the lines of

Mote-Abbrev  Name          State  Connection              Uniqueid                 Addresses
u0,w0  on     UDP:  02-00-00-00-47-AC-67-2F  udp://

Then use the mote-abbrev given for the following command


General Notes

Thanks to Alexandru @ IBM MoteRunner for these

  • If no node address is specified the command runs on all available nodes.
  • You can always address a mote with the short name, the mote's full EUI, or the mote's unique least significant bytes (as hex) from the EUI

Sticker code

  • Orange - had firmware flashed
  • Green - gateway