UWP App and the Azure IoT Hub


Want to play with the Azure IoT Hub but don't have an IoT device? Jon Gallant shows off a way you can do so with a simple UWP App, making it look pretty darn easy...

How to Get Started with Azure IoT Hub and a UWP App

Here’s a quick post on how to get setup with Azure IoT Hub with a UWP App.  These steps and code taken from Olivier Bloch’s Build Talk:

1. Create a new Azure IoT Hub – Free Tier – in Azure Portal http://portal.azure.com


2. Install the Azure IoT Hub Device Explorer Windows app – you’ll use this to view and send messages that come and go through the IoT Hub.


3. In VS2015, create a new UWP app


4. Add a connection to your IoT Hub via References –> Add Connected Service


Open MainPage.xml.cs and add this code – receive and send messages to the IoT Hub vai the AzureIoTHub helper.


Compile and Run the VS Project.


Open the Data tab in Device Explorer and click the Monitor button

When you want to send a message to the device, go to the Device Explorer, Messages To Devices tab, enter your message and click Send.


That should get you going with a very basic connection between a UWP and IoT Hub.

[Click through to read the whole thing]

The Discussion

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.