How does the Azure IoT ADU service determine when an update succeeded?

George Beckstein 1 Reputation point
2021-09-16T04:28:53.197+00:00

Hi all,

I'm working on a custom ADU agent implementation running on Mbed-OS. I am using the embedded ADU agent samples for Azure RTOS as a reference, but the documentation leaves some questions unanswered.

It would be ideal if the "Device Update for IoT Hub and IoT Plug and Play" documentation actually covered what the ADU service expects from the client after each action has been sent. This would make the "plug and play" infrastructure a lot more usable outside of official demos and example applications.

I'm at the point where I have my device appearing in Azure ADU, I can deploy updates to it, the updates are downloaded, and the device reflashes itself with the update.

Once the device reboots, it reports the new installed update ID with the appropriate version to its digital twin. The Azure ADU service then reissues an "APPLY" action... which reboots the device again, and this continues forever.

I cannot find any clear documentation that mentions how the ADU service determines if a device should be categorized as "in progress", "done", etc.

How can I make the ADU service understand that the device updated successfully? I'm reporting the installed update ID as it appears in the manifest, I am setting the client state to idle with success response codes. What is the secret criteria ADU uses to determine if an update succeeded?

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
323 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,031 Reputation points
    2021-09-16T22:59:03.957+00:00

    Hello @George Beckstein I hope you have already came across the below Interface document?

    ADU Core Interface
    The 'ADUCoreInterface' interface is used to send update actions and metadata to devices and receive update status from devices. The 'ADU Core' interface is split into two Object properties.

    The expected component name in your model is "azureDeviceUpdateAgent" when implementing this interface. Learn more about Azure IoT Plug and Play Components

    Agent Metadata
    Agent Metadata contains fields that the device or Device Update agent uses to send information and status to Device Update services.

    132884-image.png

    State

    It is the status reported by the Device Update Agent after receiving an action from the Device Update Service. The state is reported in response to an Action (see Actions below) sent to the Device Update Agent from the Device Update Service. See the overview workflow for requests that flow between the Device Update Service and the Device Update Agent.

    132885-image.png

    Please comment in the below section for further help in this matter.

    0 comments No comments