How to Configure a RAK Multi-Gateway LoRaWAN® Network Using Gateway Backend (Built-in Network Server Mode)

This guide covers the configuration of RAK gateways for a multi-gateway LoRaWAN® setup. It walks you through enabling the gateway backend and setting up MQTT so a Central Gateway can manage multiple Extender Gateways without relying on an external Network Server.

Multi-Gateway Network Overview

 

Multi-Gateway Network Topology
Figure 1: Multi-Gateway Network Topology

In a multi-gateway LoRaWAN network, multiple gateways collaborate to expand coverage and enhance data reliability.

Key Components

Central Gateway (Main Controller)

  • Runs the Built-in Network Server to manage end devices.

  • Receives LoRaWAN packets from Extender Gateways via MQTT communication.

  • Stores device registrations and processes LoRaWAN data.

Extender Gateway (Forwarding Gateway)

  • Does not process LoRaWAN packets directly.

  • Forwards packets to the Central Gateway over MQTT.

  • Expands coverage without requiring a separate LNS.

How It Works

  • The Central Gateway operates the Built-in Network Server and serves as the primary data processor.
  • Extender Gateways transmit LoRaWAN packets to the Central Gateway via MQTT topics.
  • End devices connect to the nearest gateway, with data managed centrally.
  • No external LoRaWAN Network Server is required, allowing for local network management.

Set Up the Multi-Gateway Network

Requirements

  • At least two RAK gateways are required.
  • Both gateways must be on the same LAN.
  • All gateways must operate on the same LoRa frequency band.
  • Use static IP addresses to prevent DHCP-related IP changes that may disrupt communication.

Configure the Central Gateway

  1. Log in to the Central Gateway web UI.
WisGateOS 2 Login Page
Figure 2: WisGateOS 2 Login Page
  1. Navigate to LoRa > Configuration in the left menu.

  2. Set Work mode to Built-in network server.

WisGateOS 2 Built-in LNS Configuration Page
Figure 3: WisGateOS 2 Built-in LNS Configuration Page
  1. Expand the Gateway backend section and configure the following settings:

WisGateOS 2 Built-In LNS Parameters
Figure 4: WisGateOS 2 Built-In LNS Parameters
  • MQTT Broker Address: Set this field to the central gateway’s real static IP address.

  • MQTT Broker Port: 1883

  • SSL/TLS Mode: Select None, CA-signed, or Self-signed.

  • QoS: 1 (At least once)

  • Keepalive Interval (s): 10 seconds

  1. Click Save changes.

Register Extender Gateways in the Central Gateway

Ensure that the Central Gateway is set to Built-in Network Server mode.

  1. Navigate to LoRa > Gateways in the left menu.

  2. Click Add extender gateway.

WisGateOS 2 Gateways Page
Figure 5: WisGateOS 2 Gateways Page
  1. Enter the details for the Extender Gateway:

WisGateOS 2 Add Extenders Page
Figure 6: WisGateOS 2 Add Extenders Page
  • Extender Gateway EUI: Found on the device label (GWEUI) or in Dashboard > Overview of the Extender Gateway. 

  • Extender Gateway Name (optional): A friendly name to help identify the gateway.

  • Extender Gateway Description (optional): Notes or location details.

  1. Click Add to "Extender gateway List".

WisGateOS 2 Enter New Gateways Information
Figure 7: WisGateOS 2 Enter New Gateways Information
  1. Click Add extender gateway to save.

WisGateOS 2 New Gateway Added
Figure 8: WisGateOS 2 New Gateway Added

Configure the Extender Gateway

  1. Log in to the Extender Gateway’s web UI.

  2. Navigate to LoRa > Configuration.

  3. Set the Work mode to Packet forwarder.

WisGateOS 2 Packet Forwarder Configuration Page
Figure 9: WisGateOS 2 Packet Forwarder Configuration Page
🗒️
NOTE

Ensure the LoRa frequency band matches that of the central gateway (e.g., US915, EU868).

  1. Configure the following MQTT settings:

    • Protocol: LoRa Gateway MQTT Bridge

    • Keepalive Interval (s): 10 seconds

    • MQTT Broker Address: (Enter the Central Gateway’s static IP address)

    • MQTT Broker Port: 1883

    • QoS: 1 (At least once)

    • SSL/TLS Mode: (Same as Central Gateway)

Lora Gateway MQTT Bridge Parameters
Figure 10: Lora Gateway MQTT Bridge Parameters
  1. Click Save changes to proceed.

Verify the Connection

  1. Return to the Central Gateway’s LoRa > Gateways page.

  2. The Extender Gateway should be listed with a recent Last Seen timestamp (e.g., 8s ago), indicating it has an active connection.

🗒️
NOTE

The Last Seen value may not refresh automatically. Please reload the page manually to view the latest status.

 

WisGateOS 2 New Gateway Added
Figure 11: WisGateOS 2 New Gateway Added

Add and Manage LoRaWAN Devices (Optional)

To monitor and control devices, you can register them on the Central Gateway and configure their activation settings. This step is optional and not necessary for setting up a multi-gateway network.

Add Devices

For detailed steps on creating an application and adding devices, refer to the WisGateOS 2 User Manual.

Once a device joins the network, you can monitor uplink messages in real time.

  1. Go to LoRa > Applications > [Your Application].

WisGateOS 2 Applications Page
Figure 12: WisGateOS 2 Applications Page
  1. Click on the device you want to monitor.

WisGateOS 2 End Devices Page
Figure 13: WisGateOS 2 End Devices Page
  1. Go to the Configuration tab.

  2. Click on Packet Capture.

WisGateOS 2 End Device Packet Capture
Figure 14: WisGateOS 2 End Device Packet Capture
  1. Click on the uplink data to view the details of the device packet.

WisGateOS 2 End Device Packet Details
Figure 15: WisGateOS 2 End Device Packet Details
🗒️
NOTE

Click on any uplink packet to see which Extender Gateway forwarded the data.

If you need to send data from the gateway to a device, use the Downlink feature.

  1. Go to LoRa > Applications > [Your Application] > [Your Device].

  2. Click Downlink.

WisGateOS 2 End Device Downlink Page
Figure 16: WisGateOS 2 End Device Downlink Page
  1. Enter the downlink data:

    • Frame Confirmation: Enable or disable message confirmation.

    • FPort: Specify the port number.

    • HEX Bytes: Enter the downlink message in hexadecimal format.

  2. Click Send.

WisGateOS 2 End Device Downlink Sent
Figure 17: WisGateOS 2 End Device Downlink Sent

View Extender Gateway Data Logs

The Central Gateway collects logs from Extender Gateways for monitoring and troubleshooting.

  1. Install an MQTT Client (e.g., MQTT Explorer).

  2. Configure the MQTT Client:

    • Broker Address: Enter the Central Gateway’s LAN IP.

    • Port: Set to 1883.

MQTT Explorer Central Gateway Parameters
Figure 18: MQTT Explorer Central Gateway Parameters
  1. Subscribe to the Extender Gateway Data Logs:

MQTT Explorer Gateway Added
Figure 19: MQTT Explorer Gateway Added
  • To access a specific gateway:

    gateway/{extender_gateway_eui}/#

    For example, for a gateway with EUI ac1f09fffe0707ab:

    gateway/ac1f09fffe0707ab/#
  • To access all gateways:

    gateway/#
  1. Click CONNECT.

MQTT Explorer Data Received
Figure 20: MQTT Explorer Data Received

You can now view real-time logs from the Extender Gateway.

Troubleshooting

ISSUE POSSIBLE CAUSE SOLUTION
Extender Gateway Not Connecting Incorrect EUI Verify the EUI from the Web UI (Dashboard > Overview > EUI) or device label (GWEUI).
Frequency Mismatch Ensure all gateways are using the same frequency plan.
Incorrect MQTT Settings Set the MQTT Broker Address to the Central Gateway’s LAN IP under LoRa > Configuration.
No Data from End Devices Device is Not Registered Ensure the device is added to the Central Gateway.
Network Congestion Reduce uplink frequency or adjust QoS settings.

FAQs

  1. Do the Central and Extender Gateways need to be on the same LAN?
    Yes, the Central and Extender Gateways must be on the same LAN (Local Area Network) to communicate via MQTT.

  2. How many Extender Gateways can I add to the Central Gateway?
    The number of Extender Gateways you can add depends on the gateway model and its hardware limitations. It is recommended to test based on network traffic volume and communication protocol.

  3. Can I use different models of RAK gateways as Extender Gateways?
    Yes, as long as the Extender Gateway operates on the same frequency band as the Central Gateway.

  4. What is the difference between a Central Gateway and an Extender Gateway?
    The Central Gateway acts as the network controller, running the Built-in Network Server and managing devices. In contrast, the Extender Gateway only forwards packets to the Central Gateway and does not manage end devices directly.

  5. Can I use different frequency bands for the Central and Extender Gateways?
    No, all gateways in the network must use the same frequency band for LoRaWAN communication.

  6. Can I use a public MQTT broker instead of the built-in one?
    Yes, but it is not recommended for security and reliability reasons. The built-in MQTT broker ensures local, low-latency data processing without external dependencies.

  7. Can I register devices on an Extender Gateway instead of the Central Gateway?
    No, all devices must be registered on the Central Gateway. Extender Gateways only forward packets and do not handle device registration.

  8. How do I know which Extender Gateway forwarded a specific packet?
    You can check the uplink packet details in the Central Gateway’s Web UI under LoRa > [Your Application] > Your Device > Configuration > Packet Capture. The forwarding gateway’s EUI will be listed in the metadata.

  9. What MQTT topics are used to receive data from Extender Gateways?
    Data from Extender Gateways follows a dynamic topic structure:

TOPIC DESCRIPTION
gateway/{{extender_gateway_eui}}/rx  Uplink data
gateway/{{extender_gateway_eui}}/tx   Downlink Topic
gateway/{{extender_gateway_eui}}/ack   Downlink Acknowledge Topic
gateway/{{extender_gateway_eui}}/stats Gateway Statistic Topic
  1. Why is my Extender Gateway not connecting to the Central Gateway?
    Check the following:

  • The EUI of the Extender Gateway is correct.

  • The MQTT Broker Address in the Extender Gateway matches the LAN IP of the Central Gateway (not 127.0.0.1).

  • Both gateways use the same frequency band.

  • The Central Gateway is in Built-in Network Server mode.

  • Port 1883 is open and not blocked by a firewall.

  1. Why is my end device not appearing in the Central Gateway?
    Possible reasons:

  • The device is not correctly registered under LoRa > Applications.

  • The device is using a different frequency plan.

  • The Extender Gateway is not forwarding packets correctly—check the MQTT topic subscriptions.

  1. Why am I not receiving data from Extender Gateways in the MQTT broker?
    Try the following:

  • Check if the Extender Gateway is sending messages (use MQTT Explorer).

  • Make sure the MQTT topic subscription is correct (gateway/{{eui}}/rx).

Glossary

To learn more about related terms, refer to the complete Glossary.

TERM DEFINITION NOTES

Central Gateway

The main gateway that manages LoRaWAN data and functions as an MQTT broker.

Can manage multiple extender gateways.

Extender Gateway

A gateway that forwards LoRaWAN packets to the Central Gateway using MQTT.

Must operate on the same frequency band as the Central Gateway.

 


Changelog
  • Version 1 - How to Configure a RAK Multi-Gateway LoRaWAN® Network
    • Date Published: 11/01/2025

 

Updated