Testing Board Support Package with A8-M3 nodes


Difficulty: Medium

Duration: 30 minutes


Prerequisites: Configure SSH Access / Submit an experiment with A8 nodes using the web portal

Description: The aim of this first tutorial is to discover the OpenWSN port for IoT-LAB nodes. You will submit an experiment and book two A8 nodes on the Grenoble site. Once deployed, you will test board support package (BSP) with serial port and radio communication and print EUI64 nodes unique identifier.

  1. Log into the Webportal
  2. Select the tab “New Experiment”
  3. Configure schedule
    • Set an experiment name (no spaces nor funny chars in the experiment name)
    • Set a duration (e.g. 60 minutes)
    • Select “As soon as possible” = as soon as the nodes are available (the testbed scheduler takes the lead …)
  4. Select nodes
    • Architecture = a8 (at86rf231) / Site = grenoble / Number = 2
    • Click on “Add to experiment”
  5. Submit and get an experiment id
  6. From the Dashboard, select your experiment in the table and write down the hostnames of your nodes in the Node Column.For this tutorial we assume that you have the following A8 nodes : a8-7.grenoble.iot-lab.info and a8-8.grenoble.iot-lab.info
  7. Connect to the SSH frontend site
    my_computer$ ssh <login>@grenoble.iot-lab.info
  8. Download all openwsn tutorial firmwares and script. They must be placed in the A8 directory of your home directory (~/A8/)on the IoT-LAB frontend, this directory is automatically accessible from all A8 nodes of your experiment.
    <login>@grenoble:~$ cd A8
    <login>@grenoble:~/A8$ for name in 01bsp_uart_prog 01bsp_radio_tx_prog 01bsp_radio_rx_prog 01bsp_radio_rx.py 01bsp_eui64_prog; do wget https://raw.githubusercontent.com/wiki/iot-lab/iot-lab/firmwares/openwsn/$name; done
    <login>@grenoble:~/A8$ ls
    01bsp_eui64_prog     01bsp_radio_rx.py    01bsp_uart_prog
    01bsp_radio_rx_prog  01bsp_radio_tx_prog
  9. Note: When your experiment is Started, A8 nodes still needs some time to boot, it may take from 1 to 5 minutes depending on the platform activity. So be patient.
    <login>@grenoble:~$ ping node-a8-7
    PING node-a8-7.grenoble.iot-lab.info ( 56(84) bytes of data.
    64 bytes from node-a8-7.grenoble.iot-lab.info ( icmp_req=1 ttl=64 time=26.0 ms
    <login>@grenoble:~$ ssh root@node-a8-7
    ssh: connect to host node-a8-7.grenoble.iot-lab.info port 22: Connection refused
  10. SSH connect as root to one of your A8 board, the url is ‘node-a8-<num>
    <login>@grenoble:~$ ssh root@node-a8-7
  11. You can check that the firmware is indeed present in the A8 folder.
    root@node-a8-7:~# ls A8
  12. In this tutorial we will use the M3 subsystem of the A8 node in order to use serial port communication. When your experiment start, the M3 subsystem of your A8 node doesn’t run any firmware, so we need to flash openwsn bsp uart firmware
    root@node-a8-7:~# flash_a8_m3 A8/01bsp_uart_prog 
    Open On-Chip Debugger 0.7.0 (2014-10-16-11:55)
    Licensed under GNU GPL v2
    Return Value: 0
  13. Each A8 communicate with its M3 subsystem through a serial link named /dev/ttyA8_M3 (speed 500 kB/s). The firmware we flashed on the M3 in the previous step should print “Hello, World!” message and when you enter character echoes it back.
    root@node-a8-7:~/A8# socat  open:/dev/ttyA8_M3,b500000,echo=0,raw -
    Hello, World!
    Hello, World!
    Hello, World!
  14. Now we will test radio communication and use two A8 nodes with M3 802.15.4 radio subsystem. One of them will run the TX (a8-7), and the other will run the RX (a8-8) . Each 500ms, the TX sends a packet in the air. The RX listens to these packets and write in its serial port the lengthnumber, RSSI, LQI and CRC of each packet. We flash the corresponding firmware and you must open a new terminal with a8-8 node prompt.
    root@node-a8-7:~# flash_a8_m3 A8/01bsp_radio_tx_prog
    my_computer$ ssh <login>@grenoble.iot-lab.info
    <login>@grenoble:~$ ssh root@node-a8-8
    root@node-a8-8:~# flash_a8_m3 A8/01bsp_radio_rx_prog
    root@node-a8-8:~# python A8/01bsp_radio_rx.py
    ___                 _ _ _  ___  _ _ 
    | . | ___  ___ ._ _ | | | |/ __>| \ |
    | | || . \/ ._>| ' || | | |\__ \|   |
    `___'|  _/\___.|_|_||__/_/ <___/|_\_|
         |_|                  openwsn.org
    Are you running on IoT-LAB nodes ? (Y|N): Y
    Enter mote name ? (e.g. wsn430-35): a8-8
    len=127 num=85 rssi=-49 lqi=1 crc=1
    len=127 num=86 rssi=-49 lqi=1 crc=1
    len=127 num=87 rssi=-49 lqi=1 crc=1
    len=127 num=88 rssi=-49 lqi=1 crc=1
    len=127 num=89 rssi=-49 lqi=1 crc=1
    len=127 num=90 rssi=-49 lqi=1 crc=1
    len=127 num=91 rssi=-49 lqi=1 crc=1
  15. For finishing the tutorial we will print node EUI64 unique identifier on the serial port. You can find an explanation of EUI64  numbering convention here.
    root@node-a8-7:~# flash_a8_m3 A8/01bsp_eui64_prog
    root@node-a8-7:~# socat  open:/dev/ttyA8_M3,b500000,echo=0,raw -


Congratulations, you finished the first OpenWSN tutorial !