ECP LoRaWAN Device Driver


The ECP LoRaWAN Device Driver can be installed using the resource manifest found in the Resource Manifests section.

In practice only the lora.gatewayID needs to be set. If left blank one will be auto-generated.


The LoRaWAN device driver acts as bridge between the Chirpstack Application Server and the Edge Compute Platform where the LoRa frames are translated into Web-of-Things (WoT) messages and vice versa.

  • gRPC for application server API.
  • subscribe to mosquitto topics for LoRa frames.
  • configure as WoT, set properties, run actions, etc..
  • standard driver interaction with ECP


The driver does the following:
  • set up a default organization (edge-compute-platform) (using gRPC)
  • set up a default network server (ecp-network-server, server URL for LoRa Server Stack network server) (using gRPC)
  • set up a default service profile (ecp-service-profile) (using gRPC)
  • set up a default application (ecp-application) (using gRPC)
  • set up a default gateway (ecp-gateway) (using gRPC)
  • (optional) set up placeholders for device profiles (using gRPC)

All of this can be fully managed using the API endpoints for the device driver.

API Endpoints

Available "/drivers/lorawan/{keyword}" API endpoints that use the Chirpstack API format for:
  • organizations (CRUD, using gRPC)
  • network-servers (CRUD, using gRPC)
  • service-profiles (CRUD, using gRPC)
  • applications (CRUD, using gRPC)
  • gateways (CRUD, using gRPC)
  • device-profiles (CRUD, using gRPC)
  • devices (CRUD, using gRPC)

This allows for setting up the gateway, device profiles, and devices. The API endpoints are documented on ECP API Documentation. (Only devices are modelled using WoT Thing Descriptions and are available as "things" throughout the SmartWorks system.)

The complete Chirpstack API can be used via the proxy endpoint: /drivers/lorawan/proxy/application-server/{chirpstack-endpoint}

The proxied API runs REST requests to the application server of the LoRa stack (extra overhead compared to gRPC).

Device Commissioning

The LoRaWAN specification allows for two types of activation: Over-the-Air Activation (OTAA) (preferred) and Activation by Personalization (ABP).

Code has been added to allow setting device keys and device (de)activation for OTAA and ABP devices respectively. This works by requesting actions on the devices (WoT Thing Descriptions). See the respective Thing Description pages for both OTAA and ABP setup.


The driver subscribes to the LoRA Server Stack mosquitto broker to receive telemetry data and publishes it into the ECP stack as raw telemetry after necessary decryption and/or payload conversion (see page on conversion templates). This allows for publishing to the cloud using the existing mechanisms.