LoRaWAN (Long Range Wide Area Network) is a low-power, long-range wireless protocol designed for IoT devices. The Weble universal gateway LoRaWAN driver turns the gateway into a LoRaWAN end-device (sensor/transmitter) using a USB LoRaWAN module. The gateway can then send data over the LoRaWAN network to a LoRaWAN network server (e.g. The Things Network, Chirpstack, Loriot, Actility).
Important: This driver makes the gateway act as a LoRaWAN transmitter (end-device), not as a LoRaWAN gateway/concentrator. The gateway collects data from local protocols (Modbus, BACnet, M-Bus, etc.) and transmits it over LoRaWAN to a remote network server — similar to how a LoRaWAN sensor would send its readings.
This is useful for:
The driver works with IMST WiMOD LoRaWAN end-node modules, which it controls through their serial HCI protocol, for example the IMST iU880B USB adapter. The module handles the LoRaWAN radio stack (LoRa modulation, MAC layer, encryption). Other LoRaWAN modems (AT-command modems, concentrator cards) are not supported. Only the EU 868 MHz band is available.
Before you start, register the device on your LoRaWAN network server (OTAA) and note its Device EUI, App EUI (Join EUI) and App KEY.
Create a new gateway and select the LoRaWAN driver. Configure:
OTAA (recommended) or ABP.EU 868 MHz).Create addresses in the Emit tab to define the data to send. Each address is linked to a FPort (0-255; use 1 to 223 for application data) and encodes a value using the selected datatype (floatBE, int16BE, etc.).
When a value is written to an emit address (e.g. via a route from a Modbus sensor), the driver sends a LoRaWAN uplink message containing the encoded value on the specified FPort.
To turn these bytes back into values on The Things Stack or ChirpStack, see Decoding WBox LoRaWAN uplinks on the network server.
How uplinks are sent:
Device not active. If the join does not succeed within 15 minutes, the driver restarts and tries again.pending, then online once the module has accepted the uplink.The Receive tab contains addresses for incoming downlink messages from the network server. These can be used to remotely control the gateway or send configuration updates.
Receive addresses do not have to be created by hand: %lora:RC<port> or %lora:RU<port> is created automatically when the first downlink arrives on that port.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name for this LoRaWAN gateway instance. |
| Cluster ID | cluster | 0 (default): the gateway runs in its own process. Any other number: the gateway shares one process with the gateways that have the same number. See Gateway clusters. |
| Serial Port | serialPort | Serial interface of the LoRaWAN USB module. Auto-complete lists detected interfaces. See Serial ports and USB adapters. |
| BaudRate | serialPortBaudRade | Serial baudrate. Default: 115200. |
| Parity | serialPortParity | Serial parity: none (default), even, or odd. |
| Stopbit | serialPortStopBit | Stop bits: 1 (default) or 2. |
| Label | JSON Key | Description |
|---|---|---|
| Authentication | authentification | Join method: OTAA (Over The Air Activation — encryption keys are negotiated with the network, recommended) or ABP (Activation By Personalization — keys are pre-configured). |
| App. EUI | appEUI | Application EUI (8 bytes, hex format). Identifies the application on the network server. |
| App. KEY | appKEY | Application Key (16 bytes, hex format). Used for OTAA encryption key derivation. |
| Device EUI | devEUI | Device EUI (8 bytes, hex format). Unique identifier for this device on the network. It is written into the module at each start and replaces the factory EUI of the module. EUIs and the key are hexadecimal bytes, with or without - separators. |
| Label | JSON Key | Description |
|---|---|---|
| bandId | bandId | Frequency band: EU 868 MHz or EU 868 MHz (Rx2: SF9). |
| Uplink Data Rate | uplinkDataRate | Spreading factor and bandwidth. Lower SF = higher bitrate but shorter range. Options from SF12/125kHz (250 bps, longest range) to FSK 50k (50000 bps, shortest range). This is the initial data rate: Adaptive Data Rate is enabled, so the network server may change it. |
| Tx Power Level (EIRP) | txPowerLevel | RF output power (0-16). Higher = longer range but more power consumption. Default: 16. |
| Duty Cycle Control | dutyCycleControl | Enable LoRaWAN duty cycle enforcement (mandatory in EU). Limits transmission time to comply with regulations. Default: enabled. |
| Class C - Support | classCSupport | Enable Class A & C operation. Class C keeps the receive window open continuously for lower latency downlinks. Default: enabled. |
| Automatic Power Saving | autoPowerSaving | Enable automatic low-power mode when the module is idle. |
| CData Retransmissions | numberOfRetransimssions | Maximum retransmission attempts for confirmed uplinks when no acknowledgment is received. Default: 7. |
| Sync. RTC | syncRTC | Synchronize the LoRaWAN module's real-time clock with the gateway's system time. |
| Ping interval (ms) | pingInterval | Interval in milliseconds for keepalive pings to the LoRaWAN module. Default: 2000. |
{
"serialPort": "/dev/serial/by-id/usb-IMST_iU880B-if00",
"serialPortBaudRade": 115200,
"serialPortStopBit": 1,
"serialPortParity": "none",
"authentification": "OTAA",
"appEUI": "F0-3D-29-AC-71-00-00-01",
"appKEY": "01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F-10",
"devEUI": "70-B3-D5-8F-F1-01-29-F7",
"bandId": 1,
"uplinkDataRate": 3,
"txPowerLevel": 16,
"dutyCycleControl": true,
"classCSupport": true,
"autoPowerSaving": false,
"numberOfRetransimssions": 7,
"syncRTC": true,
"pingInterval": 2000
}
The driver organizes addresses into three tabs:
| Tab | Description |
|---|---|
| Emit | Uplink addresses — data sent from the gateway to the LoRaWAN network server. |
| Receive | Downlink addresses — data received from the network server. Read-only. |
| Informations | Module status addresses (battery level, RTC, HCI info). Auto-created. Read-only except HCI/batteryLevelStatus and HCI/targetTimeRTC. |
Emit and Receive addresses use the prefix %lora: followed by the data type and FPort number:
| Format | Description |
|---|---|
%lora:C<port> |
Confirmed uplink on FPort <port>. The network server sends an acknowledgment. Retransmitted if no ACK received. |
%lora:U<port> |
Unconfirmed uplink on FPort <port>. No acknowledgment, fire-and-forget. |
| Format | Description |
|---|---|
%lora:RC<port> |
Receive confirmed downlink on FPort <port>. |
%lora:RU<port> |
Receive unconfirmed downlink on FPort <port>. |
%lora:C1 — send confirmed data on FPort 1%lora:U10 — send unconfirmed data on FPort 10%lora:RC1 — receive confirmed data on FPort 1| Label | JSON Key | Description |
|---|---|---|
| FPort | (from name) | LoRaWAN port number. The form accepts 0 to 255; use 1 to 223 for application data (port 0 is reserved for MAC commands by the LoRaWAN specification). Different FPorts can be used to separate different data types or sensors. |
| Data type | (from name) | C = Reliable data (confirmed uplink), U = Unreliable data (unconfirmed uplink). |
| Value encode | datatype | Encoding format for the payload: floatBE / floatLE (4 bytes), int16BE / int16LE (2 bytes), int32BE / int32LE / uint32BE / uint32LE (4 bytes), object (JSON text), utf8 (text), or number. The form proposes floatBE by default. Numeric types refuse any value that is not a number, text included (Invalid number value). |
| Description | description | Optional description. |
| Log | log | Logging mode. |
| Address | Description |
|---|---|
%lora:LoRaWAN/networkStatus |
inactive, joining or active. Uplinks are only sent when the status is active. |
%lora:LoRaWAN/connectionTimer |
Seconds elapsed since the driver started; the counter stops when the module joins the network. |
%lora:LoRaWAN/pendingActions |
Number of uplinks waiting in the send queue. |
%lora:LoRaWAN/status, deviceAddress, channel, dataRate, RSSI, SNR |
Result of the last join. |
%lora:LoRaWAN/configuration/... |
Radio configuration read back from the module. |
%lora:HCI/devEUI, %lora:HCI/module |
Device EUI and module type read from the module. |
%lora:HCI/txUDataTransmitted, txCDataTransmitted, rx1UDataReceived, ... |
Frame counters of the module. |
%lora:HCI/batteryLevelStatus |
Battery level reported to the network server, 0 to 254. Writable; set to 254 at start. |
%lora:HCI/targetTimeRTC |
Clock of the module. Writable (date). |
The device joins the network by exchanging cryptographic keys with the network server. The App EUI, App KEY, and Device EUI must be registered on the network server before the device can join.
Benefits: keys are refreshed on each join, more secure, standard approach.
The encryption keys are pre-configured on both the device and the network server. The device does not need to perform a join procedure.
Benefits: simpler setup, works immediately. Drawback: keys never change, less secure.
| Symptom | Cause and fix |
|---|---|
networkStatus stays joining, then the log shows Timeout during joining network |
No join accept received: check the antenna and the coverage, and that Device EUI, App EUI and App KEY match the registration on the network server. |
Address status ! Device not active |
The module has not joined yet. Wait until %lora:LoRaWAN/networkStatus is active. |
Address stays pending, pendingActions grows |
The duty cycle limits the air time: send fewer values or use a faster data rate. |
Invalid number value |
A numeric encoding is selected but the value written is not a number. |
HCI message length is invalid or radio payload size is too large |
The payload is too long for the current data rate: shorten the text / JSON or use a faster data rate. |
The log shows no serial port resolved or serial port error |
No Serial Port is selected, or the module is not detected: check the USB connection and select the Serial Port again. |
The log shows missing license |
The LoRaWAN driver is not enabled in the licence of the gateway. Contact support@weble.ch. |
Keep this gateway on Cluster ID
0: the driver restarts its process when the serial port fails or the join does not succeed, which would restart every gateway of a shared cluster.