v3.25.2

Getting Started Devices Gateways The Things Stack Integrations Reference
Get The Things Stack

Devices

    Overview
  • Adding Devices
  • ABP vs OTAA
  • Best Practices
  • Class B
  • Class C
  • Multicast
  • Downlink Queue Operations
  • Confirmed Downlinks Behavior
  • MAC Settings
  • ATECC608 Secure Elements
  • Device Claiming
  • Generating a QR Code
  • Generic Node Sensor Edition
  • The Things Node
  • The Things Uno
  • Troubleshooting Devices

Generating a QR Code

The Things Stack can generate QR codes for your devices, which can help you identify or claim those devices.

This guide shows how to list QR code formats supported by The Things Stack and generate QR codes using the CLI.

Command-line interface only

The instructions below use the command-line interface (CLI).

Learn how to install the CLI

List QR Code Formats

To show QR code formats for end devices that The Things Stack supports:

ttn-lw-cli end-devices list-qr-formats
Output
{
  "formats": {
    "tr005": {
      "name": "LoRa Alliance TR005",
      "description": "Standard QR code format defined by LoRa Alliance.",
      "field_mask": {
        "paths": [
          "claim_authentication_code.value",
          "ids.dev_eui",
          "ids.join_eui"
        ]
      }
    }
  }
}

The paths object from the output shows the end device fields that are used to generate the QR code.

Generate an Identification QR Code

To generate a QR code to help you easily identify your device:

ttn-lw-cli end-devices generate-qr <application-id> <device-id> --format-id <qr-code-format>

The generated QR code will automatically be saved to the current directory with the device ID as a file name, in PNG format with a default size of 300 pixels. Use the --folder and --size flags to change the save location and image size.

Example of a generated identification QR code
Device QR Code for Identification

If you scan the generated identification QR code, you will see that it stores the information in the following format: LW:<schema-id>:<join-eui>:<dev-eui>:<profile-id>.

The SchemaID value will be D0 as it is the only device schema version described by the LoRaWAN® Device Identification QR Codes for Automated Onboarding Technical Recommendation (TR005).

The ProfileID encodes a VendorID, assigned by the LoRa Alliance prior to commercial production of a device, and a VendorProfileID, assigned by the device manufacturer for commercial products. Read more in the TR005 document.

For the example identification QR code presented above, the stored information is: LW:D0:0000000000000000:1122334455667789:00000000.

← Device Claiming Generic Node Sensor Edition →

On this page

  • List QR Code Formats
  • Generate an Identification QR Code

The Things Stack

Getting Started

Devices

Gateways

The Things Stack

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Krishna Iyer on 19 Apr 2023.
Restructure documentation (#1076)

Edit on Github