v3.23.1

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Gateways

    Overview
  • Concepts
  • Models
    • Building a gateway with Raspberry Pi and IC880A
    • Browan Minuhub Pro
    • Cisco Wireless Gateway for LoRaWAN
    • CloudGate
    • COTX
    • Dragino LPS8
    • Kerlink Wirnet iStation
    • Kerlink Wirnet Station
    • Laird Sentrius™ RG1xx LoRaWAN Gateway
    • MikroTik KNOT
    • MikroTik LtAP
    • MikroTik Routerboard wAP LoRa8 kit
    • Milesight UG6X LoRaWAN Gateway
    • Milesight UG8X LoRaWAN Gateway
    • MOKOSMART MKGW2-LW LoRaWAN Gateway
    • MultiTech Conduit AEP
    • MultiTech Conduit mLinux
    • NASys LoRaWAN Outdoor Gateway
    • RAK7240 WisGate Edge Prime
    • Tektelic Kona Micro IoT LoRaWAN Gateway
    • The Things Indoor Gateway
    • The Things Kickstarter Gateway
    • The Things Outdoor Gateway
    • Wifx LORIX One
  • Troubleshooting Gateways

The Things Indoor Gateway

New in 3.13.3

{{% ttig %}}

This page guides you to connect The Things Indoor Gateway to The Things Stack.

The Things Indoor Gateway is an 8 Channel LoRaWAN gateway, whose technical specifications can be found in the official documentation.

Prerequisites

  1. User account on The Things Stack with rights to create Gateways and API Keys.
  2. The gateway EUI. The EUI of the gateway is not the WiFi MAC address printed on the back of the gateway, but is derived from the first number that typically is of the form 58A0CBxxxxxx, printed on the top of the sticker below the QR code. For example, if that number is 58A0CB800BE7, insert FFFE after the first 6 characters to make it a 16 character Gateway EUI (e.g. 58A0CBFFFE800BE7).

The gateway EUI can later be found at the bottom in the WiFi setup screen.

{{% ttig %}} EUI
  1. The WiFi password of the The Things Indoor Gateway, typically printed on the back of the gateway.

Claiming The Things Indoor Gateway

The Things Indoor Gateway is added to The Things Stack via a process called Gateway Claiming.

Note:
Claiming of gateways is not supported on The Things Stack Open Source.
  • Console
  • CLI

Go to Gateways in the top menu, and click + Register Gateway to reach the gateway registration page.

Fill the Gateway EUI and click Confirm.

Depending on whether the Gateway EUI is claimable you will either be shown the claiming form or the manual registration form.

Warning:
Do not register your TTIGs via the manual registration. All TTIGs should be claimable, if you see the manual registration form please contact support.

If your gateway is claimable, you will see the claiming form. Here, fill in the Authentication Code, Gateway ID and the Frequency Plan.

Click Claim Gateway to finish.

{{% ttig %}} Claiming

If your inputs are correct, a new gateway will be created and you will be redirected to the gateway overview page of your newly created gateway.

The following example claims and configures a gateway with EUI 00800000A00009EF and Gateway ID gtw1 to the The Things Stack Community Edition eu1 cluster.

Please adapt the example for your specific case.

tti-lw-cli gateways claim 00800000A00009EF \
--authentication-code abcdef \
--target-gateway-id gtw1
--target-cups-uri https://eu1.cloud.thethings.network:443 \
--target-gateway-server-address eu1.cloud.thethings.network \
--target-frequency-plan-id EU_863_870 \
--user-id user1

For The Things Stack Cloud, you will also need to append the Tenant ID to --target-cups-uri and --target-gateway-server-address fields.

For example using tenant1, the target-cups-uri would be https://tenant1.eu1.cloud.thethings.industries:443 and the target-gateway-server-address would become tenant1.eu1.cloud.thethings.industries.

Connecting The Things Indoor Gateway

Gateways Connected to Another LNS

Note:
This is applicable if your gateway was previously connected to The Things Network v2.

If the The Things Indoor Gateway is currently connected to another LNS, do either of the following

  • Wait up to 24 hrs (this is the default action for gateways that are not physically reachable). The Things Indoor Gateway connects to the server every 24 hours to check for new configuration.
  • Perform a hard reset by holding down the reset button for at least 5 seconds. Then, follow the new gateway instructions below.

New Gateways

If your gateway has never been configured to any LNS, follow the steps below.

Keep the RESET button (small button at the back of the gateway next to the USB-C port) pressed for 5 seconds until the LED blinks rapidly from GREEN to RED and vice versa for a couple of times.

Hold the SETUP button (at the top of the gateway, next to the LED) for 10 seconds until the LED rapidly blinks RED.

The gateway now exposes a WiFi access point whose SSID is MINIHUB-xxxxxx, where xxxxxx is the last 6 digits of the gateway EUI. The password for this network is same WiFi password from the Prerequisites.

After connecting to this network go to 192.168.4.1 using a web browser to access the WiFi config page.

{{% ttig %}} WiFi Setup

Select the WiFi network by clicking the + button next to the desired network (and enter its password if it is a secure network).

Note:
The Things Indoor Gateway does not support enterprise WiFi networks.

Click Save and Reboot to finish.

If your configuration is correct,

  • The gateway will blink GREEN for a few seconds until it connects to the selected WiFi network.
  • Then, it will blink from GREEN to RED and vice versa for a few seconds while it connects to the server and fetches the necessary configuration.
  • Please allow 5-10 minutes for the gateway to pick up the new configuration.

If this is the first time your gateway is being powered on/connected to WiFi, it might pick up a new firmware depending on when it was last updated. This is indicated by alternating GREEN/RED blinks of the LED. Please leave the gateway powered on when this happens.

Existing Gateways

You can also claim gateways that have been previously claimed or registered to The Things Stack.

For this, you need to authorize your gateways for claiming. This is currently only supported via the CLI.

Command-line interface only

The instructions below use the command-line interface (CLI).

Learn how to install the CLI
ttn-lw-cli gateways claim authorize <gateway-id>

Now claim the gateway as described in the Claiming The Things Indoor Gateway section.

Once complete, make sure to unauthorize the gateway to prevent further claiming.

ttn-lw-cli gateways claim unauthorize <gateway-id>

Using The Things Indoor Gateway with Different LNS

Once The Things Indoor Gateway is claimed on a The Things Stack cluster, the following steps will allow it to be used with a different LNS Server.

Connecting to an LNS on a Local Network

If you want to connect your gateway to an LNS on a local network (for example if you have The Things Stack installed for debugging on your laptop), use the steps below.

Note:
In order to connect your The Things Indoor Gateway to a local The Things Stack network, the gs.basic-station.allow-unauthenticated option must be set to true in The Things Stack configuration.

First, register the The Things Indoor Gateway on your target LNS by following the instructions.

In order for this to work, both the The Things Indoor Gateway and the local machine where the LNS is running must be connected to the same WiFi access point.

Find the IP address of the machine on which the LNS is installed. You can do this either on the network page of the settings of your operating system or use a command line tool like ifconfig.

On the The Things Stack cluster where the gateway is claimed, head over to the General settings tab on the navigation panel of the gateway.

Set the Gateway Server Address in the format ws://<ip-address>:<port>. Here, the port is the plain text web socket port that is exposed by the LNS. For example, if you are using a locally installed The Things Stack instance and the machine’s IP address is 192.168.2.2, then Gateway Server address would be ws://192.168.2.2:1887. If you are using a different port, then set that in the address.

Now, clear the LoRa Basics Station LNS Authentication Key value and press Save changes.

Restart the The Things Indoor Gateway by removing and reinserting the power supply and if your configuration is correct, your The Things Indoor Gateway will be connected to the LNS on the local machine.

Note:
Connecting the The Things Indoor Gateway with TLS and/or with an authentication key to a local machine is not easy since that requires setting up local certificates and a DNS resolver. This is out of the scope of the documentation and hence is not explained here.

Connecting to a Remote LNS

If you want to connect your gateway to a remotely hosted LNS, use the steps below.

First, register the The Things Indoor Gateway on your target LNS. If the target LNS requires authenticated connections, then create an auth token for the gateway. If the target LNS is a The Things Stack instance, then create an API Key with Link Gateway Rights. Follow the instructions for Creating a Gateway API key.

On the The Things Stack cluster where the gateway is claimed, head over to the General settings tab on the navigation panel of the gateway.

Set the Gateway Server Address to the DNS of the target LNS. For example, if the LNS is hosted at thethings.example.com and is using port 8887 for WebSocket traffic with TLS, then the address would be thethings.example.com:8887.

If the target LNS requires authenticated connections, set the LoRa Basics Station LNS Authentication Key field with the auth token for the gateway on the target LNS and press Save changes.

Either restart the The Things Indoor Gateway or wait upto 24 hours for it to reconnect to the CUPS server. If your configuration is correct, your The Things Indoor Gateway will be connected to the target LNS.

Note:
The Things Stack automatically fetches the server certificate chain of the target LNS. This chain should be a standard certificate chain trusted by most browsers. At the moment, we don’t support using self-signed custom certificates in this mode of operation.

Troubleshooting

Common Errors

Claim Authentication Code Mismatch

Double-check the EUI and the WiFi Password. Sometimes an 8 looks like a 3 or a B, an 1 like an l, a 0 like an O, etc. Note that the FFFE string has an e at the end.

Gateway Not Authorized for Claiming

If you have already registered/claimed your The Things Indoor Gateway in The Things Stack cluster that you want to claim, check the section on claiming existing gateways.

Gateway with ID Already Exists

This means that either you or another user has already used the Gateway ID. Please choose another ID and try again.

Gateway shows status Disconnected and the LED status is solid green. What do I do?

Reboot your The Things Indoor Gateway. If the gateway status is still Disconnected after a reboot, try performing a factory reset and reconfiguring the gateway.

LED States

Color(s) Illumination Pattern Operating Mode Meaning
GREEN Blinking (freq 1 sec) GW WiFi not connected (or trying to connect)
GREEN Blinking (freq 1/4 sec) GW Connected to WiFi, establishing connection to LNS/configuring radio
GREEN Solid GW Connected to WiFi, connected to LNS backend, listening for packets
GREEN/RED Alternate Blinking (freq 1/4 sec) CONF Scanning WiFi networks, setting up Config AP
RED Blinking (freq 1/4 sec) CONF Config AP active

Button Actions

There are three possible button actions on the TTIG that are listed below.

  • SETUP button pressed for 10s:
    • Switch to CONF mode if in GW mode
  • SETUP button pressed for 5s:
    • Reboot if in CONF mode, do nothing in GW mode
  • RESET button pressed for 5s:
    • Factory reset (wipes out WiFi and LNS credentials, retains CUPS credentials)

Serial logging

It is possible to read debug messages of the gateway but it requires opening its casing.

Warning:
Opening the casing may damage the gateway and/or void your warranty.

The casing needs to be first opened by unscrewing two screws found below the top and the bottom panel. Then, connect a 3.3V UART-USB Interface such as an FTDI to your computer. Connect the Rx (FTDI) to the Tx of the Gateway and ground pins.

Use a serial terminal (Ex: PUTTY on Windows and screen/minicom on macOS/Linux) with a baudrate of 115200@8N to read the serial out. The connections are shown in the image below.

{{% ttig %}} Serial

Operating behind a firewall

The following connections must be permitted in the firewall.

IP Version Protocol Destination Port Description
IPv4 TCP <cluster>.cloud.thethings.network 443 CUPS
IPv4 TCP <cluster>.cloud.thethings.network 8887 LNS
IPv4 TCP rjs.sm.tc 9191 Root CUPS
IPv4 UDP your DNS server(s) 53 DNS
← Connect Tektelic Kona Micro with UDP Packet Forwarder The Things Kickstarter Gateway →

On this page

  • Prerequisites
  • Claiming The Things Indoor Gateway
  • Connecting The Things Indoor Gateway
  • Existing Gateways
  • Using The Things Indoor Gateway with Different LNS
  • Troubleshooting

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Ben Olayinka on 30 Nov 2022.
doc: Add that TTIG must hard reset to update config (#1006)

Edit on Github