-
Notifications
You must be signed in to change notification settings - Fork 71
Update getting started page #1449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3f6007e
doc: Add first structure
ce70729
doc: Add LW page
4715635
doc: Update doc
f56cc73
doc: Update screen
36fb7d1
doc: Update docs
25ef58b
doc: Update content
abea637
doc: Add TTIG Pro section
fe06444
doc: Activate the starter kit
018fa34
doc: Add datacake example
5aa30ee
doc: Add ngrok example
947c5e3
doc: Complete uplink flow
60622ca
doc: Update front page
7d18f5b
doc: Add downlink examples
792edd8
doc: Update datacake examples
ea237ae
doc: Update structure
0076656
doc: Update flow
2cbe2f0
doc: Update content
KrishnaIyer ea0efab
doc: Update links
KrishnaIyer 4165eb7
doc: Fix spelling
happyRip 8133ecf
doc: Add missing hyperlinks
happyRip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
doc/content/getting-started/1-understand-lorawan/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
Binary file added
BIN
+168 KB
doc/content/getting-started/1-understand-lorawan/tts-architecture-simplified.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+687 KB
doc/content/getting-started/1-understand-lorawan/tts-architecture.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
happyRip marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - [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
136
doc/content/getting-started/3-try-starter-kit/activate/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
Binary file added
BIN
+242 KB
doc/content/getting-started/3-try-starter-kit/activate/create-application.png
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.
Binary file added
BIN
+220 KB
doc/content/getting-started/3-try-starter-kit/activate/live-data-tab.png
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.
Binary file added
BIN
+461 KB
doc/content/getting-started/3-try-starter-kit/activate/post-registration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+335 KB
doc/content/getting-started/3-try-starter-kit/activate/register-end-device.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+307 KB
doc/content/getting-started/3-try-starter-kit/activate/scan-end-device-qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+576 KB
doc/content/getting-started/3-try-starter-kit/activate/second-uplink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+355 KB
doc/content/getting-started/3-try-starter-kit/activate/select-frequency-plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+898 KB
doc/content/getting-started/3-try-starter-kit/activate/ttigpro-power-cable.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+896 KB
doc/content/getting-started/3-try-starter-kit/activate/ttigpro-qrcode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.