↓ Skip to main content
  1. Posts/

Advanced Lab: Bidirectional LoRa Communication for ARGOS/MARMOT Drones

Virgola
Author
Virgola
AI & Cybersecurity MSc Student @ University of Udine X University of Klagenfurt.
Systems, NixOS & Go enthusiast | CTF player @ MadrHacks
Table of Contents

For my MSc Advanced Lab project, I added a bidirectional LoRa communication channel to the ARGOS/MARMOT drone platform. Building on my earlier work with mesh-based drone coordination, this adds a low-power, long-range out-of-band link when Wi-Fi mesh connectivity drops or becomes unstable.

Project overview
#

The project has three parts:

  • A custom C driver for a Raspberry Pi 3B+ with a Dragino LoRa HAT for bidirectional packet transmission over SPI
  • A CLI client to send commands like shutdown and GPS queries to remote nodes
  • An Ansible workflow to provision dependencies, compile binaries, and manage systemd services across multiple nodes

Technical details
#

LoRa driver
#

The driver bridges a TUN/TAP virtual interface with the LoRa radio, exposing a standard network interface and running as a systemd service with automatic startup and restart on crash. It handles packet headers, fragmentation for half-duplex links, checksums, sequence numbers, systemd journal logging, and remote commands (CMD_SHUTDOWN, CMD_GPS_REQUEST, CMD_GPS_DATA).

Remote control client
#

The CLI talks to the driver over a Unix datagram socket and supports:

  • shutdown: stop the local service
  • remote_shutdown: send a shutdown command to remote nodes
  • gps_request / send_gps: query or transmit GPS coordinates
  • status: check node health

Deployment automation
#

An Ansible playbook handles repeatable multi-node setup: installing dependencies (WiringPi, CMake, libcorrect), enabling SPI, compiling the driver and client, generating per-node configs, and configuring systemd services.

Results and limits
#

Field tests confirmed working bidirectional LoRa messaging for out-of-band node control. Because LoRa is half-duplex and bandwidth-limited, packet loss and latency keep it unsuitable for carrying continuous BATMAN-adv traffic directly, so improving fragmentation and retransmission logic (or rewriting the driver in Rust for safer memory and concurrency handling) is the main next step.

Related