Automated Device Onboarding

To enable the Automated Device Onboarding through Blynk, follow these steps:

  1. Open the advanced settings of the application on Blynk.

  2. Turn on the "Enable automated device onboarding" switch.

  3. Specify the LoRaWAN version, Frequency plan, and Regional Parameter Version. Also, enable the "Support class B" and/or "Support class C" checkboxes if required.

  4. Specify the addresses of The Things Network components. You can find the correct values at the bottom of the "Overview" page on your The Things Network dashboard.

  5. Save the changes.

At this point, Blynk creates three new metadata fields in the device template: Device EUI, Join EUI (same as App EUI), and Application Key.

Additionally, Blynk requires the "View device keys in application", "Create devices in application" and "Edit device keys in application" permissions. To provide this, generate a new API key or edit the existing one that you were using with Blynk.

Now that automated device onboarding is enabled and configured, you can onboard your first device. Blynk supports three ways to onboard a device on The Things Network. Let's cover them separately.

Sometimes, a device requires a reboot to initiate the onboarding flow. Make sure to restart the device if it doesn't automatically start the onboarding process after following the setup steps. This can help ensure the device properly connects and begins the necessary communication with Blynk and The Things Network.

Manually configure the tokens

This is the easiest, but least scalable way to onboard the device:

  1. Start by creating the device from the template on the web dashboard.

  2. Open "Info & Metadata" and fill out the three metadata fields: Device EUI, Join EUI (same as App EUI), and Application Key.

Once these three metadata fields are specified, Blynk will automatically create the device in The Things Network application.

Onboard using Static Tokens

The preferred method for device provisioning is using Static Tokens. Here’s how to do it:

  1. Create a CSV file listing the Device EUI, Join EUI (same as App EUI), and Application Key for each device.

  2. Use this CSV file to create static tokens: open the Developer Zone -> Static Tokens -> Generate Static Tokens -> Create From File. Then select the device template and upload the file.

  3. This process will generate a unique QR code for each device.

  4. These QR codes can be scanned via the mobile application or on the web dashboard.

  5. Once a QR code is scanned and the device is created, it will be automatically created on The Things Network.

Here is an example of a CSV file that could be used for creating static tokens:

Device EUI,Join EUI,Application Key
0018B20000000101,70B3D57ED0000010,2B7E151628AED2A6ABF7158809CF4F3C
0018B20000000102,70B3D57ED0000011,3B7E151628AED2A6ABF7158809CF4F3D
0018B20000000103,70B3D57ED0000012,4B7E151628AED2A6ABF7158809CF4F3E

Onboard using LoRaWAN QR Code

Blynk also supports LoRaWAN® Device Identification QR Codes for Automated Onboarding. To use them, follow these steps:

  1. First, create the static tokens as described in the "Onboard using Static Tokens" section.

  2. Construct the QR code in the LoRaWAN format using the Profile ID specified in the advanced settings of The Things Network integration application card.

Additionally, you can change the Profile ID used in the QR code body. To do so, open the application settings on Blynk, locate to the advanced settings and edit the Profile ID field.

For LoRaWAN QR codes, Blynk requires the following:

  1. The code must start with LW:D0.

  2. It must contain the Join EUI (same as App EUI), Device EUI, and the Profile ID.

  3. Optionally, it may contain a checksum.

  4. Any other parts of the QR code are ignored.

Here is an example of how the QR code data should be structured:

LW:D0:<Join EUI>:<Device EUI>:<Profile ID>:<Optional CheckSum>

Here is an example of the QR code body with Join EUI = 70B3D57ED0000010, Device EUI = 0018B20000000101 and Profile ID = 000AF8BE:

LW:D0:70B3D57ED0000010:0018B20000000101:000AF8BE

Then this QR code can be scanned in the same way as Static Tokens in the mobile application or on the console. Once the device is created, it will be automatically onboarded on The Things Network.

Last updated