-
Several AGILE Gateways (makers version, RaspberryPi) are deployed and available in the Saclay site testbed
-
Also available on the same IoT-Lab site: hundreds of IoT-Lab M3 nodes, with bare-metal access. IoT-Lab M3 are custom nodes which communicate via IEEE 802.15.4 wireless transcievers. Other types of nodes, commercially available, are also available on IoT-lab: Nordic nrf52dk (BLE wireless transciever), Nordic nrf52840dk (BLE and IEEE 802.15.4 wireless transcievers), ST B-L072Z-LRWAN1 (LoRa wireless transciever), Zolertia Firefly (IEEE 802.15.4 and subGHz wireless transcievers).
-
An AGILE Gateway (
agile-pi-3
) uses IEEE 802.15.4 to communicate with IoT-lab nodes. It is connected via serial USB to an Atmel SAMR21 board which offers IEEE 802.15.4 wireless connection. The attached SAMR21 board can either be used from the Pi as client node, or as border router (see below). The other AGILE gateways use instead Bluetooth Low Energy (BLE) to connect to IoT-lab nodes.
Each AGILE Gateway deployed on IoT-Lab is accessible online, as described below.
Follow these steps to set up access to the AGILE Gateways on the IoT-Lab testbed.
AGILE software is installed and running on agile-pi-2
, agile-pi-3
and agile-pi-5
gateways but cannot be
accessed directly from the web, for security reasons.
For examples, to access AGILE OS running on agile-pi-2, you need to start an SSH tunnel
between your local computer and the AGILE gateway.
You can set this up from your command line on your local computer with the command:
ssh -L8080:localhost:8080 -L8000:localhost:8000 \
-L1880:localhost:1880 -L8083:localhost:8083 -L8086:localhost:8086 \
-L3000:localhost:3000 -L2000:localhost:2000 agile-pi-2
At this point, you can access AGILE OS from your local computer, in a browser, at http://localhost:8000
Using AGILE gateway agile-pi-2
and Nordic nrf52dk boards available on IoT-lab.
Preliminary: you must either have the necessary toolchain to compile RIOT, or a VM as described in the RIOT Tutorial.
Clone the repositories and jump into the right directory using the following command in your terminal:
git clone https://github.com/Agile-IoT/iotp-ble-riot.git && cd iotp-ble-riot && git clone https://github.com/RIOT-OS/RIOT.git && cd RIOT && git checkout 83abf11f2f56dbf389edde66f89f891ec7a7929e && cd ..
Compile RIOT for the Nordic nrf52dk board by typing the following command in your terminal:
BOARD=nrf52dk make
The result of this compilation is the firmware eid_ble.elf
located in bin/nrf52dk/
.
Using the IoT-lab webportal book an nrf52dk node, flash it with the firmware eid_ble.elf
and run that by launching an experiment with this node.
In your terminal, login via ssh
to the IoT-lab frontend (ssh [email protected]
) and connect to the UART output of the node to with the command nc nrf52dk-1 20000
(assuming the node you booked is nrf52dk-1).
You are now in the RIOT shell, running on the nrf52dk. In the shell, type reboot
and then help
to see the prompt and the available commands.
See this guide for further instructions.
In another terminal, type the below command to pen an SSH tunnel to the gateways to map Agile OS local ports on your local host:
ssh -L8080:localhost:8080 -L8000:localhost:8000 \ -L1880:localhost:1880 -L8083:localhost:8083 -L8086:localhost:8086 \ -L3000:localhost:3000 -L2000:localhost:2000 agile-pi-2
- In your browser, launch AGILE OS by accessing http://localhost:8000
- Open the device manager (in the top left drop-down menu), discover and register to the device named
SensorTag RIOT
. - Take a look at sensor data received in real time, by clicking on
Devices
then onView Data
on the registered SensorTag RIOT node.
AGILE gateways agile-pi-2
and agile-pi-3
can use their attached Atmel SARM21 xpro board as a
IPv6 border router between the IEEE 802.15.4 wireless network used between IoT-Lab nodes and the
AGILE gateway, as described below.
If you do not have one already, create your account on the IoT-Lab testbed and learn how to use it by following the online tutorials.
We assume basic RIOT git and toolchain setup on your local computer. For newbies, we recommend following the beginning of this tutorial (you can stop after completing Task 1).
Follow these steps to setup and start using an 6LoWPAN border router on a SAMR21 board attached to the AGILE Gateway in IoT-Lab.
This can only be performed on agile-pi-5
.
- Open an SSH tunnel to the gateways to map Agile OS local ports on your local host:
ssh -L8080:localhost:8080 -L8000:localhost:8000 \ -L1880:localhost:1880 -L8083:localhost:8083 -L8086:localhost:8086 \ -L3000:localhost:3000 -L2000:localhost:2000 agile-pi-5
- Ensure the SensorTag is up and listening to BLE incoming connections
- From you host, login AgileOS at http://localhost:8000
- Open the device manager, register and connect to the SensorTag device
- Open NodeRed and import the preconfigured
Library/test_sensortag_mqtt
flow - Verify everything is connected correctly (websockets for sensortag and mqtt clients to iot.eclipse.org)
- Use Mosquitto MQTT client to subscribe to available topics:
mosquitto_sub -h iot.eclipse.org -t saclay/agile/sensors/temperature mosquitto_sub -h iot.eclipse.org -t saclay/agile/sensors/humidity
In the near-future, we plan to :
- instead of SAMR21, use the Libelium Hat + 802.15.4 Shield, or an OpenLabs dongle on the AGILE gateways following these steps
- Switch from Raspbian to ResinOS