Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IoT Challenges

Coursework projects exploring energy-efficient IoT nodes, protocol traffic analysis and LoRa network simulation.

🌟 Highlights

  • ESP32 firmware simulated in Wokwi that measures distance, communicates over Wi-Fi and sleeps — with a baseline and an RTC-optimised variant compared side by side for energy usage.
  • Packet-level analysis of CoAP, MQTT and MQTT-SN traffic, captured with TShark and parsed with PyShark, including energy-cost comparisons between protocols.
  • LoRa network simulations built on LoRaSim that reproduce reference figures on airtime and collisions, paired with an importable Node-RED flow for live message processing.
  • Every challenge is self-contained: its own firmware or scripts, its own data, and a short README explaining how to run it.

ℹ️ Overview

This repository collects three hands-on challenges from the Internet of Things course at Politecnico di Milano, each tackling a different layer of a typical IoT system: the sensing node, the communication protocol, and the network that connects many nodes together. The goal is to understand, through direct measurement and simulation, the trade-offs IoT designers face — for example how much energy a sleep cycle saves, or how protocol choice affects both bandwidth and power consumption.

Each challenge is independent and can be explored on its own: run an ESP32 simulation in the browser, analyse a real packet capture, or reproduce simulation results for a LoRa network. The homework/ folder additionally holds supporting design artefacts (a system block diagram and a plotting notebook) produced for the course assignment.

🧩 How It Works

Every challenge follows the same general lifecycle:

  1. Build or simulate a node — firmware (ESP32/Wokwi) or a reference simulator (LoRaSim) generates the raw behaviour under study.
  2. Capture or generate data — energy measurements, packet captures, or simulation logs are collected into each challenge's data/ folder.
  3. Analyse in Python — scripts and notebooks in analysis/ process the raw data into timing, energy or protocol-performance figures.
  4. Document the findings — each challenge's own README explains how to reproduce the results.

🚀 Usage

Pick a challenge folder and follow its local README for full instructions. Quick examples:

# Challenge 2 — analyse a CoAP capture
python3 challenges/02-protocol-analysis/analysis/CQ1.py
# Challenge 3 — reproduce a LoRaSim figure
export LORASIM_DIR=/path/to/lorasim
python3 challenges/03-lora-network-simulation/analysis/figure-5.py

Challenge 1's firmware is run directly in Wokwi by opening firmware/*/diagram.json together with its sketch.ino.

⬇️ Installation

Requirements

  • Python 3
  • A Wokwi account (browser-based, for challenge 1)
  • TShark (for challenge 2)
  • LoRaSim with a Python 2 interpreter (for challenge 3)
  • Node-RED (optional, only to run the flow in challenge 3)

Setup

git clone https://github.com/AlessandroAssini/iot-challenges.git
cd iot-challenges

From here, each challenge folder has its own README with the exact packages and steps needed (e.g. pip install pyshark, setting LORASIM_DIR, or opening a project in Wokwi).

📁 Project Structure

iot-challenges/
├── challenges/
│   ├── 01-energy-efficient-node/   # ESP32 firmware, energy analysis
│   ├── 02-protocol-analysis/       # CoAP/MQTT/MQTT-SN traffic analysis
│   └── 03-lora-network-simulation/ # LoRaSim experiments, Node-RED flow
├── homework/                       # Block diagram and plotting notebook
└── README.md

🛠️ Technologies

  • Languages: Python, C++ (Arduino/ESP32 sketches)
  • Hardware simulation: Wokwi
  • Protocols: CoAP, MQTT, MQTT-SN, LoRa/LoRaWAN
  • Analysis: PyShark, Wireshark/TShark, LoRaSim, pandas, numpy, matplotlib
  • Automation: Node-RED
  • Notebooks: Jupyter

📚 Documentation

✍️ Authors

Developed by Alessandro Assini for the Internet of Things course at Politecnico di Milano.

🤝 Contributing

This is a personal coursework repository, but feedback is welcome. Feel free to open an issue for questions or suggestions, or submit a pull request if you'd like to propose a change.

📄 License

License information has not been specified yet.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages