Running IPv6/TSCH/RPL network with A8-M3 nodes

 

Difficulty: High

Duration: 45 minutes

Prerequisites: Configure SSH Access / Get and compile firmware for M3 and A8-M3 nodes / Testing Board Support Package with A8-M3 nodes

Description: The aim of this tutorial is to discover the setup of OpenWSN mesh network on the Internet with IPv6 over TSCH. You will book some A8 nodes on the Saclay site, set them up with flashing two provided firmwares on the A8-M3 nodes, and create a simple IPv6 network in IoT-LAB.

  1. Log into the Web portal with your account credentials
  2. Submit a new experiment:
    • Duration: 60 minutes and starting “As soon as possible
    • Choose ten nodes:
      • Archi = a8:at86rf231 / Site = saclay / Number = 3 / Mobile = no
      • Click on “Add to experiment”
    • Click “Submit experiment” and get an experiment id
  3. Click on the experiment in the dashboard list, and make a note of the node id, while you wait for the experiment to become running. For this tutorial we assume that you have the following A8 nodes : a8-7.saclay.iot-lab.info,
    a8-8.saclay.iot-lab.info, a8-9.saclay.iot-lab.info
  4. Setup OpenWSN environment and compile firmware on SSH frontend. (A8 directory is shared by each A8 nodes experiment with NFS mount during boot)
    my_computer$ ssh <login>@saclay.iot-lab.info
    <login>@saclay:~$ cd A8
    <login>@saclay:~/A8$ mkdir openwsn
    <login>@saclay:~/A8$ cd openwsn
    <login>@saclay:~/A8/openwsn$ git clone https://github.com/openwsn-berkeley/openwsn-fw.git
    <login>@saclay:~/A8/openwsn$ git clone https://github.com/openwsn-berkeley/openwsn-sw.git
    <login>@saclay:~/A8/openwsn$ git clone https://github.com/openwsn-berkeley/coap.git
    <login>@saclay:~/A8/openwsn$ cd openwsn-fw
    <login>@saclay:~/A8/openwsn/openwsn-fw$ git checkout -b REL-1.10.0 REL-1.10.0
    <login>@saclay:~/A8/openwsn/openwsn-fw$ scons board=iot-lab_A8-M3 toolchain=armgcc oos_openwsn
    <login>@saclay:~/A8/openwsn/openwsn-fw$ cp build/iot-lab_A8-M3_armgcc/projects/common/03oos_openwsn_prog ~/A8/
  5. Choose one A8 node (a8-7 in our example) in your nodes list to implement the A8-M3 dag root node. A8 nodes still needs some time to boot, so be patient and try ssh connexion.
     <login>@saclay:~$ ssh root@node-a8-7
     root@node-a8-7:~#
  6. Flash firmware on the M3 node
    root@node-a8-7:~# flash_a8_m3 A8/03oos_openwsn_prog
    
  7. Launch openvisualizer (command-line mode) and set M3 node as dag root
    NOTE: Currently you must patch OpenVisualizer code because of serial port detection. (comment moteProbe.py class line 71 and replace portMask variable)

    root@node-a8-7:~$ cd ~/A8/openwsn/openwsn-sw/software/openvisualizer
    root@node-a8-7:~/A8/openwsn/openwsn-sw/software/openvisualizer$ git checkout -b REL-1.10.0 REL-1.10.0
    root@node-a8-7:~/A8/openwsn/openwsn-sw/software/openvisualizer$ vi openvisualizer/moteProbe/moteProbe.py
    ....
     elif os.name=='posix':
            if platform.system() == 'Darwin':
                portMask = ['/dev/tty.usbserial-*']
            else:
                #portMask = ['/dev/ttyUSB*', '/dev/ttyAMA*', '/dev/ttyA8_M3']
                portMask = ['/dev/ttyUSB*', '/dev/ttyAMA*']
            for mask in portMask :
                serialports += [(s,BAUDRATE_GINA) for s in glob.glob(mask)]
    ....
    root@node-a8-7:~/A8/openwsn/openwsn-sw/software/openvisualizer# scons runcli
    scons: Reading SConscript files ...
    
     ___ _ _ _ ___ _ _ 
    | . | ___ ___ ._ _ | | | |/ __>| \ |
    | | || . \/ ._>| ' || | | |\__ \| |
    `___'| _/\___.|_|_||__/_/ <___/|_\_|
     |_| openwsn.org
    
    scons: done reading SConscript files.
    ...
    created following virtual interface:
    7: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
     link/none 
     inet6 bbbb::1/64 scope global 
     valid_lft forever preferred_lft forever
     inet6 fe80::1/64 scope link 
     valid_lft forever preferred_lft forever
    15:23:36 INFO create instance
    15:23:36 INFO create instance
    15:23:36 INFO create instance
    
    OpenVisualizer (type "help" for commands)
    > root /dev/ttyUSB1
  8. Open a new terminal on a8-8 node. Flash the firmware on A8-M3 node and launch OpenVisualizer (command-line mode)
    <login>@saclay:~$ ssh root@node-a8-8
    root@node-a8-8:~# flash_a8_m3 A8/03oos_openwsn_prog
    root@node-a8-8:~# cd A8/openwsn/openwsn-sw/software/openvisualizer/
    root@node-a8-7:~/A8/openwsn/openwsn-sw/software/openvisualizer# scons runcli
  9. View and note on the a8-7 node OpenVisualizer console the a8-8 EUI64 node identifier
    > root /dev/ttyUSB1
    
    received RPL DAO from bbbb:0:0:0:543:32ff:03de:b061
    - parents:
     bbbb:0:0:0:543:32ff:03da:a758
    - children:
  10. Ping the a8-8 node from the a8-7 dagroot node. OpenVisualizer runs by default a tun interface with an IPv6 private subnet network (bbbb::/64).  An IPv6 node address should be construct like this bbbb::eui64
    <login>@saclay:~$ ssh root@node-a8-7
    root@node-a8-7:~# ping6 bbbb::543:32ff:3de:b061
    PING bbbb::0543:32ff:03de:b061 (bbbb::543:32ff:3de:b061): 56 data bytes
    64 bytes from bbbb::543:32ff:3de:b061: seq=0 ttl=64 time=1119.522 ms
    64 bytes from bbbb::543:32ff:3de:b061: seq=1 ttl=64 time=1120.101 ms