Add ttn-lw-cli command to add new mapper

This commit is contained in:
seiichiro 2021-09-12 14:39:21 +02:00
parent c08d2aac8e
commit b18dde5aec

View file

@ -51,6 +51,31 @@ If a Button is connected you can use the following functions:
In Setup Mode a '>' in front of a Line identifies the selected option, a '>>' identifies an activated setting (can be changed by short press). Use long press to deactivate an activated setting In Setup Mode a '>' in front of a Line identifies the selected option, a '>>' identifies an activated setting (can be changed by short press). Use long press to deactivate an activated setting
### Add Mapper to TheThingsStack Community Edition
As there are some shortcomings with adding ABP devices as this mapper to TTN (mainly creating unnecessary downlinks and handling of framecounter resets) currently the best way to add the mapper to an application is to use the [ttn-lw-cli commandline utility](https://www.thethingsindustries.com/docs/getting-started/cli/installing-cli/). First you will have to create an application with the ttnmapper-integration as described [here](https://docs.ttnmapper.org/integration/tts-integration-v3.html), if you don't already have one. Then cou can use the following command to add a mapper device to the application:
```
ttn-lw-cli dev add <application-id> <device-id> \
--frequency-plan-id EU_863_870_TTN \
--lorawan-version 1.0 \
--lorawan-phy-version 1.0 \
--abp \
--session.dev-addr <dev-addr> \
--session.keys.app-s-key.key <app-s-key> \
--session.keys.f_nwk_s_int_key.key <network-s-key> \
--mac-settings.factory-preset-frequencies 867100000,867300000,867500000,867700000,867900000,868100000,868300000,868500000 \
--mac-settings.rx1-delay 5 \
--mac-settings.rx1-data-rate-offset 0 \
--mac-settings.rx2-data-rate-index 3 \
--mac-settings.rx2-frequency 869525000 \
--mac-settings.status-count-periodicity 0 \
--mac-settings.status-time-periodicity 0 \
--mac-settings.resets-f-cnt=true
```
Replace all the values in `<..>` with the appropriate values. The DevAddr and App-/Network-Keys might have to be generated in the web-console first, at least I haven't found a way to generate these with the CLI tool so far.
## License ## License
Unless stated otherwise, everything in this repository is under the BSD 3-Clause License as follows: Unless stated otherwise, everything in this repository is under the BSD 3-Clause License as follows: