Get and compile firmware for M3 and A8-M3 nodes
Difficulty: Medium
Duration: 20 minutes
Prerequisites: Configure SSH Access
Description: Contiki OS is an operating system designed for the particular requirements of Internet of Things (IoT) scenarios. The aim of this tutorial is to understand how to setup your environment and how to compile and use Contiki with M3 and A8-M3 nodes. For these nodes, Contiki needs the toolchain arm-none-eabi-gcc. The frontend SSH servers site provide this toolchain, hence we can use it.
- Setup your environment
ssh <login>@<site>.iot-lab.info <login>@<site>~$ git clone https://github.com/iot-lab/iot-lab.git Cloning into 'iot-lab'... ... <login>@<site>~$ cd iot-lab <login>@<site>:~/iot-lab$ make Welcome to the IoT-LAB development environment setup. targets: setup-wsn430 setup-openlab setup-contiki setup-riot setup-cli-tools setup-aggregation-tools pull
- Setup Contiki target
<login>@<site>:~/iot-lab$ make setup-contiki git clone https://github.com/iot-lab/contiki.git parts/contiki Cloning into parts/contiki... ... <login>@<site>:~/iot-lab$ cd parts/contiki
- We run a first example provided in parts/contiki/examples/iotlab/. View and analyse the source code of this example.
<login>@<site>:~/iot-lab/parts/contiki$ cd examples/iotlab/03-sensors-collecting/ <login>@<site>:~/iot-lab/parts/contiki/examples/iotlab/03-sensors-collecting$ cat README.md <login>@<site>:~/iot-lab/parts/contiki/examples/iotlab/03-sensors-collecting$ cat sensors-collecting.c
- Compile the example.
# M3 nodes target <login>@<site>:~/iot-lab/parts/contiki/examples/iotlab/03-sensors-collecting$ make TARGET=iotlab-m3 # A8-M3 nodes target <login>@<site>:~/iot-lab/parts/contiki/examples/iotlab/03-sensors-collecting$ make TARGET=iotlab-a8-m3 <login>@<site>:~/iot-lab/parts/contiki/examples/iotlab/03-sensors-collecting$ ls ... sensors-collecting.iotlab-m3 sensors-collecting.iotlab-a8-m3 ...
- Submit an experiment with one M3 node associated with this firmware, with the Web Portal, or with this CLI tool command:
iotlab-experiment submit -n contiki -d 15 -l 1,archi=m3:at86rf231+site=grenoble+mobile=0,sensors-collecting.iotlab-m3
- Once it’s running, connect to the serial link outup to read sensors values:
user@local:~$ ssh <login>@grenoble.iot-lab.info <login>@grenoble:~$ nc m3-1 20000