thethingsstack.io has moved to thethingsindustries.com/docs
Got it

v3.12

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Devices

    Overview
  • ABP vs OTAA
  • Adding Devices
  • ATECC608A/B Secure Elements
  • Best Practices
  • Class B
  • Class C
  • Device Claiming
  • Downlink Queue Operations
  • End Device Templates
  • Generating a QR Code
  • MAC Settings
  • Multicast

Generating a QR Code

The Things Stack can generate QR codes for your devices, which helps identifying the devices and allows for claiming the device.

This guide shows how to list QR code formats and generate QR codes with 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 supported QR code formats for end devices:

$ 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 formats show the fields of the end device that are used in the QR code.

Generate QR Code for Identification

To generate a QR code for identification:

$ ttn-lw-cli end-devices generate-qr app1 dev1 --format-id tr005
Example
Device QR Code for Identification

This saves the QR code to the current directory with the device ID as file name, in PNG format with a default size of 300 pixels. Use --folder and --size to change the save location and image size.

Generate QR Code for Claiming

Device claiming is a mechanism to transfer devices securely from one application to another. For example, from a device maker to a device owner, or transferring ownership to new device owner. Learn how to make a device claimable.

When a device is claimable (it contains a claim authentication code), you can use the same command as above to generate a QR code:

$ ttn-lw-cli end-devices generate-qr app1 dev1 --format-id tr005
Example
Device QR Code for Claiming
← Assigning EUIs MAC Settings →

On this page

  • List QR Code Formats
  • Generate QR Code for Identification
  • Generate QR Code for Claiming

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Johan Stokking on 16 Mar 2021.
doc: Address review comments

Edit on Github