Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.24 KB

File metadata and controls

64 lines (43 loc) · 2.24 KB
platform Windows 10
device HF-W/IoT
language c

Run a simple C sample on HF-W/IoT device running Windows 10


Table of Contents

# Introduction

About this document

This document describes how to connect HF-W/IoT device running Windows 10 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:

Step 2: Prepare your Device

  • None.

Step 3: Build SDK and Run the sample

  • Start a new instance of Visual Studio 2015. Open the azure_iot_sdks.sln solution in the cmake folder in your home directory.

  • In Visual Studio, in Solution Explorer, navigate to simplesample_amqp project, open the simplesample_amqp.c file.

  • Locate the following code in the file:

    static const char* connectionString = "[device connection string]";
    
  • Replace the above placeholder with device connection string you obtained in Step 1 and save the changes.

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

  • In Solution Explorer, right-click the simplesample_amqp 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.

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