Skip to content
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

Add The Things Gateway connection guide #1368

Merged
merged 4 commits into from
Sep 24, 2019

Conversation

KrishnaIyer
Copy link
Member

@KrishnaIyer KrishnaIyer commented Sep 19, 2019

Summary

Adds the first item for #1140 .

Changes

  • Create a generic structure.
  • Add content for TTG.

Notes for Reviewers

  • Please comment on the structure and style here. Once this PR is merged and we agree on something, please follow the same structure for other gateways @mjamescompton , @adriansmares.
  • I've added a couple of TODOs that need some clarification.

Release Notes

  • Added documentation to connect The Things Gateway.

@KrishnaIyer KrishnaIyer added the documentation This involves writing user documentation label Sep 19, 2019
@KrishnaIyer KrishnaIyer added this to the September 2019 milestone Sep 19, 2019
@KrishnaIyer KrishnaIyer self-assigned this Sep 19, 2019
Copy link
Contributor

@htdvisser htdvisser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really a big fan of these bullet point lists in our documentation, can we maybe make it more of an actual guide/story?

weight: 2
---

The Things Gateway is an MQTT based single channel LoRaWAN gateway. The technical specifications can be found in [the official documentation](https://www.thethingsnetwork.org/docs/gateways/gateway/). This page guides you to connect it to a The Things Stack instance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The Things Gateway is not single-channel
  • connect it to The Things Stack

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • No need to mention it's MQTT here
  • More clear name pending, see out-of-band comms


## Preparation

* User account on a The Things Stack instance with rights to create Gateways and API Keys.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a The Things Stack instance" sounds weird. Can we just use "The Things Stack" everywhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use numbered lists

* Login to your The Things Stack instance via the CLI/console.
* Create a new gateway with the desired `Gateway ID` and choose the correct frequency plan for your device. The EUI field can be left blank.
* For details on using the CLI/Console, refer to the [getting started](../../getting-started/) section.
* Create an API Key with Gateway Link Rights (TODO: needs more info?). Copy and save the key for later use.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the Getting Started already have details for this? Otherwise I think it would be better to add it there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have another checkbox in the Create Gateway page that allows you to create a link API key for this gateway ? This streamlines the guide a lot.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to Create gateway in Console getting started. You can create an anchor and link to it

* Choose the WiFi network from the drop down and enter a password if necessary.
* Click the `Show Advanced Options` button and enter the following fields
* Account Server: The URL of your stack's identity server. This is of the form `https://<your-domain-or-ip>:<port>`.
* (TODO: How to make this URL generic?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use https://thethings.example.com in the getting started guide.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the port mandatory? No, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope. That's for non 443. Added a note.


* Login to your The Things Stack instance via the CLI/console.
* Create a new gateway with the desired `Gateway ID` and choose the correct frequency plan for your device. The EUI field can be left blank.
* For details on using the CLI/Console, refer to the [getting started](../../getting-started/) section.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the relref shortcode for the link

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider {{< ref "/guides/getting-started" >}} to avoid relative path coupling.

* The gateway will now expose a WiFi Access Point whose SSID is of the form `TheThings-Gateway-xxxxx`.
* Connect to this network using a mobile phone/computer.
* In a web browser, navigate to http://192.168.84.1/. A sample page is shown below.
{{< figure src="ttg-config-window.png" alt="TTG Configuration Window" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe nice if we do screenshots the same way as in Getting Started:

(Chrome)

  1. Activate Developer Tools
  2. Toggle Device Toolbar (⌘⇧M)
  3. In the Device Toolbar: select "Laptop with HiDPI screen" (add it if not already there)
  4. In the Device Toolbar: -> Capture Screenshot

(Firefox)

  1. Enter Responsive Design Mode
  2. In the Device Toolbar: select "Laptop with HiDPI screen" (add it if not already there)
  3. In the Device Toolbar: Take a screenshot of the viewport

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at it, let's add these steps to the instructions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For <insert-connection-key>, can we put there explicitly the gateway API key for linking?

Copy link
Contributor

@adriansmares adriansmares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments - I also agree that it should look more story telling akin to the other guides.

---
title: "Connecting Gateways"
description: ""
weight: 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in a sort of chicken-and-egg situation, but I think the weight should be higher.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should also be mentioned in the getting started in the Create gateway section.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go after Getting Started indeed

* Login to your The Things Stack instance via the CLI/console.
* Create a new gateway with the desired `Gateway ID` and choose the correct frequency plan for your device. The EUI field can be left blank.
* For details on using the CLI/Console, refer to the [getting started](../../getting-started/) section.
* Create an API Key with Gateway Link Rights (TODO: needs more info?). Copy and save the key for later use.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have another checkbox in the Create Gateway page that allows you to create a link API key for this gateway ? This streamlines the guide a lot.

* While the gateway is powered on, hold the pink reset button for 5 seconds (until each of the 5 LEDs illuminate).
* This erases the existing configuration on the gateway.
* The gateway will now expose a WiFi Access Point whose SSID is of the form `TheThings-Gateway-xxxxx`.
* Connect to this network using a mobile phone/computer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SSID password missing

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more generic to the gateway and is documented in the general setup guide and is independent of the stack.
https://www.thethingsnetwork.org/docs/gateways/gateway/#activating-the-gateway

---
title: "Connecting Gateways"
description: ""
weight: 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go after Getting Started indeed

weight: 2
---

The Things Gateway is an MQTT based single channel LoRaWAN gateway. The technical specifications can be found in [the official documentation](https://www.thethingsnetwork.org/docs/gateways/gateway/). This page guides you to connect it to a The Things Stack instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • No need to mention it's MQTT here
  • More clear name pending, see out-of-band comms

The Things Gateway is an MQTT based single channel LoRaWAN gateway. The technical specifications can be found in [the official documentation](https://www.thethingsnetwork.org/docs/gateways/gateway/). This page guides you to connect it to a The Things Stack instance.


## Preparation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prerequisites


## Preparation

* User account on a The Things Stack instance with rights to create Gateways and API Keys.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use numbered lists


## Registration

* Login to your The Things Stack instance via the CLI/console.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Login to The Things Stack via ..."

* While the gateway is powered on, hold the pink reset button for 5 seconds (until each of the 5 LEDs illuminate).
* This erases the existing configuration on the gateway.
* The gateway will now expose a WiFi Access Point whose SSID is of the form `TheThings-Gateway-xxxxx`.
* Connect to this network using a mobile phone/computer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What else? Tablet not supported? Should we mention the device at all?

* Account Server: The URL of your stack's identity server. This is of the form `https://<your-domain-or-ip>:<port>`.
* (TODO: How to make this URL generic?)
* Gateway Key: The API Key created earlier.
* Click `Save` when done.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem

* Click the `Show Advanced Options` button and enter the following fields
* Account Server: The URL of your stack's identity server. This is of the form `https://<your-domain-or-ip>:<port>`.
* (TODO: How to make this URL generic?)
* Gateway Key: The API Key created earlier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gateway Key

* (TODO: How to make this URL generic?)
* Gateway Key: The API Key created earlier.
* Click `Save` when done.
* This will apply the setting and reboot the gateway. If all have been followed correctly, your gateway will connect to your stack instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all steps

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will connect to The Things Stack


## Troubleshooting

* If the gateway doesn't connect to the backend after a few minutes, disconnect and reconnect the power supply to power-cycle it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • does not
  • connect to The Things Stack
  • "power-cycle the gateway" ?

@KrishnaIyer
Copy link
Member Author

I disagree with both @htdvisser and @adriansmares. I think having clear bullets is more readable for setup guides. But I've modified this to be consistent with the rest of the documentation.

The gateway will now expose a WiFi Access Point whose SSID is of the form `TheThings-Gateway-xxxxx`, to which you can connect.

In a web browser, navigate to http://192.168.84.1/. A sample page is shown below.
{{< figure src="ttg-config-window.png" alt="TTG Configuration Window" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use "TTG"


Login to The Things Stack via the CLI/console.

Create a new gateway with the desired `Gateway ID` and choose the correct frequency plan for your device. The EUI field can be left blank. For details on using the CLI/Console, refer to the [getting started]({{< ref "/guides/getting-started" >}}) section.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Make Gateway ID bold instead of code
  2. IIRC there were some extra restrictions for the ID, because the gateway's web ui does some validation on it. So either we need to fix that, or we need to tell users what those restrictions are.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we have an issue for that. Minimum of 6 characters. I think it's easier right now to just document it than updating the gateway firmware.

Copy link
Contributor

@adriansmares adriansmares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

I understand that the list type guides are straight to the point compared to story type guides, but keep in mind that they are shorter because they have some implicit knowledge attached to them. Since this documentation is not only for professionals, it is good to keep it in this format.

@KrishnaIyer KrishnaIyer merged commit bad3d35 into feature/gateway-documentation Sep 24, 2019
@KrishnaIyer KrishnaIyer deleted the feature/1140-ttgc branch September 24, 2019 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This involves writing user documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants