/SCHC-Project

Primary LanguagePythonMIT LicenseMIT

SCHC-Project

SCHC communication protocol Python implemention based on the work of PySCHC, according to RFC8724 and RFC9011. This work consider the whole SCHC protocol (compression and fragmentation) applied to a real enviroment. It runs the communication between IPv6/UDP applications and a Smart Meter connected to a Raspberry Pi 3 over LoRaWAN. A second Node is used in order to evaluate the network accuracy.

This project was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brasil (CAPES) – Finance Code 001 and the companies Mux Energia and Fox IoT, by the R&D project ANEEL PD-00401-0005/2020.

Furthermore, the project was used in my undergraduate thesis in order to complete the Computer Engineer degree at Federal University of Santa Maria (UFSM) - Brazil.


First Steps

Virtual environment setup

$ python3 -m venv .venv
$ source .venv/bin/activate

Dependencies setup

$ pip install -r requirements.txt

PySCHC library setup

$ cd src
$ sudo ../.venv/bin/python setup.py develop 
$ cd ..

Linux tun setup

$ sudo ip tuntap add mode tun name tun0
$ sudo ip link set tun0 up
$ sudo ip -6 addr add abcd::10 dev tun0
$ sudo ip -6 route add 5454::/64 dev tun0

Gateway

$ sudo .venv/bin/python run/run_gateway.py

Application 1

$ sudo .venv/bin/python run/run_client_1.py

Application 2

$ sudo .venv/bin/python run/run_client_2.py

Node 1

$ sudo .venv/bin/python run/run_node_1.py

Node 2

$ sudo .venv/bin/python run/run_node_2.py

Copyright

© 2021 NIC Chile Research Labs

© 2023 Fox IoT

© 2023 Cristian Augusto Wülfing