Series note: This is Part 9 of the ManThink LoRaWAN Technical Deep-Dive series. Reading the previous eight parts in order will give you the most complete context.

Why the Last Mile Matters

In any LoRaWAN deployment, the most easily overlooked piece is the "last mile" between the LoRaWAN gateway and the LoRaWAN Network Server (LNS / NS).

The radio side gets all the attention — we've spent several articles on SX1302's 16 parallel channels, TDOA time synchronization, and Class A RX windows. Meanwhile, the part that actually moves the LoRaWAN frame from the gateway to the server is often glossed over with a casual "it uses the packet forwarder." But once your deployment scales to hundreds of devices, crosses a public network, or faces security compliance requirements, this "last mile" turns into the segment that deserves the most scrutiny.

This article lays the three common LoRaWAN gateway-to-server backhaul protocols side by side:

Then we explain which one a default open-source gateway like the ManThink GD6 supports, why the "protocol menu" looks different across ThinkLink, ChirpStack, and TTN, and how to make the right engineering choice.

1. Where Each Protocol Came From

1.1 Semtech UDP Packet Forwarder (2014 – Present)

This is Semtech's reference implementation from the SX1301 era. It runs a daemon like poly_pkt_fwd / lora_pkt_fwd on a Linux host, pushing uplink JSON frames (rxpk) received by the SX130x chip to the LNS, and writing downlink JSON frames (dnmsg) returned by the LNS into the concentrator queue.

Its strength is simplicity — tens of KB of RAM is enough; you can port it to a non-standard platform in hours. For an intranet or private test bench, this is still the most direct solution after twenty years.

But the flaws are equally fatal:

Semtech's official lora_gateway repository was the de-facto standard during the SX1301 era, but with SX1302/SX1303 it has been marked NRND (Not Recommended for New Designs), and new-generation gateways generally pivot to Basic Station. ThinkLink's gwTool6 Configuration Guide also marks UDP Packet Forwarder as something "to be used in a controlled network or with additional network protection only."

Key fact: UDP Packet Forwarder is unencrypted, unauthenticated, and has no built-in link-state monitoring.

1.2 ThinkLink MQTT Bridge — Message-Bus Mode

MQTT Bridge is not a standard protocol defined by the LoRa Alliance. Instead, it is a gateway-to-server transport mode that uses MQTT topics to carry LoRaWAN uplink and downlink frames. LoRaWAN messages are mapped to MQTT messages, routed by a Broker.

In ManThink's product line, MQTT Bridge primarily serves the ThinkLink platform. Section 5.2 of the gd6-configuration-guide makes this explicit: ThinkLink MQTT is only available under the ThinkLink vendor combination, and is composed of the following elements:

Field Description
Broker URI ssl://... or tcp://..., pointing at the ThinkLink platform
Client ID The gateway's unique identifier on the Broker
Username / Password Broker credentials
Topic MQTT topics for uplink, downlink, status, etc.
QoS QoS 0 / 1 / 2, by message importance
TLS Material One-way / two-way TLS credentials; with mutual TLS, CA, client cert, and client key must be a matching set

Why does this exist? Because outside of LoRa, MQTT is the de-facto "device protocol gateway" — device → MQTT Broker → business system — the entire chain uses the same message bus. Lifting this pattern onto a LoRaWAN gateway means engineering teams can use a familiar Broker cluster to manage both LoRa end devices and Wi-Fi / 4G devices — the architecture becomes more uniform.

Key MQTT Bridge characteristics:

A critical note: MQTT Bridge and the "remote configuration" channel are two independent connections. gwTool6 dedicates a separate section to "remote configuration," which requires its own Broker, Client ID, Topic, and TLS credentials, and explicitly warns not to confuse the LoRaWAN channel's MQTT credentials with the remote configuration ones — a common on-site troubleshooting pitfall.

Key fact: MQTT Bridge is a transport mode, not a LoRa Alliance specification. It is driven by the ThinkLink-side platform and primarily serves engineering teams that already speak MQTT.

1.3 LoRa Basics Station (2019 – Present)

LoRa Basics Station was jointly introduced by Semtech and the LoRa Alliance as the official "replacement" for UDP Packet Forwarder. The "Basics" in the name refers to the fact that it specifies both the connection protocol and the reference implementation as an open-source baseline.

Its architecture is two separate WebSocket / HTTPS interfaces:

Splitting the data channel from the management channel brings three engineering benefits:

  1. Configuration can be rotated remotely: no on-site visits to change gateway settings;
  2. Zero-touch deployment: from factory shipping to plugging in power, the gateway auto-connects to CUPS and auto-receives LNS credentials;
  3. Unified management of large gateway fleets: thousands of gateways share the same credentials and channel plan.

Protocol-stack essentials:

The two authoritative references:

The GW-AN08 practical document summarizes the four core advantages perfectly: Basic Station offers a more efficient WebSocket-based communication, supports dynamic frequency updates (CUPS), has built-in encrypted transport (TLS), and provides superior network management and remote configuration capabilities compared to the traditional UDP Packet Forwarder.

Key fact: Basic Station is the LoRa-Alliance-recommended "modern" backhaul protocol, with WebSocket + TLS + dual channels (LNS for data + CUPS for management) at its core.

2. Engineering Comparison Table

Putting the three protocols side by side, item by item (synthesized from Yibyte, Kerlink, and LoRa Alliance official resources):

Aspect Semtech UDP PF ThinkLink MQTT Bridge LoRa Basics Station
Transport Layer UDP connectionless TCP / MQTT long connection (TLS optional) WebSocket long connection
Encryption No standard (typically cleartext) TLS / mTLS optional (depends on Broker) TLS 1.2 / 1.3, mTLS possible
Platform Identity Check None Via Broker account / TLS Server root cert + Token / mTLS
Link Monitoring None native, relies on app heartbeat MQTT keepalive Native protocol heartbeat + auto-reconnect
Remote Configuration / Upgrade None native None native (CUPS-like handled by platform) CUPS interface natively supported
NAT / Firewall Friendliness Poor (requires port mapping) Good Good (WebSocket-based)
Gateway Resource Usage Very low (tens of KB RAM enough) Medium (depends on Broker config) Medium (impl + TLS + WebSocket)
Implementation Complexity Low Medium (need Broker integration) Medium-High (certs, time sync)
Cross-Vendor Interoperability Best (legacy standard) Platform-dependent Good (LoRa Alliance spec)
Suitable Scenarios Intranet testing, small scale, cost-sensitive Platform-as-Broker, unified device message bus Public network, large scale commercial, high-security

Note: GD6 (gwTool6 v1.0.3) defaults to BasicStation CUPS under the TTN vendor; Semtech UDP under the ChirpStack vendor (replaced by BasicStation LNS); and ThinkLink MQTT or a delivery-determined option under the ThinkLink vendor.

3. The Three Platforms' Default Support Matrix: A GD6 Field Guide

The LoRaWAN NS page on GD6 (gwTool6 v1.0.3) presents the "vendor × protocol" combinations directly. This table is the first thing to memorize on the engineering side:

Platform Vendor Available Protocols Default Protocol
ThinkLink ThinkLink MQTT, Semtech UDP Determined by factory delivery
ChirpStack Semtech UDP, BasicStation LNS Semtech UDP
TTN / The Things Stack BasicStation CUPS, BasicStation LNS, Semtech UDP BasicStation CUPS

Some hidden rules in this matrix:

  1. Drivers are mutually exclusive: Semtech UDP runs on the Packet Forwarder driver; Basic Station LNS / CUPS runs on the Basic Station driver. Both are stored in the same configuration file. Switching drivers on save triggers a cold restart of LoRa forwarding for ~30–60 seconds. So you must avoid OTA, configuration-write, and critical downlink windows.
  2. ChirpStack does not support CUPS: The MCP documentation explicitly states that ChirpStack's basicstation gateway bridge only supports basicstation-lns, not basicstation-cups. When choosing Basic Station, you can only pick LNS.
  3. CUPS overrides local configuration: The LNS URI and credentials returned by CUPS take precedence over what you filled in locally. When switching back from CUPS to direct LNS, the old CUPS URI must be cleared, or the gateway will silently continue going through CUPS.
  4. CUPS API Key and LNS API Key have different permissions: They cannot be interchanged on the TTN Console.
  5. Driver and channel plan interaction: in Basic Station mode, the local channel settings on the "Radio Parameters" page effectively do not apply — the channel plan is pushed by LNS / CUPS. Only when switched back to Packet Forwarder do local channel settings take effect again.
  6. mTLS only when explicitly required: Most TTN cloud deployments use server TLS + API Key only, with no client certificate needed.

Key fact: The protocol menu and default behavior differ across the three platforms in GD6 — this is the on-site trap that every integration document reiterates.

4. Selection Decision Tree

A "three-step" decision flow you can walk through:

Step 1: Determine deployment scale and exposure

Step 2: Check platform support

Step 3: Consider operations and compliance

Quick mnemonic:

Testing in intranet? UDP. Production deployment? Basic Station. Platform eats MQTT? Bridge.

5. Engineering Details of Basic Station: 5 Things You Must Know

If you ultimately choose Basic Station, the following five items are pits you will almost certainly encounter.

5.1 wss, Not ws

The LNS URI must start with wss:// (production); the CUPS URI must start with https://. This means:

5.2 API Key + CRLF Is Mandatory

The trust field and Token Key field in gwTool6 are stored separately. The Token Key needs to be assembled into a complete HTTP Authorization line, terminated with CRLF (\r\n) — missing one carriage return, TLS passes but 401 persists.

The two keys for CUPS and LNS have different permissions and cannot be interchanged:

5.3 CUPS Will "Override Back" the Local Configuration

Once CUPS connects successfully, the LNS URI + credentials + channel plan it pushes override the values you saved locally. When switching back from CUPS to LNS, the old CUPS URI must be actively cleared — this is the root cause of the "switch to direct LNS but still goes through CUPS" trap explicitly warned about in the gwTool6 documentation.

5.4 mTLS Only When Genuinely Needed

mTLS (mutual TLS) means each gateway needs:

Proper usage: in a highly controlled industrial network or on platforms that mandate mTLS (e.g., AWS IoT Core for LoRaWAN). Most public deployments of TTN / ChirpStack use single TLS + Token only. Don't enable mTLS just "for the sake of looking more secure" — it only adds operations cost; it doesn't make the data itself more confidential.

5.5 Driver Switching Is a Cold Restart

After saving the protocol choice, gwTool6 performs a cold restart of LoRa forwarding for ~30–60 seconds. This means:

6. Field Experience with MQTT Bridge

MQTT Bridge, unlike Basic Station, is not as "standardized," but if you deploy the ThinkLink platform, you can't bypass it. A few principles:

7. Is UDP Packet Forwarder Still Useful?

Yes, in limited scenarios:

Not recommended for:

GD6 still keeps the UDP PF option, primarily serving: integration with legacy platforms, integration with proprietary self-developed NS, integration with teaching / demo scenarios.

Key fact: UDP PF has now degenerated to an "intranet fallback protocol" — production deployment defaults to Basic Station (public network) or MQTT Bridge (ThinkLink ecosystem).

8. Migration Path: From UDP PF to Basic Station

If your legacy network still uses UDP PF, the recommended migration path is:

  1. Coexistence phase: first disable all downlink on GD6 and only enable uplink testing. Basic Station and UDP PF are driver-mutex on GD6, so you can only "switch and then switch back."
  2. Dual-protocol parallel: typical for ChirpStack — UDP PF for legacy links, Basic Station LNS for new links, two Bridges coexisting.
  3. CUPS takes over bulk configuration: after going on Basic Station, don't let operations staff fill in LNS URI one by one manually — set up CUPS and let the server push everything automatically.
  4. Credential rotation plan: set validity periods for LNS API Keys / client certificates, and rotate them regularly.
  5. Fallback plan: keep 1–2 UDP PF fallback gateways, in case Basic Station fails.

The whole migration generally takes 1–2 weeks — provided you've already prepared "maintenance windows" and "credential management."

9. Selection Cheat Sheet

Scenario Recommended Protocol Key Reason
Intranet testing / teaching UDP Packet Forwarder Simplest, fastest, fewest dependencies
TTN public network production Basic Station (CUPS + LNS) LoRa Alliance modern standard, remote batch management
ChirpStack self-built NS Basic Station LNS Compatible with legacy deployments, strongly recommend migrating from UDP
ThinkLink platform self-deployment ThinkLink MQTT Bridge Unifies MQTT message bus with the platform's other devices
Large-scale heterogeneous network (≥100 gateways) Basic Station + CUPS Zero-touch provisioning, remote credential rotation, scalable operations
Extreme resource-constrained devices UDP PF Lowest resource usage, can be trimmed
Strict audit / compliance requirements Basic Station + mTLS or MQTT + mTLS Mutual certificates + platform identity check
Multi-protocol coexistence (heterogeneous NS) Depends on platform; GD6 can only run one driver at a time Switch requires 30–60 second cold restart window, plan a maintenance window

10. Common Misconceptions

Finally, here are several "taken-for-granted" claims that reappear on engineering sites:

  1. "Basic Station is unencrypted" — Wrong. Basic Station defaults to TLS. Whether encrypted depends on whether the URI uses wss:// or ws://, and the LNS server side enforces it.
  2. "UDP Packet Forwarder has no users in 2026" — Also wrong. Teaching, R&D, and intranet deployments are still using it at scale.
  3. "MQTT Bridge is just fiddling with Topics" — That's only the tip of the iceberg. MQTT Bridge in ThinkLink comes with TLS, credentials, and multi-Topic routing — a complete engineering-grade integration mode.
  4. "CUPS looks complex, so skip it at small scale" — CUPS really isn't necessary for under 5 gateways. But when ops starts complaining "why do I have to manually configure every new gateway," it's time to bring CUPS in.
  5. "Basic Station equals the free version" — Wrong. Basic Station is a protocol specification introduced by the LoRa Alliance, with Semtech providing an open-source reference implementation. TTN, ChirpStack, AWS IoT Core for LoRaWAN etc. all implement the spec on their server side.
  6. "Switching protocol is just changing a dropdown" — Wrong. On GD6, switching protocols triggers a cold restart of LoRa forwarding for 30–60 seconds. Don't switch during critical business windows.

Closing Thoughts

Designing the gateway-to-LNS "last mile" protocol correctly determines the operability and scalability of the entire LoRaWAN network. Semtech UDP PF is "lowest cost," MQTT Bridge is "platform-fit," and Basic Station is "long-termism" — all three are reasonable answers in their respective scenarios.

The GD6 open-source gateway supports all three protocols natively, and the gwTool6 protocol menu automatically recommends a combination per platform. New projects should follow the pattern of Basic Station + LNS (production) + UDP PF (experimentation) from day one; legacy projects should migrate steadily using the pattern of "coexist → switch → wind down."


Reference Documentation

Series Reading

  1. LoRaWAN Device Joining: OTAA vs ABP — How to Choose?
  2. Understanding the LoRaWAN ADR Mechanism: Who Controls the Data Rate
  3. LoRaWAN Regional Parameters: Why CN470 and EU868 Have Different Channel Counts
  4. LoRa Physical Layer Parameters: How SF, BW, CR Affect Range and Throughput
  5. LoRaWAN Device Classes (Class A / B / C) Compared: Trade-offs and Use Cases
  6. Semtech SX1301 vs SX1302 vs SX1303: The Concentrator Chip Evolution
  7. ESP32-S3 in IoT Gateways: Why We Chose It Over STM32
  8. LoRa Geolocation Fundamentals: TDOA vs RSSI Compared
  9. This article: LoRaWAN Gateway Backhaul Protocols: Semtech UDP / MQTT Bridge / Basic Station Compared

This series is compiled by the ManThink team based on gwTool6 v1.0.3 + LoRa Alliance + Semtech official resources.