Skip to content

Running our Hello world in F I T IOT‐LAB

Rukshan Perera edited this page Nov 25, 2023 · 3 revisions

Hello world

TLDR;

Tip

  1. Clone the repo ideally to the home folder in a SSH from end of the IOT test bed
  2. git submodule update --init
  3. Change the site SENSE_SITE here in setup_env.sh
  4. Run the command make hello from the sense home directory.
  5. If the default nodes are busy, change the initial node number here setup_env.sh#L6

This is the simple Hello World application in RIOT of examples. But since we have our own environment setup and scripts set to run the sense project, it is good to start with the Hello World tutorial first.

IOT Lab design

First, create an account and ensure you have access to the FIT IOT-Lab SSH frontend if you don't know about FIT IOT-Lab check out their design here. https://www.iot-lab.info/docs/getting-started/design/

SSH access

Use this link to set SSH access to IOT Lab SSH access.

We are following the rest of the guidance, assuming you have SSH front-end access. Therefore make sure you have SSH setup correctly. Once you have SSH access, you can return here to run a hello experiment.

This is the fundamental IOT Testbed tutorial getting-started which will help you to achieve the same.

IOT testbed workspaces

IOT Test bed provide more workspace even notebooks. It is worth checking them here.

Cloning

Get sense repository

From an SSH frontend clone this repository. Just to make it simple in this example, let's clone our repository in the home folder of the IOT Lab.

git clone git@github.com:KRVPerera/sense.git

Getting RIOT OS

We already have RIOT OS as a submodule in our code. You can run the below command to make sure to get the RIOT code base.

cd sense
git submodule update --init

Note

Our repository is pointing to the RIOT OS branch 2020.10-branch which was recommended by the IOT test bed by the time we wrote this wiki. But > you can easily go to external/RIOT and do all the normal things a git repository can do, like switching to the master branch.

Hello

Warning

At this moment make sure you are logged into the SSH front end (SSH access) and logged in at least once using the below command.

iotlab-auth -u <login>

setup

We have a small bash script setup_env.sh which setup most the things automatically. But you have to guide it.

As you may already know IOT testbed has many sites. lille, grenoble, paris, saclay, strasbourg and toulouse. Check out the links as they may have more by the time you read this.

Based on the site you used to log into from ssh from the end make sure it has iotlab-m3 boards because that is what we are using for the project.

First change line line in the setup_env.sh file.

export SENSE_SITE=paris

Choose one of the iotlab-m3 node ids available on the site and assign it in the same file as below. We are using a few more nodes by incrementing this number you provide so make sure there are a few more nodes after that. Read this to understand about searching nodes. resources

export BORDER_ROUTER_NODE=60 # Border router

Finally

Now, from within the sense project home folder. Just run make hello. You should see the firmware building and running as an experiment in the IOT test bed. You should see below the hello message being printed on the shell. You can type ctrl+c to exit the shell.

#-------------------------------------------------------#
#----- This is group 12 talking Hello world - (   1)  --#
#-------------------------------------------------------#

You are running RIOT on a(n) iotlab-m3 board.
This board features a(n) stm32 MCU.

#-------------------------------------------------------#
#----- This is group 12 talking Hello world - (   2)  --#
#-------------------------------------------------------#

You are running RIOT on a(n) iotlab-m3 board.
This board features a(n) stm32 MCU.
^C
Waiting that experiment 384685 gets in state Running,Terminated,Stopped,Error
Job ID 384685 State: "Running"
Stopping Job ID 384685
{
    "id": 384685,
    "status": "Delete request registered"
}

No errors

You are good to go for the project setup.

Have errors

If you had trouble please follow this simple example given by FIT IOT LAB first to get an idea. Then you will understand your issue. https://www.iot-lab.info/learn/getting-started/microcontroller/