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

Update TTSS #546

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions doc/content/applications/aws/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ This integration brings LoRaWAN to [AWS IoT](https://aws.amazon.com/iot/): sync

Syncing the thing registry allows you to manage LoRaWAN devices in AWS IoT: devices are created and updated in The Things Network. Syncing thing shadows enables reporting shadow state from uplink messages and sending downlink messages from shadow delta updates. Finally, uplink and downlink messages are available on AWS IoT MQTT so you can store messages in [DynamoDB](https://aws.amazon.com/dynamodb/), invoke [Lambda](https://aws.amazon.com/lambda/) functions and many more.

This integration runs in your AWS account and security context and can connect to The Things Network public community network and private networks.
This integration runs in your AWS account and security context and can connect to The Things Stack Sandbox and private networks.

## Getting Started

See [Quick Start]({{< relref "./quick-start" >}}) on how to get started.


## Video

[![Getting started with AWS IoT](https://img.youtube.com/vi/XuMv258g1kY/0.jpg)](https://www.youtube.com/watch?v=XuMv258g1kY)
Expand Down
43 changes: 29 additions & 14 deletions doc/content/applications/golang/api/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: API Reference
weight: -1000
source: 'https://github.com/TheThingsNetwork/go-app-sdk/blob/master/API.md'
source: "https://github.com/TheThingsNetwork/go-app-sdk/blob/master/API.md"
---

import ttnsdk "github.com/TheThingsNetwork/go-app-sdk"
Expand All @@ -18,6 +18,7 @@ retrieve the addresses of the Handler and MQTT server.
```go
var ClientVersion = "2.x.x"
```

ClientVersion to use

```go
Expand All @@ -32,13 +33,15 @@ var DialOptions = []grpc.DialOption{
grpc.WithBlock(),
}
```

DialOptions to use when connecting to components

## func MoveDevice
## func MoveDevice

```go
func MoveDevice(devID string, from, to DeviceManager) (err error)
```

MoveDevice moves a device to another application

## type ApplicationManager
Expand Down Expand Up @@ -172,26 +175,29 @@ ClientConfig contains the configuration for the API client. Use the NewConfig()
or NewCommunityConfig() functions to initialize your configuration, otherwise
NewClient will panic.

## func NewCommunityConfig
## func NewCommunityConfig

```go
func NewCommunityConfig(clientName string) ClientConfig
```

NewCommunityConfig creates a new configuration for the API client that is
pre-configured for the Public Community Network.
pre-configured for the The Things Stack Sandbox.

## func NewConfig
## func NewConfig

```go
func NewConfig(clientName, accountServerAddress, discoveryServerAddress string) ClientConfig
```

NewConfig creates a new configuration for the API client.

## func (ClientConfig) NewClient

```go
func (c ClientConfig) NewClient(appID, appAccessKey string) Client
```

NewClient creates a new API client from the configuration, using the given
Application ID and Application access key.

Expand All @@ -211,62 +217,69 @@ type Device struct {

Device in an application

## func (*Device) Delete
## func (\*Device) Delete

```go
func (d *Device) Delete() error
```

Delete the device. This function panics if this is a new device.

## func (*Device) IsNew
## func (\*Device) IsNew

```go
func (d *Device) IsNew() bool
```

IsNew indicates whether the device is new.

## func (*Device) Personalize
## func (\*Device) Personalize

```go
func (d *Device) Personalize(nwkSKey types.NwkSKey, appSKey types.AppSKey) error
```

Personalize a device by requesting a DevAddr from the network, and setting the
NwkSKey and AppSKey to the given values. This function panics if this is a new
device, so make sure you Get() the device first.

## func (*Device) PersonalizeFunc
## func (\*Device) PersonalizeFunc

```go
func (d *Device) PersonalizeFunc(personalizeFunc func(types.DevAddr) (types.NwkSKey, types.AppSKey)) error
```

PersonalizeFunc personalizes a device by requesting a DevAddr from the network,
and setting the NwkSKey and AppSKey to the result of the personalizeFunc. This
function panics if this is a new device, so make sure you Get() the device
first.

## func (*Device) PersonalizeRandom
## func (\*Device) PersonalizeRandom

```go
func (d *Device) PersonalizeRandom() error
```

PersonalizeRandom personalizes a device by requesting a DevAddr from the
network, and setting the NwkSKey and AppSKey to randomly generated values. This
function panics if this is a new device, so make sure you Get() the device
first.

## func (*Device) SetManager
## func (\*Device) SetManager

```go
func (d *Device) SetManager(manager DeviceManager)
```

SetManager sets the manager of the device. This function panics if this is not a
new device.

## func (*Device) Update
## func (\*Device) Update

```go
func (d *Device) Update() error
```

Update the device. This function panics if this is a new device.

## type DeviceList
Expand All @@ -275,13 +288,14 @@ Update the device. This function panics if this is a new device.
type DeviceList []*SparseDevice
```

DeviceList is a slice of *SparseDevice.
DeviceList is a slice of \*SparseDevice.

## func (DeviceList) AsDevices

```go
func (d DeviceList) AsDevices() []*Device
```

AsDevices returns the DeviceList as a slice of *Device instead of *SparseDevice

## type DeviceManager
Expand Down Expand Up @@ -377,10 +391,11 @@ type SparseDevice struct {
SparseDevice contains most, but not all fields of the device. It's returned by
List operations to save server resources

## func (*SparseDevice) AsDevice
## func (\*SparseDevice) AsDevice

```go
func (d *SparseDevice) AsDevice() *Device
```

AsDevice wraps the *SparseDevice and returns a *Device containing that sparse
device
4 changes: 2 additions & 2 deletions doc/content/applications/golang/quick-start/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ appID := os.Getenv("TTN_APP_ID")
appAccessKey := os.Getenv("TTN_APP_ACCESS_KEY")
```

Next, we create a new **SDK Configuration** to connect to the public community network:
Next, we create a new **SDK Configuration** to connect to the The Things Stack Sandbox:

```go
config := ttnsdk.NewCommunityConfig(sdkClientName)
config.ClientVersion = "2.0.5" // The version of the application
```

And we create a new **SDK Client** for the application.
And we create a new **SDK Client** for the application.

The second line makes sure the client is cleaned up before the end of the program. You could add more of these `defer something.Close()` below, as it's good practice to clean up after you no longer need something. The `client.Close()` will make sure that everything we start after this point, will also be cleaned up, so I left out those other `defer something.Close()` for simplicity.

Expand Down
6 changes: 3 additions & 3 deletions doc/content/devices/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Devices
description: Connect devices to The Things Network.
sections:
- SDKs & Libraries
- Hardware
- SDKs & Libraries
- Hardware
image: /devices/icon.png
weight: 600
hidden: true
---

The Things Network is the first open source, decentralized infrastructure for the Internet of Things. The community edition is free for fair use. Learn how to connect your Things!
The Things Network is the first open source, decentralized infrastructure for the Internet of Things. [The Things Stack Sandbox](https://console.cloud.thethings.network) is free for fair use. Learn how to connect your Things!

Before your device can communicate via The Things Network, you will need to [register]({{< relref "registration" >}}) it.

Expand Down
28 changes: 14 additions & 14 deletions doc/content/gateways/packet-forwarder/semtech-udp/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Once the registration is complete, add the **gateway EUI** in the `local_conf.js

### Router configuration

After that, edit the `global_conf.json` file to point to the router. If you're using the public community network, you will need to add the **address of the router region** - for example, for the EU region, it will be `router.eu.thethings.network`. Otherwise, it will be the hostname of your **router** - most of the time, it is just the hostname of your network.
After that, edit the `global_conf.json` file to point to the router. If you're using the The Things Stack Sandbox, you will need to add the **address of the router region** - for example, for the EU region, it will be `router.eu.thethings.network`. Otherwise, it will be the hostname of your **router** - most of the time, it is just the hostname of your network.

Unless you're running the network yourself on specific ports, the **ports** will be 1700 and 1700.

Expand All @@ -50,19 +50,19 @@ Unless you're running the network yourself on specific ports, the **ports** will

#### Router addresses

| Region | Router address |
| ----------------------------------- | ------------------------------------------------ |
| `router.eu.thethings.network` | EU 433 and EU 863-870 |
| `router.us.thethings.network` | US 902-928 |
| `router.cn.thethings.network` | China 470-510 and 779-787 |
| `router.as.thethings.network` | Southeast Asia 923 MHz |
| `router.as1.thethings.network` | Southeast Asia 920-923 MHz |
| `router.as2.thethings.network` | Southeast Asia 923-925 MHz |
| `router.kr.thethings.network` | Korea 920-923 MHz |
| `router.jp.thethings.network` | Japan 923-925 MHz (with EIRP cap according to Japanese regulations)|
| `au915.thethings.meshed.com.au` | Australia 915-928 MHz |
| `as923.thethings.meshed.com.au` | Australia (Southeast Asia 923MHz frequency plan) |
| `ttn.opennetworkinfrastructure.org` | Switzerland (EU 433 and EU 863-870) |
| Region | Router address |
| ----------------------------------- | ------------------------------------------------------------------- |
| `router.eu.thethings.network` | EU 433 and EU 863-870 |
| `router.us.thethings.network` | US 902-928 |
| `router.cn.thethings.network` | China 470-510 and 779-787 |
| `router.as.thethings.network` | Southeast Asia 923 MHz |
| `router.as1.thethings.network` | Southeast Asia 920-923 MHz |
| `router.as2.thethings.network` | Southeast Asia 923-925 MHz |
| `router.kr.thethings.network` | Korea 920-923 MHz |
| `router.jp.thethings.network` | Japan 923-925 MHz (with EIRP cap according to Japanese regulations) |
| `au915.thethings.meshed.com.au` | Australia 915-928 MHz |
| `as923.thethings.meshed.com.au` | Australia (Southeast Asia 923MHz frequency plan) |
| `ttn.opennetworkinfrastructure.org` | Switzerland (EU 433 and EU 863-870) |

## Troubleshooting

Expand Down
26 changes: 13 additions & 13 deletions doc/content/gateways/packet-forwarder/ttn/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ title: TTN Packet Forwarder

The TTN Packet Forwarder is a new packet forwarder, developed by the Things Network Core Team in Go. Builds for a selection of gateways, and documentation on how it is built, is available [on GitHub](https://github.com/TheThingsNetwork/packet_forwarder). Among the features of this packet forwarder:

* Built in [Golang](https://golang.org) and open-source
- Built in [Golang](https://golang.org) and open-source

* Connects with the [Gateway Connector protocol]({{< relref "../../start/connection/#gateway-connector-protocol" >}}): authentified, reliable and encrypted
- Connects with the [Gateway Connector protocol]({{< relref "../../start/connection/#gateway-connector-protocol" >}}): authentified, reliable and encrypted

* Pre-built for multiple gateways, and build instructions available for all SPI LoRa gateways
- Pre-built for multiple gateways, and build instructions available for all SPI LoRa gateways

## Installation

Expand All @@ -22,9 +22,9 @@ We will be adding more gateways over time. In the meantime, if you have a differ

The TTN Packet Forwarder is configured through a configuration file. The location file's default location is `$HOME/.pktfwd.yml`, but can be located in different locations in our pre-built packages:

* In the Multitech Conduit package, it is located at the `/usr/cfg/config.yml` path.
- In the Multitech Conduit package, it is located at the `/usr/cfg/config.yml` path.

* In the Kerlink IoT Station package, it is located at the `/mnt/fsuser-1/ttn-pkt-fwd/config.yml` path.
- In the Kerlink IoT Station package, it is located at the `/mnt/fsuser-1/ttn-pkt-fwd/config.yml` path.

For in-depth configuration, all the paths are available [in the GitHub documentation](https://github.com/TheThingsNetwork/packet_forwarder#run).

Expand All @@ -39,7 +39,7 @@ key: <New gateway key>

### Configure on a private network

To configure the gateway to connect on a network that is **not** the public community network, set those values in the configuration:
To configure the gateway to connect on a network that is **not** the The Things Stack Sandbox, set those values in the configuration:

```yaml
discovery-server: <Hostname of the private network>:<Port of the discovery server>
Expand Down Expand Up @@ -75,9 +75,9 @@ _Example of this error happening_

This error happens when the gateway fails to complete a DNS lookup for the account server. It can happen for these reasons:

* Your gateway **doesn't have access to Internet** or to its DNS server. To verify if your gateway has access to Internet, the easiest way is to execute `ping 8.8.8.8`. If there is an answer, your gateway is certainly connected. You'll also want to make sure that if you're behind a firewall, it isn't blocking DNS resolutions.
- Your gateway **doesn't have access to Internet** or to its DNS server. To verify if your gateway has access to Internet, the easiest way is to execute `ping 8.8.8.8`. If there is an answer, your gateway is certainly connected. You'll also want to make sure that if you're behind a firewall, it isn't blocking DNS resolutions.

* There is **no DNS server configured** on the gateway. The resolution method for this issue varies from gateway to gateway - for most Linux-based gateways, it can be resolved by configuring Google's DNS servers. Edit the `/etc/resolv.conf` file, and fill it with this:
- There is **no DNS server configured** on the gateway. The resolution method for this issue varies from gateway to gateway - for most Linux-based gateways, it can be resolved by configuring Google's DNS servers. Edit the `/etc/resolv.conf` file, and fill it with this:

```
nameserver 8.8.8.8
Expand All @@ -100,8 +100,8 @@ This is another SSL certificates error, which can happen if you're setting up yo

A **failed to start concentrator** error means that the **start procedure of the LoRa concentrator has failed**. It can be due to several errors:

* The **communication with the device failed**. This can happen, for example:
* if you're using a build for the wrong gateway ;
* if you've made your own build, and that the communication interface (SPI-based, or FTDI-based) was not set up properly ;
* if some obstacle is preventing communication between the process and the concentrator. For example, if your concentrator needs a [reset before usage](https://github.com/TheThingsNetwork/packet_forwarder/blob/develop/docs/INSTALL_INSTRUCTIONS/IMST_RPI.md#pin-reset), or if the interface needs to be [enabled before usage](https://www.thethingsnetwork.org/forum/t/pause-or-stop-packet-forwarding-on-kerlink/5352/2).
* The LoRa concentrator is not **configured properly**. For examlpe, some gateways require additional [configuration steps](https://github.com/TheThingsNetwork/packet_forwarder/blob/dd535444e02f5ddd3ca379f2de715d417bde0f0c/pktfwd/configuration.go#L18-L21) - consult your gateway's documentation to know if the packet forwarder needs adaptation steps for this gateway.
- The **communication with the device failed**. This can happen, for example:
- if you're using a build for the wrong gateway ;
- if you've made your own build, and that the communication interface (SPI-based, or FTDI-based) was not set up properly ;
- if some obstacle is preventing communication between the process and the concentrator. For example, if your concentrator needs a [reset before usage](https://github.com/TheThingsNetwork/packet_forwarder/blob/develop/docs/INSTALL_INSTRUCTIONS/IMST_RPI.md#pin-reset), or if the interface needs to be [enabled before usage](https://www.thethingsnetwork.org/forum/t/pause-or-stop-packet-forwarding-on-kerlink/5352/2).
- The LoRa concentrator is not **configured properly**. For examlpe, some gateways require additional [configuration steps](https://github.com/TheThingsNetwork/packet_forwarder/blob/dd535444e02f5ddd3ca379f2de715d417bde0f0c/pktfwd/configuration.go#L18-L21) - consult your gateway's documentation to know if the packet forwarder needs adaptation steps for this gateway.
7 changes: 4 additions & 3 deletions doc/content/lorawan/duty-cycle/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ In Europe, duty cycles are regulated by section 4.3.3 of the [ETSI EN300.220-2 V
Additionally, the LoRaWAN specification specifies duty cycles for the join frequencies, which are used for over-the-air activations (OTAA) by every LoRaWAN-compliant end device. In most regions, the duty cycle for these frequencies is set to **1%**.

#### Fair Use Policy
On The Things Network's public community network a **Fair Use Policy** applies which limits the **uplink airtime** to **30 seconds per day (24 hours) per node** and the **downlink messages** to **10 messages per day (24 hours) per node**. If you use a private network, these limits do not apply, but you still have to be compliant with the governmental and LoRaWAN limits.

On The Things Network's The Things Stack Sandbox a **Fair Use Policy** applies which limits the **uplink airtime** to **30 seconds per day (24 hours) per node** and the **downlink messages** to **10 messages per day (24 hours) per node**. If you use a private network, these limits do not apply, but you still have to be compliant with the governmental and LoRaWAN limits.

## Compliance

Expand All @@ -44,12 +45,12 @@ Some radio modules (such as the RN2483) also enforce the duty cycle limits. If y
_The figure below shows enforcement on a resource with a 20% duty cycle limit_
![Single Channel Off-air](duty-cycle-single-channel-off-air.png)

In the European band, a transmission on a channel within a frequency band, also influences the other frequencies in that band.
In the European band, a transmission on a channel within a frequency band, also influences the other frequencies in that band.

_The figure below shows enforcement on two bands, each with a 20% duty cycle limit_
![Multiple Band Off-air](duty-cycle-multi-band-off-air.png)

As a per-channel duty cycle limit is easier to implement, you can also divide the sub-band duty cycle over the number of channels in that sub-band. So for example, in a sub-band with 8 channels and a duty cycle of 1%, each channel has a duty cycle of 1/8% (that's 0.125%).
As a per-channel duty cycle limit is easier to implement, you can also divide the sub-band duty cycle over the number of channels in that sub-band. So for example, in a sub-band with 8 channels and a duty cycle of 1%, each channel has a duty cycle of 1/8% (that's 0.125%).

This method is also implemented by the RN2483 module, and as a result, instead of seeing the `no_free_ch` when you send too quickly after the first message you can send multiple messages before all 8 channels are "blocked" and the duty cycle is enforced.

Expand Down
Loading