Skip to content

Latest commit

 

History

History
118 lines (81 loc) · 4.72 KB

windows-iot-core-nexcom-nise50-csharp.md

File metadata and controls

118 lines (81 loc) · 4.72 KB
platform device language
windows-iot-core
nexcom-nise50
csharp

Run a simple Csharp sample on NEXCOM NISE50 device running Windows 10 IoT Core


Table of Contents

Introduction

About this document

This document describes how to connect NISE50 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

Step 1: Prerequisites

You should have the following items ready before beginning the process:

Install Visual Studio 2015 and Tools

  • 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:

Step 2: Prepare your Device

First of all, you need to set up your device.

  1. Make Bootable USB with Windows 10 with following software
    • Windows 10 32 bit
    • WiNToBootic :
    • Flash.ffu here
  2. Use WintoBootic to make bootable USB
  3. When you finish this bootable Device, copy Flash.FFU to this USB
  4. Install Win 10 Core on NIS50
    • Disable "Security Boot"
    • Boot your computer with this USB(UEFI)
    • Select Windows 10 Setup (32ibit)
  5. When system display "Install" button on screen, Press Shift+F10 to open terminal and using following command
    • diskpart -> list disk(Confirm your device ID which you to deploy)

    • Enter exit (Leave diskpart)

    • Enter following command to start install Win 10 Core

      dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive0 /SkipPlatformCheck
      

Step 3: Build and Run the Sample

This section walks you through building, deploying and validating the IoT Client SDK on your device running Windows 10 IoT Core operating system.

## 3.1 Connect the Device
  • Connect the board to your network using an Ethernet cable. This step is required, as the sample depends on internet access.

  • Plug the device into your computer using a micro-USB cable.

## 3.2 Build the Samples
  • 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 (x86 or ARM, depending on your device) 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 name of your device. Make sure the "Use authentication" box is unchecked.

  • Build the solution.

## 3.3 Run and Validate the Samples
  • In Visual Studio, from Solution Explorer, right-click the UWPSample(Universal Windows) project, click Debug −> Start new instance to build and run the sample.

  • See Manage IoT Hub to learn how to observe the messages IoT Hub receives from the application.

3.3.2 Receive messages from IoT Hub

  • See Manage IoT Hub to learn how to send cloud-to-device messages to the application.