About this document
This document describes how to connect Inventec Avatar device running Windows 10 IoT Core with Azure IoT SDK. This multi-step process includes:
- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device
You should have the following items ready before beginning the process:
- Setup your IoT hub
- Provision your device and get its credentials
- Inventec Avatar device.
- Azure SDK for .NET
- Windows 10 IoT Core Package
- Virtual Ethernet
-
To create Windows IoT Core solutions, you will need to install Visual Studio 2015. You can install any edition of Visual Studio, including the free Community edition.
Make sure to select the Universal Windows App Development Tools, the component required for writing apps Windows 10:
-
Flash Windows 10 IoT Core image on to the device.
-
On the first boot of the device only, do the following:
-
Plug the device into a USB port on your computer.
-
Use
ffutool -list
to check if the device is enumerated correctly in the system. -
Use
ffutool -massstorage
to put the device into mass storage mode. -
Configure BCD store using the following command to enable KDNet debugging (
<Host IP>
is the IP address of your PC,E:
is the storage drive of your module):bcdedit /store E:\efiesp\efi\Microsoft\Boot\BCD /dbgsettings net HOSTIP:<Host IP> PORT:50000 KEY:1.2.3.4 bcdedit /store E:\efiesp\efi\Microsoft\Boot\BCD -set {default} debug on bcdedit /store E:\efiesp\efi\Microsoft\Boot\BCD -set {dbgsettings} busparams 1 bcdedit /store E:\efiesp\efi\Microsoft\Boot\BCD -set {globalsettings} forceffumode off
-
Unplug the device.
-
-
On your computer, run Virutal Ethernet (�VirtEth.exe� ) as administrator.
-
Plug the device into a USB port on your computer.
-
Wait for a few minutes for the device to enumerate, open WindowsIoTCoreWatcher to find your device.
- On your computer, run Virtual Ethernet as administrator.
- Plug the device into a USB port on your computer.
-
Start a new instance of Visual Studio 2015. Open the iothub_csharp_client.sln solution (/azure-iot-sdks/csharp) from your local copy of the repository.
-
In Visual Studio, from Solution Explorer, navigate to the UWPSample(Universal Windows) project.
-
Locate the following code in the ConnectionStrings.cs file:
public const string DeviceConnectionString = "<replace>";
-
Replace the above placeholder with device connection string you obtained in Step 1 and save the changes.
-
Choose the right architecture (ARM) and set the debugging method to "Remote Machine":
-
To deploy the binaries on your device, right-click on the UWPSample project in the Solution Explorer, select Properties and navigate to the Debug tab:
Type in the IP Address of your device. Make sure the "Use authentication" box is unchecked.
-
Build the solution.
-
On Windows, refer "Monitor device-to-cloud events" in DeviceExplorer Usage document to see the data your device is sending.
-
If you are running other OS, please use the JavaScript tool iot-hub explorer tool
-
In Visual Studio, from Solution Explorer, right-click the UWPSample(Universal Windows) project, click Debug −> Start new instance to build and run the sample.
-
You should be able to see the events received in the DeviceExplorer's data tab.
-
On Windows, refer "Send cloud-to-device messages" in DeviceExplorer Usage document for instructions on sending messages to device.
-
If you are running other OS, please use the JavaScript tool iot-hub explorer tool