Studies with Azure Sphere (4) - The Azure Sphere registered by DPS Azure Io

This article contains the following:

A use Azure Sphere SDK to retrieve a CA certificate and configuring Azure IoT Hub DPS services;

      Creating IoT Hub;

      Creating DPS;

      Obtain a certificate by Azure Sphere SDK and uploaded to DPS for verification.

Second Example of use of the advanced application deployed to Azure Sphere boards and report data to the IoT Hub;

     Visual studio to prepare environmental Azure Sphere SDK :( need to uninstall the previous section, and then reinstall Azure Sphere SDK For Visual studio)

     In Visual studio project to compile and debug;

     In the DPS check register group and IoT Hub;

     It was observed in the device to a data cloud of Azure IoT Hub explorer.

 

Video Tutorial:

You can watch a video explaining this section in B station: https://www.bilibili.com/video/av98475432/

Or at the site to watch:

 

Photo explanation:

A use Azure Sphere SDK to retrieve a CA certificate and configuring Azure IoT Hub DPS services;

      Creating IoT Hub;

      Creating DPS;

      Obtain a certificate by Azure Sphere SDK and uploaded to DPS for verification.

key step:

Download Azure Sphere tenants certificate:

azsphere tenant download-CA-certificate --output C:\CAcertificate.cer

img-dfdaced8-0bea-4889-a734-a9e6fefa8e5e.png

Get a verification certificate:

azsphere tenant download-validation-certificate --output C:\ValidationCertification.cer --verificationcode codeXXXXX

 

img-94aea564-c88a-4718-8b32-fcd07c73a9b3.png

 

img-9280d951-17af-4369-ba1f-42979c69947f.png

 

img-8d07f312-cae5-4d49-9e63-972e2e24fc87.png

 

img-e9f73e0c-3d3a-4efb-a1c4-c08d59292182.png

 

 

img-29ed752f-3df2-458e-98cf-ba4bbc09442d.png

 

img-efe4c6a5-8b31-4bd4-8d5e-1765f79ab6bc.png

As verified by FIG.

img-a098329c-7bb5-45f8-9c66-b785979f909c.png

 

Create a group registration:

img-45199cee-6719-4cf8-9219-5abedac21e6c.png

 

Create a group registration:

img-845f95c3-abf3-40a4-a1fb-1fb9cd692d9d.png

 

Second Example of use of the advanced application deployed to Azure Sphere boards and report data to the IoT Hub;

     Visual studio to prepare environmental Azure Sphere SDK :( need to uninstall the previous section, and then reinstall Azure Sphere SDK For Visual studio)

     In Visual studio project to compile and debug;

     In the DPS check register group and IoT Hub;

     It was observed in the device to a data cloud of Azure IoT Hub explorer.

 

Note that this step will need to uninstall the previous talk among Azure Sphere SDK for windows, then install the Azure Sphere SDK for Visual studio 

Sample code to modify a position:

img-531b16b7-faca-4ad7-bc51-ef583b5ae9d2.png

 

Compile the project:

img-1a5786d2-c659-44e0-a5ab-0a1a92e94045.png

Compile CMakelist.txt (right mouse button)

img-43b47d82-d9b1-4e13-b3df-795a9830e76b.png

Select GDB Debugeger (HL Core) and start debugging

img-aee14986-45ab-4795-94d4-f586bf206432.png

 

After compilation, you can see telemetry has begun sending a message to the IoT Hub:

img-8b35180c-4f0e-4c78-9171-5397ce2e36d6.png

 

Registration records Iot Hub DPS Inspection Unit:

img-2ffbf31a-05bf-41f9-99f1-5755744427d5.png

 

In IoT Hub Device check Device Record:

img-3e5a3a0f-4dd4-43e9-9ee3-673c8ae3d5be.png

 

Use Azure IoT Hub Explorer to view the message D2C

img-33d9f8cb-f87c-4668-9853-6dcee9405c19.png

 

 

 

In this section, regarding the content of Azure IoT Hub DPS, see:

" Azure Azure intelligent cloud IoT DPS ten minutes Intermediate series of articles directory "


Guess you like

Origin blog.51cto.com/10117438/2480971