Skip to content

Latest commit

 

History

History
166 lines (110 loc) · 5.06 KB

README.md

File metadata and controls

166 lines (110 loc) · 5.06 KB

LWN Simulator

GitHub Actions Workflow Status GitHub license made-with-Go GitHub go.mod Go version of a Go module GitHub release

A LoRaWAN nodes' simulator to simulate a LoRaWAN Network.

Table of Contents

General Info

LWN Simulator is a LoRaWAN nodes' simulator equipped with web interface. It allows to comunicate with a real infrastructure LoRaWAN or ad-hoc infrastructure, such as Chirpstack.

dashboard

The project consists of three main components: devices, forwarder and gateways.

The device

  • Based specification LoRaWAN v1.0.3;
  • Supports all LoRaWAN Regional Parameters v1.0.3.
  • Implements class A,C and partially even the B class;
  • Implements ADR Algorithm;
  • Sends periodically a frame that including some configurable payload;
  • Supports MAC Command;
  • Implements FPending procedure;
  • It is possibile to interact with it in real-time;

The forwarder

It receives the frames from devices, creates a RXPK object including them within and forwards to gateways.

The gateway

There are two types of gateway:

  • A virtual gateway that communicates with a real gateway bridge (if it exists);
  • A real gateway to which datagrams UDP are forwarded.

Requirements

Tip

A ChirpStack instance can be easily started using Docker. You can find the instructions here.

Installation

From binary file

You can download from releases section the pre-compiled binary file.

Releases Page

From source code

Requirements

The simulator is written in Go, so you must have installed Go on your machine.

  • You must install Go. Version >= 1.21

Note

Windows users should install GnuMake for Windows to use the makefile. If you use winget, you can install it with the following command:

winget install GnuWin32.Make

Build Steps

Firstly, you must clone this repository:

git clone https://github.com/UniCT-ARSLab/LWN-Simulator.git

After the download, you must enter in main directory:

cd LWN-Simulator

You must install all dependencies to build the simulator:

make install-dep

Now you can launch the build of the simulator:

make build

The binary file will be created in the bin directory.

Run the simulator

To run the simulator, you can:

  • Run from the built binary file:
./bin/lwnsimulator // for Linux
./bin/lwnsimulator.exe // for Windows

make run-release // if you use makefile
  • Run from the source code:
make run

Configuration file

The simulator depends on a configuration file (config.json) which specifies some configurations for the simulator:

{
  "address": "0.0.0.0",
  "port": 8000,
  "metricsPort": 8001,
  "configDirname": "lwnsimulator",
  "autoStart": false,
  "verbose": false
}
  • address: the address where the simulator will listen for incoming connections;
  • port: the port where the simulator will listen for incoming connections;
  • metricsPort: the port where the simulator will listen for incoming connections for metrics (Prometheus);
  • configDirname: the directory where the simulator will store the configuration files;
  • autoStart: if true, the simulator will start automatically the simulation;
  • verbose: if true, the simulator will print more logs.

Tutorials

More coming soon...

Arabic (thanks to IdealBit)

How to Install on Linux or WLS

How to Install on Windows

How to use LWN Simulator with ChirpStack

Publications and Citations