A8 OpenWSN tutorial


It's highly recommend to read the page indicating in the link below besides reading the tutorial on this page. The link provided additional tools and tips for conducting experiment on IoT-Lab with A8 nodes.


Compile firmware for A8 and Copy them to Home Directory 

Running following command in your command line.

$ scons board=iot-lab_A8-M3 toolchain=armgcc oos_openwsn
$ pscp 03oos_openwsn_prog* <login>@grenoble.iot-lab.info:A8/
Thing in A8 Directory is mount and shared by all experiment A8 nodes

Clone the openwsn-sw repository to A8

Connect to the frontend SSH of grenoble site and install openwsn-sw in the directory A8 of your home directory

<your computer>:~$ ssh -L 1234:localhost:1234 <login>@grenoble.iot-lab.info
<login>@grenoble:~$ mkdir A8/openwsn
<login>@grenoble:~$ cd A8/openwsn
<login>@grenoble:~/A8/openwsn$ git clone https://github.com/openwsn-berkeley/openwsn-sw.git

Patch moteProbe.py with right name for serial ports

<login>@grenoble:~/A8/openwsn$ vi openwsn-sw/software/openvisualizer/openvisualizer/moteProbe/moteProbe.py 
elif os.name=='posix':
    if platform.system() == 'Darwin':
        portMask = '/dev/tty.usbserial-*'
        portMask = '/dev/ttyUSB*'
    #serialports = [(s,BAUDRATE_GINA) for s in glob.glob(portMask)]
    serialports = [("/dev/ttyA8_M3", 500000)]

This code will be merged into openwsn develop repository. Remove this steps after it's done.

Launch an experiment with two A8 nodes with a duration of one hour

add your credentials for REST API access (just the first time you use CLI tools)

<login>@grenoble:~$ auth-cli -u <login>

submit experiment

<login>@grenoble:~$ experiment-cli submit -d 60 -l 2,archi=a8:at86rf231+site=grenoble

Get the A8 experiment nodes id

<login>@grenoble:~$ experiment-cli get -p
    "deploymentresults": {
        "0": [

Wait A8 nodes boot and try ssh connexion. Choose a dag root node (in this example a8-8 node)

<login>@grenoble:~$ ssh root@node-a8-8

Flash firmware on the M3 nodes

Login A8–8 and A8-9 node and flash without dagroot firmware.

<login>@grenoble:~$ ssh root@node-a8-8
root@node-a8-8:~# flash_a8_m3 A8/03oos_openwsn_prog.exe
<login>@grenoble:~$ ssh root@node-a8-9
root@node-a8-9:~# flash_a8_m3 A8/03oos_openwsn_prog.exe

Launch openvisualizer on two A8 nodes

root@node-a8-8:~/A8/openwsn/openwsn-sw/software/openvisualizer# scons runcli
root@node-a8-9:~/A8/openwsn/openwsn-sw/software/openvisualizer# scons runcli

Set one node as dagroot 

In node-a8-8 node, set it as dagroot will following command in openvisualizer.

root /dev/ttyA8_M3

ping node-a8-9 from dagroot node

You can ping the node-a8-9 after you see the DAO information from it. Open another terminal to use the ping6 command.

<login>@grenoble:~$ ssh root@node-a8-8
root@node-a8-8:ping6 bbbb::(eui64_a8-9)

Openvisualizer Web Interface

The web interface of Openvisualzier shows the status of a node. It's also possible to use web interface through port forwarding to see the A8 nodes on your computer, even most time they are controlled through terminal.

Login to IoT-Lab through putty as shown in Running a Network to tunnel port 1234 from the server to the host.

Login to A8 nodes through ssh to tunnel port 1234 from node to the server.

<login>@grenoble:~$ ssh -L 1234:localhost:1234 root@node-a8-8

Run Openvisualzier 

root@node-a8-8:~/A8/openwsn/openwsn-sw/software/openvisualizer# scons runweb --port=1234

Then open your browser and enter: localhost:1234, you will see the web interface of Openvisualizer. There are less information tranmistted through A8 node when they are de-synchronized.

See the node as dagroot through openvisualizer terminal, you will see more information showing on the web interface.

Program Multiple A8 nodes on IoT-Lab

Currently, there is no way to local the firmware of A8 through IoT-Lab web interface (A8 node is using M3 firmware, the website doesn't allow the A8 nodes associate to M3 firmware). But we can program it through terminal as this tutorial shows.

When programming multiple A8 nodes, it required to login to each nodes to flash the node, which will take lots of repeat work if the number if large. There is a way to use ssh to issue remote command to program one A8 node as shown below. 

ssh root@node-a8-9  'source /etc/profile; flash_a8_m3 A8/03oos_openwsn_prog.exe'
The command source /etc/profile to load the environment variable on node side so the node is able to find the software (openocd) to program. Or, the flash_a8_m3 command will complain about it can't find the "openocd".
To program multiple A8 nodes, you can write down one line code listing above for each node and stores them in a shell script. Once you need to program those A8 nodes, you just need to run the shell script.
The following reference provides multiple tools for conducting experiment on IoT-Lab with A8 nodes. There are also tips provided there. It's helpful to read those content before conducting the experiment.