Register Your MXChip Device with IoT Hub

Every IoT hub has an identity registry that stores information about the devices that are permitted to connect to it. Before a device can connect to an IoT hub, there must be an entry for that device in the IoT hub’s identity registry. A device must also authenticate with the IoT hub based on credentials stored in the identity registry.

In this task, you will register your MXChip AZ3166 device with your IoT Hub.

  1. Ensure that you have the GetStarted sample open in Visual Studio Code and that your MXChip AZ3166 device is connected to your PC.
  2. In the Visual Studio Code window, press Ctrl + P.
  3. At the prompt, to select the task that will provision your device, type task c and then click cloud-provision
  1. When prompted within the command line instructions, select the Azure subscription that you are using, and then press Enter The provisioning process will then check your subscription for an IoT Hub that it can use.
  2. When prompted within the command line instructions, select the IoT Hub that you created earlier, and then press Enter. You should see an option to select the hub that you created.
  3. When prompted that the provisioning process is complete, press Enter. You device, which has been named AZ3166, has now been registered with your IoT Hub. You can open you Azure portal to verify that it was created.
  4. Open a browser window and navigate to your Azure portal.
  5. On your dashboard, use your Resources tile to open your IoT Hub. Click the IoT Hub resource to open it.
  6. On the Overview blade, notice that the IoT Hub Usage tile now indicates that you have 1 IoT Device.
  7. On the left-side menu, click *IoT devices.
  8. Notice that a device has been created with the device ID set to “AZ3166”.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: