This project focuses on the transmission of sensor data from the IoT testbed server to a cloud-based storage system. The primary objective is to establish a seamless and efficient communication channel that enables the transfer of valuable sensor information from the IoT testbed to the cloud infrastructure. By implementing this connectivity, the project aims to facilitate centralized storage and analysis of sensor data, enhancing accessibility and scalability for future applications and research endeavors within the Internet of Things (IoT) domain.
git clone git@github.com:Mobusshar/iot-project-msc-oulu-2024.git
git clone https://github.com/RIOT-OS/RIOT.git
Go to the directory
cd RIOT/
Checkout to a previous version branch to avoid any unexpected error by using this command
git checkout 2022.01
For the last part of the project, we need to setup an AWS and after that, we have a server to get data from the IoT testbed. so in order to do that we need to setup a server and I will explain the steps through it.
A virtual private cloud (VPC) is a secure, isolated private cloud hosted within a public cloud. VPC customers can run code, store data, host websites, and do anything else they could do in an ordinary private cloud, but the private cloud is hosted remotely by a public cloud provider. So we need to create VPC after the account setup in AWS. For VPC setup we need to take care of the IPv6 CIDR block.
We created two subnets one for the public for apps and everything that can be public and one private just in case of things we do not want to everyone have access to it.
So you need an internet gateway before the instance works.
Then you need to attach VPC to the Internet gateway but there will be a last step before you set things up and it is :
for each subnet, you need to create a route table.
Now you can get access to the EC2 instance and it is ready
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Test the docker container by this command
sudo docker run hello-world
Install node-red container in the EC2 instance by using this command
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red
Install influxdb container on the ec2 instance
docker run --detach --name influxdb -p 8086:8086 influxdb:2.2.0
Create 3 nodes. 1 A8 nodes and 2 m3 nodes
In the end your experiment will look something like this
These three node ids will be used later in the commands so please replace with your created node ID from the IoT-test server
source /opt/riot.source
To build a border router firmware run this
make ETHOS_BAUDRATE=500000 DEFAULT_CHANNEL=<channel> BOARD=iotlab-m3 -C RIOT/examples/gnrc_border_router clean all
To flash the border router firmware
iotlab-node --flash RIOT/examples/gnrc_border_router/bin/iotlab-m3/gnrc_border_router.elf -l grenoble,m3,<node-id>
Set up the Border Router Network by picking an IPv6 address (like 2001:660:5307:3100::/64)
sudo ethos_uhcpd.py m3-<node-id> tap0 2001:660:5307:3100::1/64
Now in another terminal ssh into the A8 node
ssh root@node-a8-<node-id>
Check the ifconfig of the A8 node
Go into this directory A8/mosquitto_bridge
Run the broker
broker_mqtts config.conf
Stop the service in another terminal Add your IPV6 instance on the mosquitto.config file
Start the mosquitto service again
mosquitto -c mosquitto.config
Here we are making ready another m3 node to do the test
make DEFAULT_CHANNEL=<channel> SERVER_ADDR=2001:660:5307:3000::67 EMCUTE_ID==station0 BOARD=iotlab-m3 -C . clean all
Then flash the other m3 node
iotlab-node --flash ./bin/iotlab-m3/SensorNode.elf -l grenoble,m3,<node-id>
This is to check the sensor data from the RIOT server
nc m3-<node-id> 20000
Consider writing reboot if it says unable to connect
MIT License
Merged Group Number 29 & 40
Email: mislam23@student.oulu.fi Student id:2305578
Email:mmehrpou23@student.oulu.fi Student id:2305003
Email: mlange23@student.oulu.fi Student id:2308245