Connect gwTool6/gwTool7 Gateways to TTN with Basic Station
This guide covers LoRa Basics Station connections to The Things Stack/TTN. GD61/GD61x uses gwTool6; GDI51, GDO51 and GDI52 use gwTool7. The old GDI51/GDO51 WebServer procedure remains available in GW-AN09.
Register the gateway
- Create a gateway in The Things Stack Console and enter its gateway ID and the Gateway EUI printed on the device label.
- Select the Frequency Plan that matches the gateway RF hardware.
- Record the Server Address for the deployment. Use this value for
<server-address>below.
See the official LoRa Basics Station overview.
Choose LNS or CUPS
- LNS is the connection required to exchange LoRaWAN uplinks and downlinks.
- CUPS provides centralized configuration and automatically sends the LNS endpoint, trust certificate and LNS API key to the gateway.
- After CUPS connects successfully, do not maintain a second independent set of local LNS credentials; values delivered by CUPS override them.
Prepare LNS credentials
- Create a gateway API key with only Link as Gateway to a Gateway Server for traffic exchange rights.
- Use
wss://<server-address>:8887as the LNS endpoint. - Obtain the PEM trust certificate appropriate for the deployment domain from The Things Stack Root Certificates reference.
- Format the API key as a CRLF-terminated Authorization line and save it as
lns.key:
Authorization: Bearer <LNS-API-Key>\r\nNever place a real API key in documentation, screenshots or support tickets.
Prepare CUPS credentials
Perform these steps only when using CUPS:
- Create a CUPS API key with rights to view gateway information, edit basic settings and retrieve gateway secrets.
- Retain the separate LNS API key from the previous section.
- Store the LNS API key in LoRa Basics Station LNS Authentication Key under the gateway's General Settings so CUPS can deliver it.
- Use
https://<server-address>:443as the CUPS endpoint. - Prepare the domain trust PEM and format the CUPS API key as a CRLF-terminated
cups.key:
Authorization: Bearer <CUPS-API-Key>\r\nSee the official LNS guide and CUPS guide.
Gateway configuration
Record the existing LoRaWAN server settings first. Changing the uplink driver restarts related services; do not proceed during OTA or critical traffic.
gwTool6
Applicable models: GD61/GD61x.

Direct LNS:
- Open LNS Configuration and select direct Basic Station.
- Set
tc.uritowss://<server-address>:8887. - Upload the LNS Trust PEM and upload or paste the complete
lns.keyin the Authorization/Key field. - Save, wait for the service to recover and reload the configuration.
CUPS:
- Select Basic Station CUPS.
- Set
cups.uritohttps://<server-address>:443. - Upload the CUPS Trust PEM and
cups.key. - Save and wait for CUPS to deliver the LNS settings; do not overwrite the delivered settings with stale local values.
gwTool7
Applicable models: GDI51, GDO51 and GDI52.
Direct LNS:

- Open LORAWAN → LoRaWAN NS. Under NS1, set Server location to Remote, select The Things Network as the vendor, and choose BasicStation LNS (basicstation_lns).
- Enter
wss://<server-address>:8887in Server URI. The screenshot useseu1.cloud.thethings.networkto demonstrate the format; replace it with the Server Address shown in the TTN Console. - Configure the matching trust PEM and LNS key. If the delivered firmware has no Authorization/Key control, do not place the API key in the client-private-key field; contact technical support for the credential-import method supported by that firmware.
CUPS:

- Keep The Things Network selected and change Protocol to BasicStation CUPS (basicstation_cups).
- Enter
https://<server-address>:443in Server URI, then configure the matching trust PEM and CUPS key. - Save, wait for CUPS to deliver the LNS settings, and reload the page. Do not overwrite the delivered values with stale local LNS settings.
- Verify the connection and traffic in both Traffic and the TTN Console.
Firmware variations
Certificate, Authorization/Key and CUPS controls vary between gwTool7 firmware deliveries. A CA, client certificate, client private key and TTN API key serve different purposes. If the required Authorization/Key control is absent, do not guess by using a similar field; contact technical support for the credential-import method or approved upgrade path.
Verify the connection
- Open gateway Live data in the TTN Console and confirm connection events and uplinks appear.
- Trigger one known end-device uplink and verify Gateway EUI, frequency plan and timestamp.
- On gwTool6, inspect LoRa service status; on gwTool7, inspect LORAWAN → Traffic.
- With CUPS, confirm the gateway received the intended LNS endpoint and credentials instead of retaining stale settings.
Troubleshooting
| Symptom | Checks |
|---|---|
401 or authentication failure | API-key rights, CUPS/LNS key selection, complete Authorization line and CRLF termination |
| TLS failure | Gateway time, Server Address, trust PEM and domain certificate chain |
| CUPS connects but LNS stays offline | LNS Authentication Key in TTN General Settings, LNS-key rights and delivered CUPS values |
| Gateway is online but carries no traffic | Gateway EUI, Frequency Plan, gateway RF region, antenna and end-device channels |
| Management session drops after saving | Wait for the service restart, reconnect through a backup management path and read the effective configuration |