Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/content/cloud/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ aliases:
<!--more-->

{{% tts %}} Cloud includes a [service level agreement](https://www.thethingsindustries.com/document/sla/) which offers an uptime commitment so that you can be assured of the availability of the service.
We offer multiple plans based on your needs including a [free discovery tier](https://www.thethingsindustries.com/stack/plans/) for users to evaluate the product. Signing up to {{% tts %}} Cloud is very easy and within a few minutes, you can [get started]({{< ref "/getting-started/setup-first-network/" >}}) with a production-grade LoRaWAN network.
We offer multiple plans based on your needs including a [free discovery tier](https://www.thethingsindustries.com/stack/plans/) for users to evaluate the product. Signing up to {{% tts %}} Cloud is very easy and within a few minutes, you can [get started]({{< ref "/getting-started/2-prerequisites/" >}}) with a production-grade LoRaWAN network.

#### Multi-tenancy

Expand Down
18 changes: 18 additions & 0 deletions doc/content/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ aliases:
/reference/spec-regional-parameters,
doc/content/the-things-stack/concepts,
/the-things-stack,
/getting-started/the-things-stack-basics,
]
---

Expand All @@ -17,3 +18,20 @@ This section introduces basic concepts of working with {{% tts %}}.
We start with a general technical discussion of {{% tts %}} architecture and progress to other more detailed topics.

<!--more-->

{{% tts %}} is an enterprise grade LoRaWAN server (that includes both the Network Server and Application Server functions mentioned in the LoRaWAN Reference architecture). In addition, {{% tts %}} contains services and tools to securely manage millions of LoRaWAN devices in production.

{{% tts %}} offers the following options for LoRaWAN deployments in production.

- {{< distributions "Cloud" >}} [{{% tts %}} Cloud]({{< relref "cloud" >}}): Our flagship, fully-managed, SLA-backed cloud subscription helping hundreds of companies around the world.
By using {{% tts %}} Cloud, you can focus on providing value to your customers, while leaving the complexity of managing a production LoRaWAN Network Server to us. You can start evaluating {{% tts %}} Cloud by [signing up for the free discovery tier]({{< relref "2-prerequisites" >}}) to get started.

- {{< distributions "Enterprise" >}}[{{% tts %}} Enterprise]({{< relref "enterprise" >}}): Alternatively, if you prefer to take on the responsibility of installing and maintaining {{% tts %}} in addition to managing your LoRaWAN device fleet, {{% tts %}} is available to be installed on your own hardware or cloud infrastructure.

For simple non-commercial projects and local testing, there are a few options.

- {{< distributions "Sandbox" >}}[{{% ttss %}}]({{< relref "ttn" >}}): A free and limited version of {{% tts %}} _without any guarantees or SLA_ available to The Things Network community for non-commercial, small scale testing and experimentation.

- {{< distributions "Open Source" >}}[{{% tts %}} Open Source](https://github.com/thethingsnetwork/lorawan-stack): For the DIY’ers, the core features of The Things Stack are open source. This is limited in features and is not suitable for production.

{{% tts %}} is developed and maintained by [The Things Industries](https://thethingsindustries.com/).
113 changes: 113 additions & 0 deletions doc/content/getting-started/1-understand-lorawan/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
title: "Step 1: Understanding LoRaWAN Fundamentals"
description: "Learn basic concepts of LoRaWAN"
weight: 1
aliases: ["/getting-started/lorawan-basics"]
---

This guide briefly explains the architecture and key concepts of a LoRaWAN® network.

<!--more-->

LoRaWAN is a Low Power Wide Area Network (LPWAN) protocol designed for low power, long range use cases.

### Key Characteristics

The key characteristics of a LoRaWAN

- **Long Range**: LoRaWAN networks can provide coverage of up to 10+ km in rural areas and 2-5 km in urban environments
- **Low Power Consumption**: Devices can operate for 5-10+ years on a single battery
- **Secure Communication**: End-to-end encryption with AES.
- **Bidirectional Communication**: Supports both upstream and downstream messages.

#### Data Size and Rates

LoRaWAN is optimized for low data rate communications:

- **Payload Size**: 51-242 bytes per message\*
- **Data Rate**: 0.3-50 kbps\*
- **Daily Messages**: Typically designed for 1-100 messages per day
- **Duty Cycle**: Subject to regional regulations (e.g., 1% in Europe)

\*Depends on the regional regulations and the spreading factor. Spreading factor is a transmission parameter that balances transmission range against data rate - higher spreading factors reach longer distances but transmit data more slowly.

#### Typical Use Cases

LoRaWAN excels in applications requiring:

- Long battery life
- Long-range coverage
- Low cost
- Small, infrequent data transmissions

Typical use cases are

- Smart cities (ex: Street lighting control, Traffic monitoring etc)
- Agriculture (ex: Soil moisture monitoring, Irrigation control etc)
- Supply Chain & Logistics (ex: Asset tracking, Cold chain monitoring etc)
- Utilities (ex: Leak detection, Smart metering etc)
- Industrial IoT (ex: Predictive maintenance)

### LoRa and LoRaWAN

LoRa is a wireless modulation technique derived from Chirp Spread Spectrum (CSS) technology. It encodes information on radio waves using chirp pulses - similar to the way dolphins and bats communicate! LoRa modulated transmission is robust against disturbances and can be received across great distances.

LoRaWAN is a Media Access Control (MAC) layer protocol built on top of LoRa modulation. It is a _software layer_ which defines how devices use the LoRa hardware, for example when they transmit, and the format of messages.

The LoRaWAN protocol is developed and maintained by the [LoRa Alliance](https://lora-alliance.org/). The first [LoRaWAN specification](https://resources.lora-alliance.org/technical-specifications) was released in January 2015. At the time of this writing the latest specifications are 1.0.4 (in 1.0 series) and 1.1 (1.1 series).

### Architecture

{{< figure src="./tts-architecture-simplified.png" alt="The Things Stack Architecture" width="75%">}}

A typical LoRaWAN network consists of the following basic elements.

- **End Devices**: Sensors or actuators send LoRa modulated wireless messages to the gateways or receive messages wirelessly back from the gateways.

- **Gateways**: Specialized devices that receive messages from end devices and forward them to the Network Server, as well as forward messages from the Network Server to the end devices.

- **Network Server**: Software running on a server that manages the entire network. Also referred to as LoRaWAN Network Server/LNS or simply Network software.

- **Application**: Software running on a server that is responsible for securely processing application data.

### Simple message flow

#### Uplinks

The messages that originates from an end device and are sent to the server via gateways are called an Uplinks.

End devices communicate with nearby gateways and each gateway is connected to the Network Server.

LoRaWAN networks use an ALOHA based protocol, so end devices don’t need to pair with specific gateways. Messages sent from end devices travel through all gateways within range.

These messages are received by the Network Server. If the Network Server has received multiple copies of the same message, it keeps a single copy of the message and discards others. This is known as message deduplication.

The Network Server separates the network settings related data from the separately-encrypted application (sensor) data and forwards the latter to the application server.

The Application Server decrypts the application data and makes is available to the user via a multitude of options.

#### Downlinks

Messages that originate in the server (Network Server or Application) and are sent to the end device via gateways are called downlinks.

### Security

All LoRaWAN data is encrypted using symmetric keys. All devices have one or two unique keys called the “root keys” associated with them, depending on the version of LoRaWAN they use.

These root keys are used to derive separate keys for the application data and network data.

Application data is encrypted using one of these derived keys. This key is known only to the Application Server and the End Device.

Network (settings) data is encrypted using different key(s). These keys are known only to the Network Server and the End Device.

> These keys are called Session Keys since they are rotated when a device session changes. Device sessions are a much deeper topic and is omitted from this basic guide in the interest of simplicity.

## The Things Stack

{{% tts %}} is a LoRaWAN® Network Server stack which is the critical component for any LoRaWAN solution. This guide quickly gets the reader up to speed with the basics of The Things Stack.

{{< figure src="./tts-architecture.jpeg" alt="The Things Stack Architecture" width="75%">}}

{{% tts %}} is an enterprise grade LoRaWAN server (that includes both the Network Server and Application Server functions mentioned in the LoRaWAN Reference architecture). In addition, {{% tts %}} contains services and tools to securely manage millions of LoRaWAN devices in production.

Now that you are up to speed with the basic concepts and terminology, let's move on to the hands-on part by getting your starter kit and (optionally) creating a {{% tts %}} account.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: "Setup Your First LoRaWAN Network"
description: ""
weight: 3
title: "Step 2: Setup your first LoRaWAN® Network"
description: "Setup your first LoRaWAN® Network with The Things Stack Cloud"
weight: 2
aliases: ["/getting-started/setup-first-network"]
---

Now that you are familiar with LoRaWAN® and {{% tts %}}, let us set up your first LoRaWAN Network.
In this guide, we will walk through the steps to setup a The Things Stack account. If you already have a The Things Stack Account, you can skip this step.

<!--more-->

Expand All @@ -17,9 +18,9 @@ Now that you are familiar with LoRaWAN® and {{% tts %}}, let us set up your fir

Go to the [plans](https://www.thethingsindustries.com/stack/plans/) page which lists the different plans supported by {{% tts %}} Cloud.

For this example, we will choose the **Discovery** plan.
For this example, we will choose the _free_ **Discovery** plan.

{{< note "At the time of writing this documentation, this plan allows you free access to use 10 devices and 10 gateways on The Things Stack Cloud. For updates on these limits, check the plans page." />}}
{{< note "At the time of writing this documentation, this plan allows you free access to use 10 devices and 10 gateways on The Things Stack Cloud. For the latest on these limits, check the plans page." />}}

Click on the **Get Started for Free** button.

Expand Down Expand Up @@ -72,6 +73,7 @@ In the subsequent window, select the details of the admin user. This user has fu
Click on **Launch The Things Stack Cloud**.

Now before proceeding, please make sure to check the admin email for two emails that you received from {{% tts %}} Cloud.

- The first one is used to validate the admin email address. Follow the instructions in the email to validate it.
- The second email contains a link to create the password for the admin user. Make sure to choose a strong password.

Expand Down
21 changes: 21 additions & 0 deletions doc/content/getting-started/3-try-starter-kit/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Step 3: Try the Starter Kit for LoRaWAN®"
description: ""
weight: 3
---

LoRaWAN® is a complex topic with many technical components and considerations. The easiest way to get started and to understand the essentials of LoRaWAN is to see it in action.

<!--more-->

The Starter Kit for LoRaWAN contains

1. **{{% ttigpro %}}**: A state-of-the-art fully cloud-managed 8 channel LoRaWAN gateway. It support true Zero-Touch Provisioning(ZTP) and is fully remotely managed via {{% tts %}}. In addition, it also has three options to connect to {{% tts %}}; Ethernet, WiFi and a built-in SIM card.
2. **mClimate Multipurpose Button**: A versatile LoRaWAN end device designed for a variety of applications. Supporting three click types (single, double, and triple), it enables users to trigger pre-set actions. The Multipurpose Button is equipped with a temperature sensor and has ultra-low power consumption.

This guide will walk you through the complete journey from unboxing to data visualization. You'll learn how to activate both devices using simple QR code scanning, establish secure LoRaWAN communication, and explore different options for collecting and visualizing your sensor data. Whether you're new to LoRaWAN or an experienced developer, this starter kit eliminates the complexity typically associated with setting up IoT networks, allowing you to focus on building your application rather than wrestling with infrastructure.

Get your Starter Kit for LoRaWAN a The Things Shop using the following links

- [EU868 variant](https://thethingsshop.com/products/starter-kit-for-lorawan)
- [US915 variant](https://thethingsshop.com/products/starter-kit-for-lorawan-us915-edition)
136 changes: 136 additions & 0 deletions doc/content/getting-started/3-try-starter-kit/activate/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
title: "Step 1: Activate your Starter kit for LoRaWAN"
description: "Activate your Starter kit for LoRaWAN"
weight: 1
---

This guide shows you how to activate your Starter Kit’s LoRaWAN® gateway and end device.

<!--more-->

First, set up the gateway. It receives messages from the end device and forwards them to {{% tts %}}, and the other way around. Once the gateway is online, you can activate your end device to start sending and receiving data.

### 1. {{% ttigpro %}}

To get started, we’ll use the built-in 4G LTE SIM in The Things Indoor Gateway Pro to connect to The Things Stack. You can switch to WiFi or Ethernet later if neede

If you prefer a visual guide to connecting {{% ttigpro %}} you can use the video below.

<details><summary>Show video</summary>
{{< youtube "vEYlTZ4XS-k" >}}
</details>

There are **only two steps** to connecting {{% ttigpro %}} to {{% tts %}}.

##### Step 1: Register in {{% tts %}}

1. Open the back panel of the gateway. This can be done by clicking the slot provided on the back side of the gateway counter clockwise. If you're unsure, check out how to do this on [Youtube](https://youtu.be/vEYlTZ4XS-k?t=109)

Here, you will find a QR Code and some information about the gateway.

{{< figure src="ttigpro-qrcode.jpg" alt="TTIG Pro QR Code" width="35%" >}}

1. In {{% tts %}} Console, go to **Gateways**.
2. Click **Register Gateway**.
3. Click **Scan gateway QR code** and scan the QR code back of the gateway. A few things to note

- You can use any camera connected to your machine, even the built-in one.
- Make sure to center the QR Code in the camera's view port.
- In some older browsers/operating systems, the camera may not be able to detect the QR code.
- In this case, instead of pressing **Scan gateway QR code**, manually enter the **Gateway EUI** field, which is printed on the back of the gateway (looks like `EC656EFFFEXXXXXX`).
- {{% tts %}} automatically detects this gateway and asks you to enter an **Owner Token**. This is printed on the back panel of the gateway _below_ the **Power Input** field.

4. Enter a **Gateway ID**, which is a unique identifier used by {{% tts %}}

5. Select the **Frequency plan** to use.The frequency plan configures certain radio parameters for the gateway. If you're unsure of this at this point, select

- For Europe and UK, choose `Europe 863-870 MHz (SF9 for RX2 - recommended)`
- For North America (US, EU, Mexico) choose `United States 902-928 MHz, FSB 2 (used by TTN)`
- You can always change the value later.

5. Click **Claim gateway**.

##### Step 2: Connect a power supply cable

Connect the USB-C cable to the power supply slot.
{{< figure src="ttigpro-power-cable.jpg" alt="Connect power" width="35%">}}

{{< warning >}}Only use the power adapter that comes with {{% ttigpro %}}.{{< /warning >}}

It may take several minutes to activate the SIM card and attach to a mobile network.

After a few minutes, {{% ttigpro %}} should be connected to {{% tts %}}. You can see this in the `Connections` section on the right hand side of the **Connection Settings** page.

{{< figure src="post-claim.png" alt="Post claim">}}

If you would like to learn more about {{% ttigpro %}} or setup WiFi or Ethernet connectivity, you can check the dedicated [{{% ttigpro %}}]({{< ref "/hardware/gateways/models/thethingsindoorgatewaypro/" >}}) page.

Let's now register and activate the end device to send and receive data.

### 2. mClimate Multipurpose Button

##### Step 1: Register in {{% tts %}}

1. First create an application in {{% tts %}}. An application is a collection of end devices.

{{< figure src="create-application.png" alt="Create an application">}}

2. Now within the application, select **Register end device**.
3. Select **Scan end device QR code**.

4. Use the QR code that's part of a _separate piece of paper included in the box_. This will prefill important information required to claim the end device.

{{< figure src="scan-end-device-qrcode.png" alt="Scan end device QR code">}}

5. From the model dropdown, select **Multipurpose button**. The rest of the information about the end device is automatically fetched and prefilled.

6. For the **Frequency plan**, select the _exact same value_ that you selected for the {{% ttigpro %}}.

{{< figure src="select-frequency-plan.png" alt="Select frequency plan">}}

7. The rest of the information is already setup for you. You can at this point choose to customize the **End Device ID** field or leave the pre-generated value.

8. Click the **Register end device** button. You device should now be successfully registered.

{{< figure src="register-end-device.png" alt="Register end device">}}

You will now be redirected to the end device.

{{< figure src="post-registration.png" alt="Registered end device">}}

##### Step 2: Activate

1. Open the **Live Data** tab of the end device.

{{< figure src="live-data-tab.png" alt="Live data tab">}}

2. Make sure that {{% ttigpro %}} is connected to {{% tts %}} and is **1-2 meters away** from the end device.
3. Pull the plastic strip at the back of the gateway. This allows the battery to touch the contact point and the device now starts a _join request_.

- A join request is a special uplink message used by the end device to "join" a network ({{% tts %}} in this case).
- If the device is registered properly, {{% tts %}} returns a join accept message, with a few configuration parameters to the end device.

The device is now successfully configured and sends the first data message. Since a LoRaWAN message consists of bytes, {{% tts %}} decodes these bytes into human readable information, which is seen in the payload field on the live data page. The following is an example.

{{< figure src="join.png" alt="Join procedure">}}

The following are sample values.

```json
{
"batteryVoltage": 3.4,
"pressEvent": 0,
"sensorTemperature": 22.2,
"singlePressEventCounter": 0,
"thermistorProperlyConnected": true
}
```

5. Now you can _press the button_ and you will see it's surrounding LED blink green, which is a signal that an uplink was sent to the {{% tts %}}. If you now check the live data tab, you'll see the newest data message at the top.

{{< figure src="second-uplink.png" alt="Button press">}}

If you have any issues in this process, don't worry and check out the
[troubleshooting guide]({{< ref "/getting-started/3-try-starter-kit/troubleshooting" >}})

Now that you've successfully setup the LoRaWAN gateway and end device, let's go ahead and collect and visualize this data.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading