2.3.0 • Published 2 months ago

ttjs-cli v2.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

The Things Join Server Command-line Interface

The Things Join Server is a stand-alone LoRaWAN® Join Server implementation with provisioning and claiming capabilities. The Things Join Server supports LoRaWAN Backend Interfaces 1.0 and 1.1.

The Command-line Interface (CLI) can be used to provision end devices.

Table of Contents

Install

Install The Things Join Server CLI:

$ npm install -g ttjs-cli

Configure

Initialize configuration:

$ ttjs init

The initialization procedure prompts the following configuration settings:

  • Server URL: URL of The Things Join Server
  • Provisioner username: Username of the Provisioner
  • Provisioner password: Password of the Provisioner
  • Configuration file: Path to local file to store the configuration file. This is useful if you work with multiple The Things Join Server instances. You can pass the path of a configuration file to the CLI via the --config (-c) flag.

Device Management

To provision new devices on The Things Join Server, the CLI can upload a file with provisioning information. The Things Join Server may support multiple provisioning formats. To list the formats supported by The Things Join Server:

$ ttjs import list-formats

See the referenced documentation in the output for more information.

To provision end devices from a file named devices.csv:

$ ttjs import --format csv devices.csv

This returns the provisioned end devices, along with their standard QR code for claiming.

To request the current Owner Token and current claim of DevEUI 1122334455667788:

$ ttjs get 1122334455667788

To request the root keys and the nonces:

$ ttjs get 1122334455667788 --nonces --root-keys

WARNING: If you pass --root-keys, the root keys are returned in plain text. This marks the root keys forever as exposed.

To request the Owner Token and current claim of all devices:

$ ttjs list

The Owner Token can be used by Application Servers for claiming, see Claiming.

QR Codes

To generate QR codes for all devices:

$ ttjs qr-code

To generate the QR code for a single device:

$ ttjs qr-code --dev-eui 1122334455667788

This writes the QR code to the current directory with default settings.

You can specify the output folder with --output-folder, the type with --type (png or svg), the scale with --scale, the margin with --margin and the error correction level with --error-correction-level (L, M, Q, H). Pass --help for help.

If you're using a custom QR code generator, you can get the QR code text. For all devices:

$ ttjs list --qr-code

To get the QR code text for a single device:

$ ttjs get 1122334455667788 --qr-code

Example CSV

The Things Join Server supports importing devices from a CSV file out of the box. This is an example CSV file with two devices with LoRaWAN 1.0.x support:

dev_eui;app_key
1122334455667788;11223344556677881122334455667788
8877665544332211;88776655443322118877665544332211

Another example with LoRaWAN 1.1 support, custom owner tokens and a vendor ID and profile ID:

dev_eui;app_key;nwk_key;owner_token;vendor_id;profile_id
1122334455667788;11223344556677881122334455667788;11223344556677881122334455667788;secret1;42;1234
8877665544332211;88776655443322118877665544332211;88776655443322118877665544332211;secret2;42;1234

Legal

Copyright © 2023 The Things Industries B.V.

2.3.0

2 months ago

2.3.0-rc1

2 months ago

2.2.3

3 months ago

2.2.2

3 months ago

2.2.4

3 months ago

2.2.1

5 months ago

2.2.0-beta.4

6 months ago

2.2.0

6 months ago

2.2.0-beta.2

6 months ago

2.2.0-beta.3

6 months ago

2.1.0-rc.17

11 months ago

2.2.0-beta.1

8 months ago

2.1.0

10 months ago

2.1.0-rc.14

1 year ago

2.1.0-rc.15

1 year ago

2.1.0-rc.1

1 year ago

2.1.0-rc.12

1 year ago

2.1.0-rc.13

1 year ago

2.1.0-rc.6

1 year ago

2.1.0-rc.5

1 year ago

2.1.0-rc.16

1 year ago

2.1.0-rc.4

1 year ago

2.1.0-rc.3

1 year ago

2.1.0-rc.10

1 year ago

2.1.0-rc.11

1 year ago

2.1.0-rc.9

1 year ago

2.1.0-rc.8

1 year ago

2.1.0-rc.7

1 year ago

2.0.0

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

1.0.0

2 years ago