Skip to content

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

  1. Create a gateway in The Things Stack Console and enter its gateway ID and the Gateway EUI printed on the device label.
  2. Select the Frequency Plan that matches the gateway RF hardware.
  3. 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

  1. Create a gateway API key with only Link as Gateway to a Gateway Server for traffic exchange rights.
  2. Use wss://<server-address>:8887 as the LNS endpoint.
  3. Obtain the PEM trust certificate appropriate for the deployment domain from The Things Stack Root Certificates reference.
  4. Format the API key as a CRLF-terminated Authorization line and save it as lns.key:
text
Authorization: Bearer <LNS-API-Key>\r\n

Never place a real API key in documentation, screenshots or support tickets.

Prepare CUPS credentials

Perform these steps only when using CUPS:

  1. Create a CUPS API key with rights to view gateway information, edit basic settings and retrieve gateway secrets.
  2. Retain the separate LNS API key from the previous section.
  3. Store the LNS API key in LoRa Basics Station LNS Authentication Key under the gateway's General Settings so CUPS can deliver it.
  4. Use https://<server-address>:443 as the CUPS endpoint.
  5. Prepare the domain trust PEM and format the CUPS API key as a CRLF-terminated cups.key:
text
Authorization: Bearer <CUPS-API-Key>\r\n

See 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.

gwTool6 English LNS page

Direct LNS:

  1. Open LNS Configuration and select direct Basic Station.
  2. Set tc.uri to wss://<server-address>:8887.
  3. Upload the LNS Trust PEM and upload or paste the complete lns.key in the Authorization/Key field.
  4. Save, wait for the service to recover and reload the configuration.

CUPS:

  1. Select Basic Station CUPS.
  2. Set cups.uri to https://<server-address>:443.
  3. Upload the CUPS Trust PEM and cups.key.
  4. 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:

gwTool7 TTN BasicStation LNS configuration in English

  1. Open LORAWAN → LoRaWAN NS. Under NS1, set Server location to Remote, select The Things Network as the vendor, and choose BasicStation LNS (basicstation_lns).
  2. Enter wss://<server-address>:8887 in Server URI. The screenshot uses eu1.cloud.thethings.network to demonstrate the format; replace it with the Server Address shown in the TTN Console.
  3. 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:

gwTool7 TTN BasicStation CUPS configuration in English

  1. Keep The Things Network selected and change Protocol to BasicStation CUPS (basicstation_cups).
  2. Enter https://<server-address>:443 in Server URI, then configure the matching trust PEM and CUPS key.
  3. Save, wait for CUPS to deliver the LNS settings, and reload the page. Do not overwrite the delivered values with stale local LNS settings.
  4. 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

  1. Open gateway Live data in the TTN Console and confirm connection events and uplinks appear.
  2. Trigger one known end-device uplink and verify Gateway EUI, frequency plan and timestamp.
  3. On gwTool6, inspect LoRa service status; on gwTool7, inspect LORAWAN → Traffic.
  4. With CUPS, confirm the gateway received the intended LNS endpoint and credentials instead of retaining stale settings.

Troubleshooting

SymptomChecks
401 or authentication failureAPI-key rights, CUPS/LNS key selection, complete Authorization line and CRLF termination
TLS failureGateway time, Server Address, trust PEM and domain certificate chain
CUPS connects but LNS stays offlineLNS Authentication Key in TTN General Settings, LNS-key rights and delivered CUPS values
Gateway is online but carries no trafficGateway EUI, Frequency Plan, gateway RF region, antenna and end-device channels
Management session drops after savingWait for the service restart, reconnect through a backup management path and read the effective configuration