From 551e222ea6cf8b187a78b1658dba8dc5aec59e0d Mon Sep 17 00:00:00 2001 From: neeraj-khanna Date: Mon, 26 Sep 2016 20:08:39 +0530 Subject: [PATCH] Device-specific document for NB31 device from Micro-Star --- doc/get_started/windows10-nb31-csharp.md | 65 ++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 doc/get_started/windows10-nb31-csharp.md diff --git a/doc/get_started/windows10-nb31-csharp.md b/doc/get_started/windows10-nb31-csharp.md new file mode 100644 index 00000000000..bd0b3024025 --- /dev/null +++ b/doc/get_started/windows10-nb31-csharp.md @@ -0,0 +1,65 @@ +--- +platform: windows 10 pro x64 rs1 +device: nb31 +language: csharp +--- + +Run a simple Csharp sample on NB31 device running Windows 10 Pro x64 RS1 +=== +--- + +# Table of Contents + +- [Introduction](#Introduction) +- [Step 1: Prerequisites](#Prerequisites) +- [Step 2: Prepare your Device](#PrepareDevice) +- [Step 3: Build and Run the Sample](#Build) + + +# Introduction + +**About this document** + +This document describes how to connect {enter your device name here} device running {enter the OS name running on device} 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 + + +# Step 1: Prerequisites + +You should have the following items ready before beginning the process: + +- [Prepare your development environment][setup-devbox-windows] +- [Setup your IoT hub][lnk-setup-iot-hub] +- [Provision your device and get its credentials][lnk-manage-iot-hub] +- NB31 device. + + + +# Step 2: Prepare your Device + +- Install Microsoft Visual Studio Community 2015 on NB31 +- Connect NB31 to internet + + +# Step 3: Build and Run the sample + +- Download the [Azure IoT SDK](https://github.com/Azure/azure-iot-sdks) and the sample programs and save them to your local repository. +- Start a new instance of Visual Studio 2015. +- Open the **iothub_csharp_client.sln** solution in the `csharp\device` folder in your local copy of the repository. +- In Visual Studio, from Solution Explorer, navigate to the **samples** folder. +- In the **DeviceClientAmqpSample** project, open the ***Program.cs*** file. +- Locate the following code in the file: + + private const string DeviceConnectionString = ""; + +- Replace `` with the connection string for your device. +- In **Solution Explorer**, right-click the **DeviceClientAmqpSample** project, click **Debug**, and then click **Start new instance** to build and run the sample. The console displays messages as the application sends device-to-cloud messages to IoT Hub. +- Use the **DeviceExplorer** utility to observe the messages IoT Hub receives from the **Device Client AMQP Sample** application. +- Refer "Monitor device-to-cloud events" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) to see the data your device is sending. +- Refer "Send cloud-to-device messages" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) for instructions on sending messages to device. + +[setup-devbox-windows]: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md +[lnk-setup-iot-hub]: ../setup_iothub.md +[lnk-manage-iot-hub]: ../manage_iot_hub.md