-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #843 from neeraj-khanna/master
Device-specific document for NB31 device from Micro-Star
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |