Azure IOT Hub - Configure your devices from a back-end service Tutorial C# Example MISSING

OJB1 31 Reputation points

I'm trying to work my way through the Azure IOT Hubs documentation and have come to a grinding halt as the tutorial for "Configure your devices from a back-end service" does not provide a solution for .NET, they only provide a tutorial that requires using Node.Js for the simulated devices.

Can someone please advise where I get a C# equivalent guide to the above?

The tutorial in question is here:

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
255 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
745 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
164 questions
No comments
{count} votes

Accepted answer
  1. Sander van de Velde 16,046 Reputation points MVP

    Hello @OJB1 ,

    it seems you want to explore Cloud-To-Device (C2D) communication.

    Azure IoT supports both D2C and C2D communication out-of-the-box with the Device SDKs for different development languages.

    If you are interested in C#, check out this blog post.

    There you found examples of both Desired properties and Direct methods, two popular but different ways to communicate.

    Desired properties are values set in the Device Twin, a document in the IoT Hub where devices check for changes if they connect to the cloud. So this is great for not-always-connected devices.

    The Direct Method needs a live connection. The advantage is that you can expect an actual answer from the device or a time-out.

    It also demonstrated commands. These are 'function calls' like direct methods but the device can pick them up later if they are not connected yet. Hence, no result is returned.

    If you are interested in more training, please check out the MS Learn IoT-related modules and learning paths.

1 additional answer

Sort by: Oldest
  1. OJB1 31 Reputation points

    Hi SandervandeVelde42,

    Thank you for your reply, I will read your article with great interest.

    I have successfully set the desired properties for a device twin from the service side, but what I'm really after is example code in how to read those desired properties from the IOT Device end.

    Hopefully your article covers this but if not, would you have nay other suggestions?

    I don't understand why Microsoft do not provide a C# example in their documentation, is there any logical reason for this? many thanks