RAK TTNv3 WisGateOS 2 Basics Station User Guide
- June 12, 2024
- RAK
Table of Contents
Documentation Center
TTNv3 WisGateOS 2 Basics Station
User Guide
TTNv3 WisGateOS 2 Basics Station
WisGateOS 2 Basics Station to TTNv3
This guide shows how to configure and connect the RAK Edge Gateway V2 with
WisGateOS 2 to a Lora WAN Network Server using the Basics Station protocol.
For this example, the gateway will be connected to TTNv3.
NOTE
Lora Basics Station is an implementation of a Lora packet forwarder. This
protocol simplifies the management of large-scale Lora WAN Networks. More
information about Basics Station protocol can be found in the explanatory
document provided by Sentech.
Register the Gateway
-
To login into the TTNv3, head on to the TTN website . If you already have a TTN account, you can use your The Things ID credentials to log in.
NOTE
This guide is for the EU868 frequency band. -
To register a commercial gateway, choose Register a gateway (for new users that do not already have a registered gateway). Or, go to Gateways > + Add gateway (for users that have registered gateways before).
-
Fill in the needed information:
• Owner- Automatically filled by The Things Stack, based on the user’s account or created Organization.
• Gateway ID – This will be the unique ID of the user’s gateway in the Network. Note that the ID must contain only lowercase letters, numbers, and dashes (-).
• Gateway EUI – A 64 bit extended unique identifier for the gateway. The gateway’s EUI can be found either on the sticker on the casing or by going to the Overview page in the Web UI. Instructions on how to access the
gateway via Web UI can be found in the Quick Start Guide for each one.
• Gateway name – A name for the gateway.
• Gateway description (optional) – Optional description, can be used to save notes about the gateway.
• Gateway Server Address – The address of the Gateway Server to connect to.
• Frequency plan – The Frequency plan used by the gateway.
NOTE
• This tutorial is based on using the EU868 Frequency band, so the server address is eu1.cloud.thethings.network .
• The Europe 863-870 MHz (SF12 for RX2 – recommended) is used.
• The other settings are optional and can be changed to satisfy the user’s requirements. -
To register the gateway, scroll down and click Create gateway.
TTNv3 supports TLS Server Authentication and Client token, which require a trust file and a key file to configure the gateway to successfully connect it to the network. You can connect your gateway to TTNv3 by using either LNS or CUPS Server.
Connect the Gateway via LNS Server
Connecting the Gateway
-
To generate a key file, from the Overview page of the registered gateway, navigate to API keys.
-
On the API keys page, choose + Add API key.
-
In the Name field, type the name of the key (for example – Ins key). Choose Grant individual rights and select Link as Gateway to a Gateway for traffic exchange, i.e. read uplink and write downlink.
-
To generate the key, choose the Create API key. A window will pop up, prompting to copy the generated key.
⚠ WARNING
Copy the key and save it in a .txt file (or other) because you won’t be able to view or copy your key afterward. -
Click I have copied the key to proceed.
Configuring the Gateway
-
To configure the gateway, access it via the Web UI. To learn how to do it, refer to the Quick Start Guide for each gateway.
-
Navigate to Lora > Configuration > Work mode and select Basics station.
-
Expand the Basics Station settings by clicking Configure Basics Station server setup.
-
To connect the gateway to TTNv3, configure the following parameters:
• Basics Station Server Type – For server type, choose LNS Server.
• Server URL – This is the link to The Things Stack server.
NOTE
For this tutorial, the gateway is connected to the European cluster. For Europe fill in the following: wss://eu1.cloud.thethings.network
• Server Port – The LNS Server uses port 8887. Type in 8887.
• Authentication Mode – Choose TLS server authentication and Client token. When selected, the Trust (CA Certificate) and Client token fields will show up.
• Trust (CA Certificate) – For trust, upload the Let’s Encrypt ISRG ROOT X1 Trust certificate by clicking
choose file. The file with the certificate can be downloaded directly .
• Client Token – This is the generated API key. The key must start with Authorization:.
For example:
Authorization: YOUR_API_KEY
NOTE
• Replace YOUR_API_KEY with the key generated previously. Have in mind that there should be a “space” between Authorization: and YOUR_API_KEY, as shown in the example. -
To save the changes, click Save Changes.
Now, the gateway is connected to TTNv3 as Basics Station.
Connect the Gateway via CUPS Server Connecting the Gateway
-
Since CUPS automatically configures LNS, you need to generate two API keys – one for CUPS and one for LNS. To generate the key files, from the Overview page (in the TTN console) of the registered gateway, navigate to API keys.
-
On the API keys page, choose + Add API key.
-
In the Name field, type the name for the LNS key (for example – Lynskey). Choose Grant individual rights and select Link as Gateway to a Gateway for traffic exchange, i.e. read uplink and write downlink.
-
To generate the key, click Create API key. The following window will pop up, prompting to copy the generated key.
⚠ WARNING
Copy the key and save it in a .txt file (or other) because you won’t be able to view or copy your key afterward. -
Click I have copied the key to proceed to generate the LNS key.
-
Click again on the +Add API key. In the Name field, type the name for the CUPS key (for example CUPS_key). Choose Grant individual rights and select the following rights:
• View gateway information
• Retrieve secrets associated with a gateway
• Edit basic gateway settings -
Click on the Create API key.
-
Click I have copied the key to proceed.
-
Click on General settings and scroll down to Lora Basics Station LNS Authentication Key. Paste the copied LNS key there.
-
Scroll down and click Save changes to save the settings.
Configuring the Gateway
-
To configure the gateway, access it via the Web UI. To learn how to do that, refer to the Quick Start Guide for each product.
-
Navigate to Lora > Configuration > Work mode and select Basics station.
-
Expand the Basics Station settings by clicking on Configure Basics Station server setup.
-
To connect the gateway to TTNv3 with CUPS Server, configure the following parameters:
• Basics Station Server Type– For server type, choose CUPS Server.
• Server URL – This is the link to The Things Stack server.
NOTE
For this tutorial, the gateway is connected to the European cluster. For Europe fill in the following: https://eu1.cloud.thethings.network
• Server Port – The LNS Server uses port 443. Type in 443.
• Authentication Mode – Choose TLS server authentication and Client token. When selected, the Trust (CA Certificate) and Client token field will show up.
• Trust (CA Certificate) – For trust upload the Let’s Encrypt ISRG ROOT X1 Trust certificate by clicking choose file. The file with the certificate can be downloaded directly .
• Client Token – This is the generated CUPS key. The key must start with Authorization:.
For example:
Authorization: YOUR_API_KEY
NOTE
Replace YOUR_API_KEY with the key generated previously. Have in mind that there should be a “space” between Authorization: and YOUR_API_KEY, as shown in the example. -
To save the changes, click Save Changes.
Now, the gateway is connected to TTNv3 as Basics Station.
References
- The Things Network Console
- letsencrypt.org/certs/isrgrootx1.pem
- LoRa Basics™ Station | DEVELOPER PORTAL
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>