Configuring The Things Network

Registering a Gateway with The Things Network

Before a Gateway can be used with The Things Network (TTN), it needs to be registered.

First, register an account with TTN

Once logged in, navigate to the The Things Network Console. This page is where you can register applications and add new devices or gateways.

Click Gateways 

Click register gateway

Tick the I'm using the legacy packet forwarder checkbox.

Then, enter the Gateway EUI displayed on the gateway.

Fill out a description of what the gateway is.

 

Set the frequency plan to your region's frequency, we set ours to United States

 

Set the Router to the location closest to you

  • Adafruit is located in New York City, so I set the router to ttn-router-us-west. 

Click Register Gateway. TTN will register the gateway and redirect you to the Gateway Overview page.

The Things Network does not list Single Channel gateways on their map - these gateways are not great at handling multiple devices or accurately receiving a packets every time they're sent by a device. However, they're great for hacking on, experimenting, and using in a staging/lab setup. 

We'll want to set the Gateway Privacy to Private and set the location to Unlisted

From the Gateway Overview page, click Edit Info.

On the Privacy Page, untick all of the options and click Save Settings.

Before starting up the gateway, we'll optionally set the gateway information.

 

From the Gateway Overview page, click Edit Info 

 

For brand, select Single-Channel DIY Gateway

 

For model, type Raspberry Pi

It's time to test! Run the Python program by entering the following into the terminal:

python3 lorawan_gateway.py

and press the middle button to launch the gateway.

You should see the Status of the gateway on your console switch from from Not Connected to Connected. If you've had previously connected the gateway: the Last Seen label should update to Now

Our gateway is now listening for new packets, it'll refresh whenever it's received a new packet.

Next, we're going to set up a device to send data to the gateway.

Troubleshooting your Gateway

My gateway doesn't appear as "connected" in the console.

Double check the configuration steps on this page. Make sure the Pi is connected to the internet and that the Gateway EUI matches the Gateway EUI displayed on the Pi's display.  

This guide was first published on Jan 17, 2019. It was last updated on Jan 17, 2019. This page (Configuring The Things Network) was last updated on May 23, 2019.