Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device-specific document for NB31 device from Micro-Star #843

Merged
merged 1 commit into from
Sep 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions doc/get_started/windows10-nb31-csharp.md
Original file line number Diff line number Diff line change
@@ -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)

<a name="Introduction"></a>
# 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

<a name="Prerequisites"></a>
# 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.


<a name="PrepareDevice"></a>
# Step 2: Prepare your Device

- Install Microsoft Visual Studio Community 2015 on NB31
- Connect NB31 to internet

<a name="Build"></a>
# 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>";
- Replace `<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