Skip to main content

Connecting to TTN

There are two ways to connect to the Things Network: Packet forward and Basics™ Station. Choose a way to connect your gateway.

Semtech UDP Packet Forwarder is the original LoRaWAN® packet forwarder, connecting to servers through the Semtech UDP protocol.

LoRa Basics™ Station is the preferred way of connecting Gateways to The Things Stack.

Connecting via Packet Forwarders

The Semtech UDP Packet Forwarder is the original LoRaWAN® packet forwarder, connecting to servers through the Semtech UDP protocol.

TTN Configuration

  • Step 1: Log into The Things Stack. If you don't have a TTN account, please register first.

  • Step 2: Register the gateway

pir

Gateway EUI: Gateway EUI can be found on the device label or Local Console

Gateway ID: A unique identifier for your gateway(the ID must contain only lowercase letters, numbers, and dashes)

Gateway name: A name of your gateway

Frequency plan: Select the corresponding frequency according to your gateway version

pir

You can check the Gateway in the overview after successful registration.

pir

Gateway Configuration

Configure the gateway via the Web UI,please check the Quick Start to log into Local Console first.

  • Step 1: LoRa Network Settings

Navigate to LoRaLoRa Network

pir

  • Step 2: Set Mode to Packet Forward

pir

  • Step 3:Packet Forwarder Settings:
  1. Gateway EUI: It will automatically get the EUI of the connected gateway

  2. Server Address: For Semtech UDP Packet Forwarder use 'server-address' The 'server-address' is the address of your The Things Stack deployment. See Server Addresses for more info.

  3. Server Port(Up/Down): The Up Port and Down Port are typically 1700.

Other settings can be left as default, or can be changed to suit your requirements.

pir

Click Save&Apply to apply your settings.

  • Step 4: Channel Plan Settings

Navigate to LoRaChannel Plan

pir

Select the Region and Frequency plan according to the actual choice.

pir

After setting, click Save&Apply

Connecting via Basic Station

LoRa Basics™ Station is the preferred way of connecting Gateways to The Things Stack.

TTN Configuration

  • Step 1: Register gateway

pir

  • Step 2:Enable Require authenticated connection

pir

This will only allow a gateway to connect if it uses a TLS enabled Basic Station or MQTT connection.

  • Step 3: Create an API key

Select a option to generate a API key for the CUPS or LNS service automatically, then you can authorize the gateway right away.

pir

Choose a Server according to your need, then click “Register gateway”

LoRaWAN Network Server (LNS)

LNS establishes a data connection between a LoRa Basics™ Station gateway and a Network Server (in this case, The Things Stack). LoRa® uplink and downlink frames are exchanged through this data connection. The LNS protocol is required for sending and receiving LoRaWAN data.

Configuration and Update Server (CUPS)

CUPS allows a Network Server to configure gateways remotely, and to update gateway firmware. CUPS is not required for sending and receiving LoRaWAN data, but it can greatly simplify the management of gateways. Configuring CUPS will also automatically retrieve LNS credentials and configure LNS on your gateway.

More information about LoRa Basics™ Station is available at Semtech’s Developer Portal.

Gateway Configuration

  • Step 1: LoRa Network Settings Navigate to LoRa > LoRa Network

pir

  • Step 2:Set Mode to Basics Station

pir

  • Step 3:Basic Station Settings:
  1. Gateway EUI: It will automatically get the EUI of the connected gateway

  2. Server: Select LNS or CUPS Check the previous step for more details about the servers.

  3. URL:: CUPS uses the URI: https://server-address:443

LNS uses the URI: wss://server-address:8887

pir

  1. Authentication Mode: TLS server authentication and Client token The Things Stack supports TLS server authentication and client token. This requires a .trust file and a .key file. .

  2. trust: This is the CA certificate which secures your domain. A .pem file containing common certificates is available in the Root Certificates Reference. Copy the data content of the certificate file (the certificate can be opened in text form).

  1. token: Authorization:Bearer <Your_API_Key>

Other settings can be left as default, or can be changed to suit your requirements.

pir

Check the Gateway Status

After the settings are completed, we can view the live data of your gateway.

You can see that your gateway is connected to TTN now.

pir

Loading Comments...