Skip to content

Connect gwTool6/gwTool7 Gateways to TTN / The Things Stack with Basic Station

This guide covers two LoRa Basics Station paths from ManThink gateways to The Things Stack (TTN): recommended CUPS and direct LNS. GD61/GD61x uses gwTool6; GDI51, GDO51 and GDI52 use gwTool7. The old GDI51/GDO51 WebServer procedure remains available in GW-AN09. The gwTool6 v1.0.3 procedure has been checked against the current interface and source, but no configuration was saved, no driver was switched, and no platform connection was tested on the documentation gateway.

Register the gateway

  1. In The Things Stack Console, create a gateway and enter the device's 16-digit hexadecimal Gateway EUI.
  2. Select a Frequency Plan that matches the gateway RF hardware, factory region, and operating frequencies.
  3. Record the Server Address shown in Console. Replace <server-address> below with that value.
  4. Open gateway Live data for connection and packet verification after configuration.

Official overview: LoRa Basics Station.

Choose LNS or CUPS

  • LNS carries LoRaWAN uplink and downlink traffic. Its address is normally wss://<server-address>:8887.
  • CUPS is the configuration and update connection. Its address is normally https://<server-address>:443; it delivers the LNS URI, trust chain, and LNS credential.
  • gwTool6 defaults to CUPS for the TTN vendor. Direct LNS can be used when centralized configuration is not required.
  • CUPS and LNS API keys have different rights and are not interchangeable.

GD61/GD61x direct LNS path to The Things Stack

GD61/GD61x CUPS provisioning path to The Things Stack LNS

CUPS can overwrite LNS settings

Configuration returned by CUPS takes precedence over local LNS values. When moving from CUPS to direct LNS, the saved result must clear the old CUPS URI. Reread the configuration and confirm CUPS is no longer active; otherwise, the gateway can continue obtaining configuration from CUPS.

Prepare LNS credentials

  1. Create an LNS API key for this gateway with only Link as Gateway to a Gateway Server for traffic exchange permission.
  2. Use wss://<server-address>:8887 as the LNS address.
  3. Download the PEM root certificate that matches the Server Address from The Things Stack Root Certificates page.
  4. Format the API key as a complete Authorization line ending in CRLF:
text
Authorization: Bearer <LNS-API-Key>\r\n

Trust and Token key are separate fields in gwTool6. Do not enter the API key as a client private key or upload real credentials to a ticket or public document.

Prepare CUPS credentials

Complete this section only when using CUPS:

  1. Create a CUPS API key with the required rights to view gateway information, edit basic gateway settings, and retrieve gateway secrets.
  2. Keep the LNS API key from the previous section; the two keys are not interchangeable.
  3. Store the LNS API key as LoRa Basics Station LNS Authentication Key in the gateway General Settings so CUPS can deliver it as the LNS credential.
  4. Use https://<server-address>:443 as the CUPS address.
  5. Prepare the root certificate for the Server Address and format the CUPS API key as an Authorization line ending in CRLF:
text
Authorization: Bearer <CUPS-API-Key>\r\n

Official procedures: LNS, CUPS, and root certificates.

Gateway configuration

Pre-configuration checks

Record the firmware, region, Gateway EUI, current driver, output mode, and server from Overview and LoRaWAN NS. Confirm that the management path remains available during a LoRa driver change and avoid OTA, configuration writes, and critical downlink activity.

Semtech UDP uses Packet Forwarder; LNS/CUPS uses Basic Station. The drivers are mutually exclusive, and a change cold-restarts LoRa forwarding for about 30–60 seconds.

gwTool6

Applicable models: GD61/GD61x.

gwTool6 English TTN BasicStation CUPS example

  1. Open LoRaWAN NS and set Vendor to TTN.
  2. Set Protocol to BasicStation CUPS (default).
  3. Enter https://<server-address>:443 in CUPS address.
  4. Select token authentication. Put the matching PEM root certificate in Trust and the complete CUPS Authorization line in Token key.
  5. During a maintenance window, select Save and apply and wait for LoRa forwarding to recover.
  6. Reopen the page and check System Logs to confirm CUPS returned an LNS URI, trust chain, and LNS credential.
  7. Verify connection events and uplinks in TTN Console Live data.

server-address in the screenshot is a format placeholder, and gray masks hide test-environment identifiers. Credential-status badges only indicate that the device already has material; they are not the values for this procedure.

Use direct LNS

gwTool6 English TTN BasicStation LNS example

  1. Set Vendor to TTN and Protocol to BasicStation LNS.
  2. Enter wss://<server-address>:8887 in LNS address.
  3. Select token authentication. Put the matching PEM root certificate in Trust and the complete LNS Authorization line in Token key.
  4. If the device previously used CUPS, confirm that this save clears the old CUPS URI.
  5. Select Save and apply, wait for recovery, then reread the page. Confirm direct LNS is currently effective rather than the old CUPS configuration.
  6. Verify the connection, uplink, and a controlled downlink in Live data.

Typical TTN cloud deployments use server TLS plus an API key and do not need a gateway client certificate. Select client-certificate authentication only when the target deployment explicitly requires mutual TLS, using the certificate and key supplied for that deployment.

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. In gwTool6, confirm Basic Station and the target server under Currently effective; in gwTool7, reload LoRaWAN NS and confirm the protocol, endpoint, and credential state did not revert.
  2. Check System Logs; in gwTool7, also open LORAWAN → Traffic. Confirm there are no DNS, TLS, Authorization, CUPS, or LNS errors.
  3. Confirm that gateway connection events appear in TTN Console Live data.
  4. Trigger a known end-device uplink and verify Gateway EUI, Frequency Plan, frequency, and time.
  5. During an approved maintenance window, send one controlled downlink.
  6. With CUPS, also confirm that the delivered LNS address and credential are active. With direct LNS, confirm the old CUPS URI is cleared.

A selectable option, successful save, or single connection event does not prove the integration is complete. Verify sustained online state, a known uplink, and a controlled downlink.

Troubleshooting

SymptomChecks
401 / authentication failureConfirm the key belongs to this gateway, has the correct rights, is not the other CUPS/LNS key, and includes a complete Authorization line with CRLF
TLS failureGateway time, Server Address, port, root certificate, and domain certificate chain
CUPS succeeds but LNS stays offlineLNS Authentication Key in General Settings, LNS key rights, and the CUPS response
Direct LNS still uses CUPSConfirm that the saved result cleared the old CUPS URI; reread the configuration and logs for the active endpoint
Online but no uplinkGateway EUI, Frequency Plan, gateway RF region and operating frequencies, antenna, and end-device channels
Uplink works but downlink failsReceive windows, network latency, gateway time, TTN Live data, and transmit frequency
Briefly offline after saveWait about 30–60 seconds for the driver cold restart, then sign in again; do not repeatedly save or reboot

Official troubleshooting: The Things Stack gateway troubleshooting.