Open amolchor20 opened 1 year ago
I think first of all you have to subscribe to the properties topic in order to get notifications about the update. Use function called AzureIoTHubClient_SubscribeProperties() after connecting to the IoT Hub.
Please look at sample aziotkit for ESP32.
vHandleWritableProperties is called for twin property updates.
Output should look as follows:
I (24569) MQTT: Packet received. ReceivedBytes=3470. I (24569) MQTT: De-serialized incoming PUBLISH packet: DeserializerResult=MQTTSuccess. I (24569) MQTT: State record updated. New state=MQTTPublishDone. I (24579) AZ IOT: $iothub/twin/PATCH/properties/desired/?$version=24 I (24599) sample_azureiotkit: Telemetry frequency set to once every 10 seconds. I (24619) AZ IOT: Successfully parsed properties
Thanks for reply !!
currently my board stm32u585 is connected with cellular board for internet connectivity. And I have integrated adu code from middleware. for device update the desired properties is changed when i deploy the update from Hub. but the changed desired property is not received on device side. Although the freeRTOS middleware code is using the Api shown in Image. Could you please guide me on regarding desired properties update?
Thanks in advance !!
Why I am not receiving the device twin notification, because of "AzureIoTHubClient_ProcessLoop" function.
If there is an update notification present from Azure IoT hub then the "AzureIoTHubClient_ProcessLoop" function gives device twin notification, when there is no notification from Azure IoT Hub then it will throw below error
and another error is
because of above two error I have removed the "AzureIoTHubClient_ProcessLoop" function from my code.
these two errors are reproduce constantly.
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful
I am using azure iot middleware on stm32u585 (B-U585I-IOT02A) board. I am able to send telemetry messages to IoT devices and also cloud to device. when I am changing the desired properties from IoT hub, how can I verify the desired properties are changed from device side?