Skip to content

Commit

Permalink
Docs/claiming updates (#65)
Browse files Browse the repository at this point in the history
* doc: Add claiming instructions

* doc: Quick start guide fixed

* doc: PR fixes

* doc: Nejra's updates

---------

Co-authored-by: nejraselimovic <nejra.selimovic@thethingsindustries.com>
  • Loading branch information
azerimaker and nejraselimovic authored Jun 22, 2023
1 parent f78a59d commit 6e3b882
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 45 deletions.
22 changes: 3 additions & 19 deletions doc/content/applications/se-vanilla/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,13 @@ weight: -2
distributions: null
---

{{% gnse %}} comes pre-programmed with a vanilla application that showcases the device functionality and capabilities.
{{% gnse %}} comes pre-programmed with a vanilla application that showcases some of the device functionality and capabilities.

The application leverages a combination of the on-board components such as LEDs, button, buzzer, accelerometer, secure element, temperature and humidity sensor.
The application leverages a combination of the on-board components such as LEDs, button, secure element, temperature and humidity sensor.

<!--more-->

## Claiming your device

The vanilla application uses the on-board secure element to join the LoRaWAN network using over the air activation (OTAA) method.

You can claim your device on the The Things Stack cloud by following this [guide](https://www.thethingsindustries.com/docs/devices/device-claiming/claim-devices/).

## Powering up your device

After claiming, you can power up the device using two standard AA batteries.

If the device powers up correctly, you will see the red, green and blue LEDs blinking thus indicating successful boot-up.

## Joining the network

The device will attempt to join LoRaWAN network using OTAA indicated by the blinking red led.

When the device joins successfully, the buzzer will ring briefly the red LED will stop blinking.
Check out the [Quick Start guide]({{< ref "/getting-started/platform-guide" >}}) and learn how to claim your device, power it up and register it on {{% tts %}} network.

## Default uplinks and events

Expand Down
16 changes: 5 additions & 11 deletions doc/content/applications/se-vanilla/uplinks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@ The javascript payload formatter below can be used to decode the vanilla app.
```javascript
function decodeUplink(input) {
var data = {};
if (input.fPort == 1)
{
data.BATTERY_VOLTAGE = (input.bytes[0]/10);
data.GNSE_FW_VERSION = input.bytes[1] + (input.bytes[2]/10);
}

if (input.fPort == 2)
{
data.TEMPERATURE = ((input.bytes[0] << 8) + input.bytes[1])/10;
data.HUMIDITY = ((input.bytes[2] << 8) + input.bytes[3])/10;
}
data.batt_volt = (input.bytes[0]/10);
data.temperature = (((input.bytes[1] << 8) + input.bytes[2]) - 500)/10;
data.humidity = ((input.bytes[3] << 8) + input.bytes[4])/10;
data.button = input.bytes[5];

return {
data: data,
};
Expand Down
89 changes: 76 additions & 13 deletions doc/content/getting-started/platform-guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,90 @@ weight: -1
distributions: null
---

The {{% gn %}} platform is designed to provide an easy way to get started with device development.
The {{% gn %}} platform is designed to provide an easy way to get started with device development. It comes pre-programmed with a demo app. Please follow this section to learn how to claim your {{% gn %}} device and start using it right away.

<!--more-->

To get started with the {{% gn %}} platform, you typically need two things:
{{< note >}} {{% gnse %}} is currently in the production phase. If you don't have one get yours at [thethingsshop.com](https://www.thethingsshop.com/products/generic-node-sensor-edition)! {{</ note >}}

1. {{% gn %}} supported hardware
2. {{% gn %}} supported software
## Create a new account on {{% tts %}} Cloud

For example, if you are planning to use the {{% gnse %}}, you would need:
We have a dedicated [{{% tts %}} Cloud tenant for the {{% gn %}}](https://gnse.eu1.cloud.thethings.industries/). To access it, you may create a new account or sign in with The Things ID. You're also free to use our [community network](https://eu1.cloud.thethings.network/) or any other {{% tts %}} Cloud tenant for this purpose.

1. {{% gnse %}} board
2. {{% gnse %}} application
## Select your region and create an application

## Get a device
Choose a network cluster for your region (EU in this example) and head over to the **Applications** tab. Create new application with a unique **Application ID**. **Application name** and **Description** are optional.

{{% gnse %}} is currently in the production phase. Order one at [genericnode.com](https://www.genericnode.com/)!
{{< figure src="gnse_claim_0.png" alt="Create new Application" >}}

## Explore your node's features
Once you have a test applicatin ready (like shown on the image below), you can proceed further to claim ownership over your device.

To learn more about your node and set it up for use, follow the hardware and software setup guides contained in your node's corresponding section:
{{< figure src="gnse_claim_1.png" alt="Test application" >}}

- [Sensor Edition]({{< ref "/sensor-edition" >}})
- [Tracker Edition]({{< ref "/tracker-edition" >}})
## Claim your device ownership

{{% gnse %}} comes factory pre-flashed with the [vanilla app]({{< ref "/applications/se-vanilla" >}}) that uses the on-board secure element to join the LoRaWAN network using the [OTAA](https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/#otaa).

In order to register your device and claim its ownership, you will have to provide information printed on the back of the device during its registration process.

In your {{% tts %}} application, click on the **Register end device** button to create a new device. To add a new device, you have a few options:

- [Using its QR code](https://www.thethingsindustries.com/docs/devices/adding-devices/#onboarding-devices-using-qr-codes)
- [Using LoRaWAN Device Repository](https://www.thethingsindustries.com/docs/devices/adding-devices/#using-the-lorawan-device-repository)
- [Manually](https://www.thethingsindustries.com/docs/devices/adding-devices/#manually-registering-a-device)

{{< figure src="gnse_claim_2.png" alt="Registering new end device" >}}

Since every {{% gnse %}} comes with a QR code, this method is the easiest one and hence used in this guide.

### Claim the device using its QR code

If your computer has a webcam then this is the most straightforward option. Just click on the **Scan end device QR code** button (with camera icon), select your webcam input and scan the back of your device. You may also use a smartphone to accomplish this.

Once the camera is in focus, the Console should be able to successfully scan the QR code and extract the required device credentials. Then, hit **Apply** to continue the registration process.

{{< figure src="gnse_claim_3.png" alt="QR code scanned" >}}

{{% gnse %}} is already included in the [LoRaWAN Device Repository](https://www.thethingsnetwork.org/device-repository/), so you just enter the device brand, model, region profile and the [frequency plan](https://www.thethingsindustries.com/docs/reference/frequency-plans/) for your location (i.e. `The Things Industries` &#8594; `Generic Node (Sensor Edition)`, `EU_863_870 (SF9 for RX2 - recommended)` and simply hit **Register end device**.

{{< figure src="gnse_claim_4.png" alt="Registering end device" >}}

Congratulations! You have successfully registered your {{% gnse %}} device.

{{< figure src="gnse_claim_7.png" alt="Device registered" >}}

## Power up your device

After claiming, you can power up the device using two standard AA batteries, or using a small 3.7V LiPo/Li-ion battery with a standard JST PH 2.0 connector.

If the device powers up correctly, you will see the green LED briefly lighting up indicating a successful boot-up. Pressing the front user button also triggers a sensor sampling followed by an uplink.

## Join the network

The device will automatically attempt to join LoRaWAN network using OTAA. Please make sure there's [{{% tts %}} coverage](https://ttnmapper.org/heatmap/) in your area.

When the device successfully joins, you will see some verbose activity and raw payload in the **Live Data** tab in your device's overview page. If you are not able to understand the raw bytes, don't panic! It's because you still need to configure the payload formatter. Please copy-paste the following JavaScript formatter code below to the **Payload formatters &#8594; Uplink** section. You can configure a payload formatter on a device or on an application level.

{{< figure src="gnse_claim_8.png" alt="Payload Formatter" >}}

```javascript
function decodeUplink(input) {
var data = {};
data.batt_volt = (input.bytes[0]/10);
data.temperature = (((input.bytes[1] << 8) + input.bytes[2]) - 500)/10;
data.humidity = ((input.bytes[3] << 8) + input.bytes[4])/10;
data.button = input.bytes[5];

return {
data: data,
};
}
```

If everything goes well you should see incoming data packets formatted to a nicely readable form. Well done!

By default, devices are configured to transmit every 10 minutes. You're free to change this by sending hexadecimal values in minutes as a downlink message to the device under **Messaging &#8594; Downlink** on FPort 1.

{{< figure src="gnse_claim_9.png" alt="Live Data" >}}

Please check out the [Sensor Edition: vanilla application]({{< ref "/applications/se-vanilla" >}}) page to learn more about the uplink, downlinks and the overall firmware behaviour. If you have any questions or feedback please do not hesitate to post it in [The Things Network forum](https://www.thethingsnetwork.org/forum/c/nodes/generic-node/88) or drop us a message on our Twitter channel [@generic_node](https://twitter.com/generic_node/).
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.
4 changes: 2 additions & 2 deletions doc/content/getting-started/se-hw/se-hw-design/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This section helps you set up hardware design tools and explore the reference ha

## Prerequisites

1. [KiCAD v.5.1.8](https://kicad.org/)
2. [FreeCAD 0.18](https://www.freecadweb.org/)
1. [KiCAD v6 or newer](https://kicad.org/)
2. [FreeCAD](https://www.freecadweb.org/)

## Setup

Expand Down
1 change: 1 addition & 0 deletions doc/themes/generic-node/layouts/shortcodes/tts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- printf "The Things Stack" -}}

0 comments on commit 6e3b882

Please sign in to comment.