Use Microchip SAMR21 Xplained Nodes

level Level: Easy

duration Duration: 20 minutes

Prerequisites: Configure SSH Access, Experiment CLI client, Node CLI client

Description: This document shows how to use the Experiment CLI Tool utility from the SSH frontend to interact with the Microchip SAMR21 Xplained nodes available on IoT-LAB. You will learn how to list available Microchip SAMR21 Xplained, start an experiment, and interact with the nodes. This tutorial uses the Microchip SAMR21 nodes available on the Saclay site.



Initialize your environment

Connect to the SSH frontend and get some help :

my_computer$ ssh <login>

If you have not authenticated yet using iotlab-auth, do it now:

<login>@saclay:~$ iotlab-auth -u <login>

List available custom nodes

Available Microchip SAMR21 Xplained nodes can be listed using the iotlab-experiment command with the archi and site option

<login>@<site>:~$ iotlab-experiment info -l --archi samr21 --site saclay
        "archi": "samr21:at86rf233",
        "mobile": 0,
        "mobility_type": " ",
        "network_address": "",
        "site": "saclay",
        "state": "Alive",
        "uid": " ",
        "x": "1",
        "y": "53.8",
        "z": "4"

Submit an experiment on SAMR21 nodes

Now that the available SAMR21 nodes on a site are known, one can submit an experiment on Saclay site nodes listed above, for example samr21-1 to samr21-6.

For this experiment, download the provided example firmware based on Riot.

<login>@saclay:~$ wget -P ~/.

To reserve the SAMR21 nodes, iotlab-experiment can be invoked in 2 ways:

  • Using the nodes id list, here it’s samr21,1-6:
    <login>@saclay:~$ iotlab-experiment submit -d 60 -l saclay,samr21,1-6,~/samr21-default.elf
        "id": 53913
  • Using the nodes architecture, here it’s archi=samr21:at86rf233:
    <login>@saclay:~$ iotlab-experiment submit -d 60 -l 6,archi=samr21:at86rf233+site=saclay,~/samr21-default.elf
        "id": 53914

    Now wait until the experiment is ready, e.g nodes are reserved and flashed with the given firmware.

    <login>@saclay:~$ iotlab-experiment wait
    Waiting that experiment 53914 gets in state Running

Interact with the SAMR21 nodes

Similar to the IoT-LAB M3 nodes, use nc on port 20000 to interact with any reserved node:

<login>@saclay:~$ nc 20000

and play with the Riot shell:

> help
Command              Description
reboot               Reboot the node
ps                   Prints information about running threads.
at30tse75x           Test AT30TSE75X temperature sensor
rtc                  control RTC peripheral interface
ifconfig             Configure network interfaces
txtsnd               Sends a custom string as is over the link layer
saul                 interact with sensors and actuators using SAUL

You can access to the IEEE 802.15.4 interface of the board (using an AT86RF233 transceiver) via the ifconfig:

> ifconfig
Iface  4   HWaddr: f5:d2  Channel: 26  Page: 0  NID: 0x23
           Long HWaddr: 5a:47:37:65:93:b1:f5:d2 
           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
           ACK_REQ  CSMA  
           Source address length: 2          

All SAMR21 nodes in Saclay are equipped with the Microchip I/O Xplained extension board (which is the case here), you should be able to query the temperature sensor via the saul command or play with the on board LEDs/Buttons:

> saul                                                                   
ID	Class		Name
#0	SENSE_TEMP	Temperature (IO1 Xplained)
#1	ACT_SWITCH	LED (IO1 Xplained)
#2	ACT_SWITCH	GPIO1 (IO1 Xplained)
#3	ACT_SWITCH	GPIO2 (IO1 Xplained)
#4	ACT_SWITCH	LED(orange)
#5	ACT_SWITCH	Button(SW0)
> saul read 0
saul read 0
Reading from #0 (Temperature (IO1 Xplained)|SENSE_TEMP)
Data:	[0] 26.81°C