Submit an experiment with M3 nodes using the web portal

 

Difficulty: Easy

Duration: 20 minutes

Prerequisites: Configure SSH Access

Description: The aim of this first tutorial is to discover the IoT-LAB testbed tools by creating and submitting your first experiment, and then interact with running nodes. You will book two M3 nodes on the Grenoble site, set them up with a sample firmware file, and deploy it on nodes. Once deployed, you will hop onto the ssh frontend to interact with the firmware running on the nodes, read sensor values and send radio packets.

tuto_m3_exp

  1. Log into the Webportal
  2. Select the tab “New Experiment”
  3. Configure your experiment
    • Set an experiment name (no spaces nor funny chars in the experiment name)
    • Set a duration 20 minutes
    • Select “As soon as possible” = as soon as the nodes are available (the tesbed scheduler takes the lead …)
  4. Select your nodes.  Several ways are possible: by type, from maps.
    • Select checkbox “by type” : You just have to tell how many nodes of each kind you wish. On the example: 2 nodes on Grenoble site with archi = m3:at86rf231 (M3) / site = grenoble / number = 2, not mobilechoose_nodes_m3
    • If you check “from maps”: give the id of specific nodes in the box corresponding to the architecture and the site you want. You can also click on the name of the site. A 3D representation of the nodes topology will appear. Just click on the nodes you want to add to your experiment.

  5. Manage nodes – firmwares associations
      • Download the binary firmware for m3 nodes, or make your own one.
      • Upload this firmware (click button Browse…)
      • Select nodes & firmware in displayed lists
      • Click the Add Association button to associate the firmware with the nodes

    associations

  6. Submit your experiment. You get an experiment id.
  7. From the Dashboard, wait for the experiment state switch to  “Running” and select your experiment in the tabledasboard
  8. Write down the hostnames of your nodes in the Node column. Verify that you have “Success”  in experiment deployment results.experiment_details_m3
  9. Connect to the SSH frontend of Grenoble (or of the site where your experiment is running):
    my_computer$ ssh <login>@grenoble.iot-lab.info
  10. Interact with your M3 node.
    Provided firmwares offer an interaction menu via the serial port of the device. The serial port is available from the ssh frontend through a TCP socket on port 20000. You can use netcat for example, with nc <device hostname> 20000.

    <login>@grenoble:~$ nc m3-<id> 20000 
    
     IoT-LAB Simple Demo program
     Type command
        h:    print this help
        t:    temperature measure
        l:    luminosity measure
        p:    pressure measure
        u:    print node uid
        d:    read current date using control_node
        s:    send a radio packet
        b:    send a big radio packet
        e:    toggle leds blinking
     Type Enter to stop printing this help
     cmd >
  11. Test some commands to get sensors measures (t, l, p)
    cmd > l
    Luminosity measure: 7.324219E-1 lux
  12. Test packet sending
    • Open a second terminal to connect to the serial port of another node
    • Make one of the nodes send a radio packet:
      <login>@grenoble:~$ nc m3-<id1> 20000
      cmd > s
      cmd >
      radio > Packet sent
    • Check that the other node has received the radio packet:
      <login>@grenoble:~$ nc m3-<id2> 20000
      cmd >
      radio > Got packet from A569. Len: 16 Rssi: -66: 'Hello World!: 0'

To avoid opening as many terminals as nodes, use our serial_aggregator tool.

Go further

Practical Tips

  • Get M3 UID(s) for Grenoble site
    • See documentation here
  • Access M3 serial port directly from your computer
    • Open a SSH tunnel between your computer and the M3 node
      ssh -L 20000:m3-<id>:20000 <login>@grenoble.iot-lab.info
    • In another terminal, run nc locally as if you were on the ssh frontend.
      nc localhost 20000