Learn how to connect your RAK LoRaWAN® gateway to ChirpStack v4 via MQTT in Packet Forwarder mode, including setup, registration, configuration, and troubleshooting.
Prerequisites
Before configuring the connection, make sure the following conditions are met:
A deployed ChirpStack v4 Network Server
-
Open the following ports on your ChirpStack server:
MQTT 1883 for LoRaWAN packet forwarding
HTTP 8080 for ChirpStack Web UI access
A RAK Gateway with internet access
Gateway running WisGateOS 2 version 2.2.x or above
Register the Gateway in ChirpStack v4
This section provides step-by-step instructions for registering a RAK gateway in ChirpStack v4. For detailed instructions, refer to: How to Register a RAK Gateway in ChirpStack v4
Configure the Gateway
- Log in to the gateway's Web UI.
- Go to LoRa > Configuration, and set the Work Mode to Packet forwarder.
In the Protocol field, click the dropdown, then configure the following parameters:
- Protocol: Select LoRa Gateway MQTT Bridge.
- MQTT Protocol: Select MQTT ChirpStack 4.x (Protobuf).
- MQTT Broker Address: Enter the public IP address of your ChirpStack server, for example: 18.156.176.220
- MQTT Broker Port: 1883
- Click Save changes to apply the configuration.
Verify Gateway Status
Return to the ChirpStack Web UI and check the gateway status. If the configuration is correct, the status should change to Online within a few minutes.
Troubleshooting
| ISSUE | POSSIBLE CAUSE | SOLUTION |
| Gateway Offline |
- Wrong MQTT settings - Incorrect broker IP - Port not open |
Verify MQTT protocol and check server IP/port reachability. |
| Wrong Gateway EUI | Find it in the gateway’s Web UI under Dashboard > Overview, or on the enclosure label marked GWEUI. | |
| Region mismatch | Check chirpstack.toml and ensure the region is listed in enabled_regions. | |
| Gateway not connected to the Internet | Ensure the gateway can reach the internet or the server IP. |
FAQs
Can I use a private IP for the ChirpStack v4 server address?
Yes, you can use a private IP address if both the ChirpStack server and the gateway are on the same local network (LAN).
This setup avoids the need for public routing and is commonly used in local or on-premise deployments.
What if my gateway firmware is older than WisGateOS 2.2.x?
You should update to the latest WisGateOS 2 firmware before proceeding.
You can check your current version and perform the upgrade through the gateway’s Web UI under System > Firmware.
For detailed instructions and download links, refer to the official upgrade guide: WisGateOS 2 Firmware Upgrade Documentation .
Why can’t I receive uplink data when subscribing based on the device’s sub-band on a 16-channel gateway?
When a 16-channel gateway connects to ChirpStack v4, the MQTT topic prefix wildcard {{region}} is automatically mapped to the first 8-channel sub-band within the 16-channel range.
For example, in the US915 region, if the gateway operates on channels 0–15, {{region}} is resolved as us915_0.
Even if the device uses AT+MASK=0002 (channels 8–15, corresponding to us915_1) to send uplink data, the gateway still publishes messages using us915_0 as the topic prefix.
As a result, subscribing to the second sub-band (for example, us915_1) will not return any data. You must subscribe to us915_0 to receive uplink messages.
Additionally, ensure that all required sub-bands are enabled in ChirpStack.
This behavior applies to regions with standardized sub-band definitions, such as US915, AU915, and CN470.
Changelog
-
Version 2 - Added FAQ
- Date Published: 04/01/2026
-
Version 1.1 - Added UTM links
- Date Published: 09/01/2025
-
Version 1 - How to Connect RAK Gateways to ChirpStack v4 via MQTT
- Date Published: 08/07/2025
Updated