-
Notifications
You must be signed in to change notification settings - Fork 3
User Guide
Table of Contents
- 1 User Guide
- 2 Login to Device Management Application
- 3 Run the Blink Applications
- 4 Verify data in IoT Hub Device Twin
- 5 Verify Device Management application
- 6 Monitoring Components
This Document explains about how to use the solution. In this we are configuring and validating the Blink Application with Device Management Application and also monitoring the resources of the solution.
Once the solution is deployed successfully, navigate to the resource group and select the created resource group to view the list of resources that are created in the Resource Group as shown in the following figure.
Go to Resource Group -> Click on the deployed App Service.
Now you can see the app service overview page, copy the URL and browse it in new web browser.

To access the Device Management portal, login with your credentials.
Now you can view the Device Management Portal Dashboard.

In Blink app Solution Explorer, select azure_iot_hub.c in your solution and update the IoT Hub connection string which was copied from above step and save it.

Now open the app_manifest.json file and update the IoT Hub Host name from the connection string.

Now you can build the application and use the Azure IoT Hub. In this walkthrough, we will use existing IoT Hub tools to monitor and communicate with your device.
Now click on Remote GDB Debugger and click on Yes to build the Blink App.

The output in the below screen shot shows that the build has been completed successfully and the Wi-Fi has been connected.


Once the application is running the output also shows the IoT Hub connected Status and Report Status of the device as below.

Go to Resource Group -> Click on IoT Hub.

Click on IoT devices in left side menu and click created device.

Here you can see the Device Details page. Click on Device Twin
Below is the Device Twin json file with Blink Application features as false.

Go to Resource Group -> click Device Management.

After running the blink App the connected Status of the device will get reflected in the device management web app.
Click on connected.

The features of the blink app show disabled. Similarly the same status can be seen by Clicking on View JSON.
Click on Activate button on any of the blink app feature like blinkrate1.
Once it is activated the same will be reflected in IoT Hub’s device twin.
To validate the blink rate, go to resource group -> go to device management web app. Select the device to which Azure Sphere Device is associated.
Under features section of the device, select Blink Rate1 as active.
After selecting blink rate1 feature we can see LED light blinking slowly on Azure Sphere device like below.
For video reference on Blink Rate1 go through the below link.
https://github.com/sysgain/MSIotDeviceManagement/raw/master/Documentation/BlinkRate1.mp4
Uncheck Blink Rate1 and select Blink Rate2 as active.
When you select blink rate2 the LED light will blink a little faster on Azure Sphere device as shown in below screen shot.
For video reference on Blink Rate2 go through the below link.
https://github.com/sysgain/MSIotDeviceManagement/raw/master/Documentation/BlinkRate2.mp4
Uncheck Blink Rate2 and select Blink Rate 3 as active.
when you select Blink Rate3 the LED Light will continuously blink on Azure Sphere device as shown in below screenshot.
For video reference on Blink Rate3 go through the below link.
https://github.com/sysgain/MSIotDeviceManagement/raw/master/Documentation/BlinkRate3.mp4
Go to Azure Portal, select your Resource Group and select Application Insights as shown below.

On Overview page, Summary details are displayed as shown in the following figure.

Click on Live Metric Stream, which is available at left side menu to check the live requests of Device Management Application.


Go back to the Application Insights Overview page in Azure Portal.
Then click Metrics Explorer on the left side of the page as shown below.
Click Edit as shown in the following figure.

You can select any of the listed Metrics to view application logs.

If you want to add new chart click Add new chart as shown in the following figure and click Edit to add the specific metrics.
Go back to Application Insights, in the Overview page click Analytics icon in the Health section as shown in the following figure.

The Application Insights page is displayed and double click on requests.


You can click run to see the specific requests of application as below.

Now click on chart then click Yes to see the graph.

After click on chart you can see the requests graph like below.

Now do the same process for checking graph for custom metrics.
Double click on custom metrics.

You can click run to see the specific custom metrics of application as below.

Now click on chart then click Yes to see the graph.

Similarly, you can run the other common Pre-defined queries by navigating back to the Home Page.
Open Azure Portal -> Resource Group -> Click the OMS Workspace in resource group to view OMS Overview Section.
Click Azure Resources on left side menu to view available Azure Resources.

Select your Resource Group name from the dropdown list.

Go to overview blade and click on OMS Portal as shown below.

Once you click OMS Workspace, OMS Home Page will take few seconds to load and displayed as below.
Click Search tab to search the IoT hub, Stream Analytics, Cosmos DB.
Click Show legacy language converter.

Copy IoT Hub resource name, paste it in the Converter box and click RUN.
The IoT Hub information is displayed below the page as shown in the following figure.

Copy Cosmos DB resource name, paste it in the Converter box and click RUN.
The cosmos db information is displayed in the below page as shown in the following figure.

For Stream Analytics logs, first you need to enable the Diagnostics logs.
Go to Azure Portal, click STREAM ANALYTICS JOB as shown below.
Click Diagnostics logs on the left pane and select Add diagnostics setting as shown in the following figure.

In the Diagnostics settings page, enter the name in the Name field.
Select Send to Log Analytics checkbox.
Select the Execution and Authoring checkboxes under the LOG section.
Select Allmetrics checkbox under the METRIC section.
Configure your workspace from the OMS Workspaces page as shown in the following figure.
Click Save.
Go to OMS Portal and Click Search tab for Stream Analytics logs.
Copy Stream Analytics Job resource name, paste it in the Converter box and click RUN.
The Stream Analytics Job information is displayed below the page as shown in the following figure.
