A visualization of an MQTT topic tree structure showing how a LoRaWAN gateway organizes sensor data for SCADA consumption.

LoRaWAN Gateway to SCADA: The MQTT Bridge Guide

Written by: Robert Liao

|

Published on

|

Time to read 5 min

Author: Robert Liao, Technical Support Engineer

Robert Liao is an IoT Technical Support Engineer at Robustel with hands-on experience in industrial networking and edge connectivity. Certified as a Networking Engineer, he specializes in helping customers deploy, configure, and troubleshoot IIoT solutions in real-world environments. In addition to delivering expert training and support, Robert provides tailored solutions based on customer needs—ensuring reliable, scalable, and efficient system performance across a wide range of industrial applications.

Summary

For decades, the factory floor spoke Modbus. Today, the language of the Industrial IoT is MQTT. Bridging this gap is the key to modernizing operations. This guide explains how to use a LoRaWAN gateway as the translator between wireless field sensors and your central SCADA system. We explore the "MQTT Bridge" architecture, where the gateway publishes decoded sensor data directly to a broker. We compare this "Push" model against the legacy "Poll" model of Modbus, highlighting why MQTT is faster, more efficient, and the preferred standard for Industry 4.0.

Key Takeaways

The Translator: An industrial LoRaWAN gateway can decode radio signals and "Publish" them as JSON objects to an MQTT Broker.

Pub/Sub Architecture: Unlike Modbus (polling), MQTT is event-driven. The LoRaWAN gateway pushes data instantly when it arrives, reducing network traffic.

SCADA Native: Modern SCADA platforms like Ignition have native MQTT support. Connecting a LoRaWAN gateway is now as easy as pointing it to the broker IP.

Security: MQTT supports TLS encryption and username/password authentication, ensuring that the LoRaWAN gateway transmits data securely over the factory LAN.

LoRaWAN Gateway to SCADA: The MQTT Bridge Guide

Industrial automation is colliding with the Internet of Things.

On one side, you have SCADA systems controlling pumps and valves. On the other side, you have wireless LoRaWAN sensors monitoring vibration and temperature. The challenge is connecting them. SCADA systems expect wired data; sensors send wireless radio packets.

The solution is the LoRaWAN gateway.

Modern industrial gateways are no longer just packet forwarders; they are protocol converters. By using MQTT (Message Queuing Telemetry Transport), you can turn your LoRaWAN gateway into a native data source for your industrial dashboard. This guide shows you how to bridge the gap.


A conceptual comparison showing the efficiency of the MQTT push model used by a LoRaWAN gateway versus the slower polling model of Modbus.


What is MQTT and Why Use It?

Modbus is the grandfather of industrial protocols. It works by "Polling": the server asks, "Do you have data?" every second. This is inefficient for battery-powered sensors that only sleep 99% of the time.

MQTT is the modern alternative. It uses a Publish/Subscribe model.

  • The Client: Your LoRaWAN gateway acts as the Publisher.
  • The Broker: A central software (like Mosquitto or HiveMQ) that sorts messages.
  • The Subscriber: Your SCADA system (like Ignition).

The Benefit: The LoRaWAN gateway only speaks when it has something to say. When a sensor reports a temperature spike, the gateway immediately "Publishes" that data to the broker. The SCADA system receives it instantly. It is faster, uses less bandwidth, and scales to thousands of devices.

The Architecture: The LoRaWAN Gateway Bridge

To build this, your LoRaWAN gateway must be running an Embedded Network Server (or an Edge App) capable of decoding data.

  1. Ingest: The LoRaWAN gateway receives the raw RF packet (0x01A4).
  2. Decode: The internal decoder converts it to a value (420).
  3. Format: The gateway wraps it in JSON: {"sensor_id": "pump-1", "value": 420}.
  4. Publish: The LoRaWAN gateway sends this JSON to the MQTT Broker on a specific topic: factory/pump-1/pressure.

Step-by-Step Configuration

Configuring a Robustel LoRaWAN gateway for MQTT is straightforward via the RobustOS interface.

  1. Enable the Service: Go to Services > Data Output.
  2. Select Protocol: Choose MQTT.
  3. Broker Address: Enter the IP address of your SCADA/MQTT Broker.
  4. Topic Structure: Define the path. For example, lora/{{DevEUI}}/up. This dynamic tag ensures every sensor gets its own unique channel.
  5. Authentication: Enter the username and password required by your broker.
  6. TLS: If sending data over the public internet, upload the CA Certificate to the LoRaWAN gateway to encrypt the link.

A visualization of an MQTT topic tree structure showing how a LoRaWAN gateway organizes sensor data for SCADA consumption.


Integrating with SCADA (e.g., Ignition)

Once the LoRaWAN gateway is publishing, you need to display it. In a platform like Inductive Automation's Ignition:

  1. Install the "MQTT Distributor" or "Engine" module.
  2. Point it to the same Broker.
  3. Ignition will automatically discover the tags. You will see a folder structure appear: factory > pump-1 > pressure.
  4. Drag and drop that tag onto your screen.

You now have a live wireless sensor reading on your HMI, powered by the LoRaWAN gateway.

Why Not Modbus TCP?

You can use Modbus TCP (as discussed in previous articles), but MQTT offers richer data.

  • Modbus: Only sends a number (420). You lose context.
  • MQTT (JSON): The LoRaWAN gateway can send the number (420) plus the battery level, signal strength (RSSI), and timestamp in a single packet. For complex IoT deployments, this metadata is crucial for maintenance, and only MQTT carries it efficiently.

A graphic comparing the limited data of a Modbus register versus the rich metadata JSON payload provided by a LoRaWAN gateway via MQTT.


Conclusion: The Modern Standard

The days of hard-wiring every sensor to a PLC are ending. The LoRaWAN gateway combined with MQTT allows you to deploy a flexible, scalable sensor network overlay on top of your existing plant infrastructure.

By bridging RF data directly to your SCADA system, you give your operators the visibility they need without the cost of conduit and copper. It is the efficient, secure path to Industry 4.0.

Frequently Asked Questions (FAQ)

Q1: What happens if the MQTT Broker goes offline?

A1: A robust industrial LoRaWAN gateway has a data buffer. If the connection to the MQTT Broker is lost, the gateway will store the incoming sensor data in its internal memory. Once the connection is restored, it will "flush" the stored messages to the broker, ensuring no data is lost during the outage.

Q2: Can I send commands back to the sensor via MQTT?

A2: Yes. This is called "Downlink." Your SCADA system can "Publish" a command (e.g., {"valve": "close"}) to a specific topic like lora/{{DevEUI}}/down. The LoRaWAN gateway subscribes to this topic. When it receives the message, it converts it into a LoRaWAN radio packet and transmits it to the sensor.

Q3: Is Sparkplug B supported?

A3: Sparkplug B is a standardized version of MQTT for industrial use that defines a strict data structure. Many high-end LoRaWAN gateway models and Edge applications now support Sparkplug B payloads. This makes the "Auto-Discovery" of tags in SCADA even faster and ensures better state management (knowing if a device is online or offline).