0

I have to monitor properties.desired properties changes from SimulatedDevice app, if any change (in my case fwVersion change) in the properties.desired then immediately my SimulatedDevice should be notified and start download the firmware image.

Since I could not find a relevant sourcecode in C# to try it out pl suggest.

Nanda
  • 39
  • 4

1 Answers1

0

Assuming your SimulatedDevice is using the Microsoft.Azure.Devices.Client NuGet package to connect to your IoTHub, you can subscribe to the device twin updates. To subscribe, use the DeviceClient.SetDesiredPropertyUpdateCallbackAsync method.

You can find an official sample in this repository. The file where they subscribe to the twin updates is this one.

Matthijs van der Veer
  • 3,865
  • 2
  • 12
  • 22