Skip to content

duiliol/iot_exam

Repository files navigation

iot_exam

This repository contains all the code implementing the assignments for the exam of the IoT 2019/2020 course held at Sapienza University of Rome (course site: http://ichatz.me/Site/InternetOfThings2020).

The exam required the completion of four assignments, briefly described as follows (for details about the single components please refer to the README in the folder of each component. Tutorials are available on LinkedIn.

  • Assignment 1 (tutorial): this assignment required to create a cloud-based IoT system collecting information from a set of virtual environmental sensors using the MQTT protocol. Data collected from the sensors should be displayed by a simple web site.

    All the material regarding this assignment is contained within the following folders:
    • python_sensor: the Python implementation for the virtual environmental sensors transmitting randomly generated values to MQTT both to a local custom MQTT broker or to AWS IoT.
    • htdocs: the web-server folder containing (in its root) the simple web site (dashboard) for showing data collected. This web-site allows to show information produced by the sensors from Assignments 1, 2 and 3, retrieved by the dash_backend component. The pages within this folder were tested using XAMPP for Windows web server.
    • python_dash_backend: the Python implementation of the backend feeding the website with data retrieved from a local MQTT broker or AWS IoT.

  • Assignment 2 (tutorial): this assignment is an extension of Assignment 1, where the same components (dashboard and backend) are used to collect and display data from a set of virtual environmental stations that are built over RIOT-OS and transmit using the MQTT-SN protocol.

    All the material regarding this assignment is contained within the following folders:
    • riot_station_mqttsn: the RIOT-OS application implementing (in C) a virtual environmental station, transmitting the generated values to an MQTT-SN broker.
    • mqttsn_mqtt_bridge: the Python implementation of the bridge subscribing to the MQTT-SN topic on the broker, to receive MQTT-SN messages and relay them to a local MQTT broker or AWS IoT.


  • Assignment 3 (tutorial): this assignment is another extension of the projects for Assignment 1 and 2, where the same dashboard and backend components are used to collect and display data from a set of virtual environmental stations that are built over RIOT-OS, are deployed on the FIT/IoT Lab testbed and transmit the generated values using LoRaWAN by TheThingsNetwork.

    All the material regarding this assignment is contained within the following folders:
    • riot_station_ttn: the RIOT-OS application implementing (in C) a virtual environmental station that transmits the generated values to TheThingsNetwork over LoRaWAN.
    • ttn_mqtt_bridge: the Python implementation of the bridge between the TTN MQTT broker and a local MQTT broker or AWS IoT.


  • Assignment 4 (tutorial): this assignment extends the IoT platform designed for the previous assignments by introducing crowd-sensing support. In particular, this assignment required to implement an HTML5 application that could support a user's activity detection (using the sensors integrated in mobile phones) and recognition. Activity detection exploits the Generic Sensor API, while the recognition can be performed either on the mobile device (edge deployment) or remotely (cloud deployment). A dashboard, similar to the one for the virtual environmental sensors shows the activity of the users.

    All the material regarding this assignment is contained within the following folders:
    • htdocs/mobile_sensors: since this is an HTML5 application, it is contained within the htdocs web server folder, ready to be served over HTTPS. The folder contains both the page to be run on mobile devices, for collecting the activity, as well as the dashboard to show the activity of the users. The web-server used for testing is again XAMPP for Windows.
    • python_mobile_dash_backend: the Python implementation of the backend feeding the mobile dashboard with data retrieved from AWS IoT MQTT broker.


Dependencies

If you want to test the code you can clone this repository, but in order for all the assignments to work, you have to also retrieve:
  • RIOT-OS: this is needed for running Assignment 2 and eventually building Assignment 3 virtual environmental stations for a different target board. RIOT-OS can be retrieved by cloning its repository from GitHub. Please clone this repository in the RIOT-OS folder in the root of the cloned iot_exam repository so that you don't have to manually correct the path for building RIOT-OS applications in their Makefiles.
  • Mosquitto MQTT broker: this is needed if you want to execute Assignments 1, 2 and 3 relying on a local MQTT broker. You can get Mosquitto binaries for the platform you are working on, or the source on the official website. The configuration file to be used with this broker is given in this repository, in the mosquitto.conf file that can be used when launching the broker.
  • Mosquitto RSMB MQTT-SN broker: this is needed to support the execution of Assignment 2. Mosquitto RSMB source code can be retrieved by cloning its repository from GitHub. After building the broker, the configuration provided in this repository, in the rsmb.conf file can be used when launching it.
In order to correctly connect to the AWS IoT MQTT broker, you should create a device on AWS IoT and place the information required to connect to it in the aws folder. Please refer to the readme in the AWS folder for more details.

About

Assignments and material for the IoT exam

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published