[!div class="op_single_selector"]
Azure IoT Hub is a fully managed service that enables reliable and secure bi-directional communications between millions of devices and a solution back end. Previous tutorials (Get started with IoT Hub and Send Cloud-to-Device messages with IoT Hub) illustrate the basic device-to-cloud and cloud-to-device messaging functionality of IoT Hub. IoT Hub also gives you the ability to invoke non-durable methods on devices from the cloud. Methods represent a request-reply interaction with a device similar to an HTTP call in that they succeed or fail immediately (after a user-specified timeout) to let the user know the status of the call. Invoke a direct method on a device describes methods in more detail and offers guidance about when to use methods versus cloud-to-device messages.
This tutorial shows you how to:
- Use the Azure portal to create an IoT hub and create a device identity in your IoT hub.
- Create a simulated device app that has a direct method which can be called by the cloud.
- Create a console app that calls a direct method in the simulated device app through your IoT hub.
Note
At this time, direct methods are accessible only from devices that connect to IoT Hub using the MQTT protocol. Please refer to the MQTT support article for instructions on how to convert existing device app to use MQTT.