End-to-end Emulation of Massive IoT LoRaWAN Infrastructures

In the growing Internet of Things (IoT), Long Range Wide Area Networks (LoRaWANs) have become a popular solution for environment sensing and monitoring thanks to its cheap and easy-to-operate nature. Due to the unavailability of large-scale real-life testbeds, many simulators have been developed to study LoRaWAN at scale. These tools aim at accurately modeling the radio performance of devices and gateways, but do not cover the core network functions, in particular LoRaWAN network servers and bridging functions. On the other hand, only basic traffic generators currently exist for network servers without, however, the possibility of producing non-trivial management scenarios involving the radio access network, resource allocations and traffic anomalies.

Software architecture of an ELoRa deployment (left) on Chirpstack (right).

We present ELoRa, a software tool aimed at accurately emulating end-to-end (E2E) LoRaWAN traffic, from device to server. ELoRa is built using the well known ns-3 network simulator, extending a LoRaWAN module. Among existing simulators, this module presents the most complete implementation of the LoRaWAN Medium Access Control (MAC) protocol. In our proposition, we build a translation layer between the simulation, and real (UDP-encapsulated) LoRaWAN traffic, de facto enabling two way real-time communications with the outside environment. The resulting UDP traffic is transparently accepted by most LoRaWAN servers, as we re-implement in ns-3 the gateway packet forwarder protocol developed by Semtech, which patented the Long Range (LoRa) modulation technology.

The dashboard of ChirpStack.
Metrics monitoring example with Grafana.

In our proposition, we focus on the well established ChirpStack open-source LoRaWAN network server. To enable the server’s full device management capabilities, we include a component exploiting the REST API of ChirpStack to seamlessly register devices on the server. In addition, we significantly improve the original simulator to produce traffic that is compatible with a real server. Changes include, but are not limited to, resolving multiple MAC layer inaccuracies, adding cryptographic capabilities to devices, as well as introducing a tool to emulate smart-city traffic, and implementing the generation of LoRaWAN .pcap packet captures that can be dissected in programs like Wireshark.

Smart-city traffic generation.
This image has an empty alt attribute; its file name is PCAP-1024x736.png
Packet payload analysis in Wireshark.

Thanks to the variety of modeling tools offered by ns-3, ELoRa makes it possible to test management techniques on LoRaWAN servers under countless realistic scenarios and loads. Furthermore, parameters of simulated devices can be controlled live by the server to test existing and novel radio resource management algorithms in an comprehensive E2E controlled environment. Thanks to the cloud-native architecture of Chirpstack, ELoRa can be deployed locally to the server or in a distributed fashion, standalone, in multiple instances, or accompanying other traffic flows from real networks.

Resources:

Paper describing ELoRa:

A. Aimi, S. Rovedakis, F. Guillemin, and S. Secci, “ELoRa: End-to-end Emulation of Massive IoT LoRaWAN Infrastructures,” 2023 IEEE/IFIP Network Operations and Management Symposium (NOMS), May 2023, Miami, FL, United States.

Users of ELoRa are kindly asked to cite the paper above if the use ELoRa for their work.