platform | device | language |
---|---|---|
Windows 10 Enterprise LTSC |
RCO-3211 Rugged Edge Computer |
csharp |
Run a simple Csharp sample on RCO-3211 Rugged Edge Computer device running Windows 10 Enterprise LTSC
- Introduction
- Step 1: Prerequisites
- Step 2: Prepare your Device
- Step 3: Build and Run the Sample
- Next Steps
About this document
This document describes how to connect RCO-3211 Rugged Edge Computer device running Windows 10 Enterprise LTSC 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
You should have the following items ready before beginning the process:
- Prepare your development environment
- Setup your IoT hub
- Provision your device and get its credentials
- RCO-3211 Rugged Edge Computer device.
- After powering up your RCO-3211 Rugged Edge Computer device, be sure that it has established a network connection whether it is through ethernet, Wi-Fi, or cellular. For more information, please download the device's User's Manual.
-
Download the Azure IoT SDK and the sample programs and save them to your local repository.
-
Open a device console (command prompt or a powershell window) and change to your local SDK azure-iot-sdk-csharp directory.
-
Add the Iot Hub device connection string on your device as an environment variable:
setx IOTHUB_DEVICE_CONN_STRING <yourDeviceConnectionString>
-
Run the following command to build the SDK:
build.cmd -config Release
-
From the device console, run the sample using following command:
If HTTP protocol:
cd iothub\device\samples\DeviceClientHttpSample\bin\Debug\netcoreapp2.0 dotnet DeviceClientHttpSample.dll
If MQTT protocol:
cd iothub\device\samples\DeviceClientMqttSample\bin\Debug\netcoreapp2.0 dotnet DeviceClientMqttSample.dll
If AMQP protocol:
cd iothub\device\samples\DeviceClientAmqpSample\bin\Debug\netcoreapp2.0 dotnet DeviceClientAmqpSample.dll
-
Use the DeviceExplorer utility to observe the messages IoT Hub receives from the Device Client Sample application.
-
Refer "Monitor device-to-cloud events" in DeviceExplorer Usage document to see the data your device is sending.
-
Refer "Send cloud-to-device messages" in DeviceExplorer Usage document for instructions on sending messages to device.
You have now learned how to run a sample application that collects sensor data and sends it to your IoT hub. To explore how to store, analyze and visualize the data from this application in Azure using a variety of different services, please click on the following lessons:
- Manage cloud device messaging with iothub-explorer
- Save IoT Hub messages to Azure data storage
- Use Power BI to visualize real-time sensor data from Azure IoT Hub
- Use Azure Web Apps to visualize real-time sensor data from Azure IoT Hub
- Weather forecast using the sensor data from your IoT hub in Azure Machine Learning
- Remote monitoring and notifications with Logic Apps