2015-03-18 19:03:26 +01:00
|
|
|
# RIOT integration into IoT-LAB
|
|
|
|
|
|
|
|
Check the Wiki to see how to build and run RIOT on FIT IoT-LAB:
|
|
|
|
https://github.com/iot-lab/iot-lab/wiki/Riot-support
|
|
|
|
|
|
|
|
## Control IoT-LAB via Make
|
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
|
|
|
This feature requires to have a valid account for the FIT IoT-LAB
|
|
|
|
(registration there is open for everyone) and the
|
|
|
|
[iot-lab/cli-tools](https://github.com/iot-lab/cli-tools) to be installed.
|
|
|
|
|
|
|
|
### Description
|
|
|
|
|
|
|
|
The folder `dist/testbed-support/` contains a `Makefile.iotlab` that defines
|
|
|
|
some targets to control RIOT experiments on IoT-LAB using the GNU Make build
|
|
|
|
system. In order to use this, one has to include this Makefile at the end of
|
|
|
|
the application's Makefile, like this:
|
|
|
|
```
|
2015-07-05 00:54:06 +02:00
|
|
|
include $(RIOTBASE)/dist/testbed-support/Makefile.iotlab
|
2015-03-18 19:03:26 +01:00
|
|
|
```
|
|
|
|
### Variables
|
|
|
|
|
|
|
|
This Makefile introduces some additional variables (default values in
|
|
|
|
brackets):
|
|
|
|
* IOTLAB_NODES (5)
|
|
|
|
* IOTLAB_DURATION (30 minutes)
|
|
|
|
* IOTLAB_SITE (grenoble.iot-lab.info)
|
|
|
|
* IOTLAB_TYPE (m3:at86rf231)
|
|
|
|
* IOTLAB_AUTH ($HOME/.iotlabrc)
|
|
|
|
* IOTLAB_USER (taken from $IOTLAB_AUTH)
|
|
|
|
* IOTLAB_EXP_ID (taken from first experiment in running state)
|
2015-09-07 10:23:05 +02:00
|
|
|
* IOTLAB_EXP_NAME (RIOT_EXP)
|
|
|
|
* IOTLAB_PHY_NODES
|
2016-09-01 14:10:22 +02:00
|
|
|
* IOTLAB_PROFILE
|
2015-10-31 21:33:41 +01:00
|
|
|
* IOTLAB_EXCLUDE_NODES
|
2016-04-19 18:19:56 +02:00
|
|
|
* IOTLAB_LOGGING
|
2020-01-21 14:59:21 +01:00
|
|
|
* IOTLAB_TMUX
|
2015-10-31 21:33:41 +01:00
|
|
|
|
|
|
|
### Format of a Resource ID
|
|
|
|
Both variables `IOTLAB_PHY_NODES` and `IOTLAB_EXCLUDE_NODES` use the resource id
|
2018-04-25 13:07:59 +02:00
|
|
|
string format as specified in the output of `iotlab-experiment submit --help`.
|
2015-10-31 21:33:41 +01:00
|
|
|
An example would be: 1-3+7+10-13
|
2015-03-18 19:03:26 +01:00
|
|
|
|
|
|
|
### Targets
|
|
|
|
|
|
|
|
It defines the following targets:
|
|
|
|
* iotlab-exp
|
|
|
|
* iotlab-flash
|
|
|
|
* iotlab-reset
|
|
|
|
* iotlab-term
|
|
|
|
|
|
|
|
**Please note:** All targets that require an already running experiment will
|
|
|
|
use the first experiment of the user that has already entered state "Running"
|
|
|
|
if `IOTLAB_EXP_ID` is not set.
|
|
|
|
|
|
|
|
#### iotlab-exp
|
|
|
|
|
|
|
|
This schedules a new experiment on the FIT IoT-LAB and waits until it enters
|
|
|
|
"Running" state. It will request `IOTLAB_NODES` nodes of type `IOTLAB_TYPE`
|
2016-09-01 14:10:22 +02:00
|
|
|
for `IOTLAB_DURATION` minutes at site `IOTLAB_SITE` using `IOTLAB_PROFILE`
|
|
|
|
(if provided). With `IOTLAB_PHY_NODES` it is possible to choose specific nodes
|
|
|
|
for this experiment by using the resource id string format as described above.
|
2015-09-07 10:23:05 +02:00
|
|
|
Note that the usage of `IOTLAB_PHY_NODES` ignores `IOTLAB_NODES`. It will also flash the
|
2015-03-18 19:03:26 +01:00
|
|
|
binary of the current application to all registered nodes. The name of the
|
2015-09-07 10:23:05 +02:00
|
|
|
experiment is set to "RIOT_EXP" or "RIOT_EXP_$(IOTLAB_EXP_NAME)"
|
|
|
|
if `IOTLAB_EXP_NAME` is defined.
|
2016-04-19 18:19:56 +02:00
|
|
|
If `IOTLAB_LOGGING` is set to `1`, then the output of all nodes will be logged on the server
|
|
|
|
into a file called "RIOT_LOG-<EXPNAME>-<EXPID>".
|
2015-03-18 19:03:26 +01:00
|
|
|
|
|
|
|
#### iotlab-flash
|
|
|
|
|
|
|
|
This target updates the application on all registered nodes of the given
|
|
|
|
experiment to the current version of the application.
|
2015-10-31 21:33:41 +01:00
|
|
|
Certain nodes can be excluded by listing them in the `IOTLAB_EXCLUDE_NODES` variable
|
2020-01-21 14:55:34 +01:00
|
|
|
using the resource id string format as described above.
|
2015-03-18 19:03:26 +01:00
|
|
|
|
|
|
|
#### iotlab-reset
|
|
|
|
|
|
|
|
This target resets all registered nodes of the given experiment.
|
2015-10-31 21:33:41 +01:00
|
|
|
Certain nodes can be excluded by listing them in the `IOTLAB_EXCLUDE_NODES` variable
|
2020-01-21 14:55:34 +01:00
|
|
|
using the resource id string format as described above.
|
2015-03-18 19:03:26 +01:00
|
|
|
|
|
|
|
#### iotlab-term
|
|
|
|
|
|
|
|
Uses ssh to login the user on the IoT-LAB server of the specified site and
|
|
|
|
start the `serial_aggregator` to communication with all registered nodes.
|
2016-04-19 18:19:56 +02:00
|
|
|
If `IOTLAB_LOGGING` is set to `1`, then closing the connection with `CTRL+C/D` will also quit
|
2020-01-21 14:59:21 +01:00
|
|
|
the logging process. If you enabled TMUX with `IOTLAB_TMUX`, detach from the
|
|
|
|
server-side tmux process with `CTRL+A-D` (or as defined in your server-side
|
|
|
|
`.tmux.conf` file)
|