Quick Start: Device Provisioning Preparation


This section helps you quickly learn how to generate QR codes for provisioning devices to EnOS via the Device Provisioning Service.

About This Scenario


Before selling devices to clients, manufacturers can register the devices on EnOS using the Device Provisioning Service, and batch generate QR codes and device authentication information and apply them to the devices, after which the clients can scan the QR code for the devices to automatically onboard them to the cloud without any further complicated configurations.


This method enables the efficient onboarding of device with minimal on-site human efforts through a smooth device adding and mobile onboarding verification process.

About This Task


This task will configure, pre-register, and generate the QR codes for 5 devices for onboarding in EnOS via the Device Provisioning Service.


This task has the following steps:

  1. Create a model.
  2. Configure a master data group.
  3. Configure a registration group.
  4. Generate QR codes.

Prerequisites


  • Ensure that you have registered a personal or business account with EnOS to access the EnOS Management Console.
  • Ensure the account has all the access for Asset and Model, and full access for Device Management Service. For more information, see Policies, Roles, and Permissions.
  • Ensure that your OU has purchased the Device Provisioning Service application.

Step 1: Create a Model

  1. Log in to the EnOS Management Console and select Models from the left navigation menu.

  2. Click New Model, enter the following in the New Model window, and click OK.

    • Identifier: meterModel
    • Model Name: Meter Model
    • Category:None
    • Created From: No
    • Validate Model: Disabled
    • Description: Model for meter


    ../_images/qr_model.png


The created model will appear in the list of private models in the Models page.

Step 2: Configure a Master Data Group

  1. Select Device Provisioning Service > Master Data Group Management from the left navigation menu.

  2. Click New Master Data Group, enter the following in the New Master Data Group page, and click Save.

    • Name: Meter Master Data Group
    • Description: Master data group for meter
  3. The created master data group will appear in the list of master data groups in the Master Data Group Management page. Click its View Details icon.

  4. Click Create Master Data > Create Custom Master Data, enter the following in the Custom Master Data window, and click OK.

    • Name: Location
    • Identifier: location
    • Data Type: string
    • Default Value: None
    • String Length: 1024
    • Required: No
    • Tags: DPS (key), MODEL (value)
    • Description: Location


    ../_images/qr_dev_group_masterdata.png


The created master data will appear in the list of master data under Master Data Group Master Data.

Step 3: Configure a Registration Group


  1. Select Device Provisioning Service > Registration Group Management from the left navigation menu.

  2. Click New Registration Group, enter the following in the New Registration Group page, and click Save.

    • Basic Information

      • Registration Group: Meter Registration Group
      • Master Data Group: Meter Master Data Group
      • Reprovision Method: Reprovision and migrate configuration information
      • Description: Registration group for meter


    • Gateway Information

      • Gateway: IotHub
      • Model Type: Private
      • OU to Allocate: Select the environment the OU where the model created in Step 1 is located and the OU
      • Model: The model created in Step 1, which is the Meter Model
      • Data Parsing Format: Json


    • Connection Information

      • Auto Device Allocation: Enabled


The created registration group will appear in the list of registration groups in the Registration Group Management page.

Step 4: Register a Device


  1. In the Registration Group Management page, find the registration group Meter Model created in Step 3 and click its View Details icon.
  2. Click the Device Information tab and click Register Device.
  3. Enter the following fields and click Register.
    • Registration Method: System Generated
    • Quantity: 5
    • Batch Tag: 1
    • Tick the Export QR Code checkbox.
  4. The QR codes will be in a ZIP file. Save the ZIP to your local directory.

The registered devices will appear in the list of devices under the Device Information tab.


../_images/qr_devices.png

Next Steps


After generating the QR code, you can affix it to the surface of the device and burn the device SN into the device, create a QR code scanning application to retrieve the device status by scanning the QR code, and utilize the Device Provisioning Service APIs and Device SDK to integrate the device with the burned SN into EnOS, completing the device’s connection to the cloud.