LoRaWAN and Modbus: Bridge RS485 Field Devices Wirelessly

Bridge Modbus RTU field devices over LoRaWAN: a controller polls RS485 registers into uplinks, you decode in ChirpStack and control by downlink.

LoRaWAN
Architecture

The data flow

Read legacy RS485 field devices (energy meters, PLCs, flow and level transmitters) over kilometres of wireless range without new cable. A LoRaWAN controller polls Modbus RTU registers, encodes them into uplinks, and you decode and control them from your dashboard.

Sensor / controller

Measures or controls in the field and sends LoRaWAN uplinks.

LoRaWAN gateway

Receives the radio packets and forwards them to the server.

ChirpStack

Network server: manages sessions and decodes the payload.

ThingsBoard / Grafana

Dashboards, alarms, rules and reports.

How the bridge works

The controller is configured as a Modbus master on the RS485 bus. On a schedule it polls each configured register, packs the results into a LoRaWAN payload, and transmits an uplink. From there the path is the same as any LoRaWAN device: a gateway receives it, ChirpStack decodes it, and your dashboard displays it. No new cable is pulled back to the control room, the controller sits next to the field devices and the data travels wirelessly. We walked through a concrete build in Milesight UC100: Modbus to LoRaWAN.

Configuring the Modbus channels

This is the part that is specific to every deployment. For each value you want, you configure a Modbus channel on the controller (on a Milesight UC300 this is done in the ToolBox app):

Channel 1
  Slave address: 1
  Function code: 0x03   (read holding registers)
  Start register: 0x0000
  Data type:     UINT32  (2 registers, check the word order)
  Polling:       every 600 s

Channel 2
  Slave address: 1
  Function code: 0x04   (read input registers)
  Start register: 0x0008
  Data type:     INT16
  Polling:       every 600 s

The controller then encodes each polled channel into the uplink. Because that mapping is yours, the Milesight UC300 and similar controllers ship a decoder that is a framework, not a fixed drop-in.

Decoding the payload

The uplink still arrives as raw bytes, so it needs a ChirpStack payload decoder that mirrors your channel and register map. Once decoded, the clean JSON flows on to your dashboard, for example through the ChirpStack to ThingsBoard integration.

Downlink: writing registers and switching outputs

Bridging is not read-only. As a Class C device the controller keeps its receive window open, so a LoRaWAN downlink can write a Modbus register or switch a relay output, for example to start a pump or close a valve. The command applies in near real time, which makes the bridge usable for control, not just monitoring. The downlink carries the target register and value, the controller performs the Modbus write on the bus.

Pitfalls from the field

  • RS485 termination: On long or fast buses, missing termination resistors cause flaky reads. Terminate both ends.
  • Polling interval vs register count: Poll too aggressively for the number of registers and uplinks queue up against the duty cycle. Match the interval to what the radio can carry.
  • Word and byte order: 32-bit and float registers differ in word order between vendors. Confirm it against a known value, or the decoded number is nonsense.
  • Class C power: Continuous receive needs mains or solar, not battery-only.
  • Fail-safe states: Configure what outputs do on a comms loss, so a valve does not stay open during an outage.

How merkaio runs this for you

We handle the full chain: inventory the RS485 bus, configure the controller, map the registers, write the decoder, forward the data to your dashboard and wire downlink control. The result is a wireless, controllable view of equipment that used to be locked behind a local cable. Talk to us about managed ChirpStack hosting and we run the decode, forwarding and downlink layer for you.

Hardware

Devices with a ready decoder

Frequently asked questions

A LoRaWAN controller that acts as a Modbus master, such as the Milesight UC300 or UC50x. It polls the RS485 bus and encodes the register values into LoRaWAN uplinks. A plain sensor cannot do this.
The wireless bridge case is Modbus RTU over RS485, which is what these controllers speak. Modbus TCP runs over IP and needs a different gateway. This guide covers RTU.
No. The controller polls registers on an interval and sends uplinks within the LoRaWAN duty cycle, so expect minutes, not milliseconds. Downlink commands to a Class C controller apply in near real time.
Yes. As a Class C device the controller listens continuously, so a LoRaWAN downlink can write a Modbus register or flip a relay output. We build and confirm those commands during integration.
It is configuration-dependent: the controller encodes each polled register into a channel, so the decoder reflects your specific register map. We write it from the Milesight byte specification and adapt it to your deployment.
Yes. We map the registers, configure the controller, write the decoder, forward the data to your dashboard and wire downlink control, all on European infrastructure.

Let's discuss your infrastructure. Digital and on-site.

Whether it's IoT platform development, hardware selection, managed hosting for ChirpStack, ThingsBoard, Grafana or NetBird VPN, or migration from a self-hosted setup - we'll find the right solution for your use case. Book a free 30-minute consultation, no commitment required.

Timo Wevelsiep

Your contact

Timo Wevelsiep

Founder, merkaio

15 minutes, no commitment, directly with Timo.

By submitting, you agree to our Privacy Policy.

merkaio is an independent integrator and is not affiliated with Milesight.