Customization in OTA flow between IOT device and IOT HUB service

Choubey, Gaurav 6 Reputation points
2021-11-18T12:35:54.027+00:00

Hi Everyone,

I am working on device update or OTA implementation with azure. Azure has device update feature with IOT hub.
I am utilizing same service for my task.

I want to customized the IOT device update code for OTA operation.
Normally IOT HUB Service initiate the all action(Download, Install, Apply) and based on request device will be acted, once requested action done ,device will update the state to IOT hub service and go ideal state where wait for next action..

I want to add one additional layer or confirmation layer for each action[Download, Install, Apply)] , mean when IOT hub Service request for any action,
device will received as twin properties update. Instead executing the respective process(e.g. downloading the Firmware), device will wait for confirmation/ approval (which is customization part to be implemented ) from external/manual resource.
Once confirmation/approval received, device will resume with flow and execute the respective process( device will start downloading the firmware and update response to IOT HUB Service).

My Question based on above scenario as follow

  1. Does it possible to implement above follow with current IOT HUB device update implementation from azure.
  2. What will happen if device not reply to IOT hub service for requested action ? Does it discard the whole OTA process ?
  3. What is time period of waiting for IOT hub service when it request for any action and waiting for reply ? My target to make wait for 30 days and if no approval or confirmation receive the, reply back to IOT hub service with fail/Discard response.
  4. Can I make 30 days waiting period for IOT hub service API response ?

Please answer me as soon as possible. As most of development depend on it.

Regards,
Gaurav Choubey

Azure IoT Plug and Play
Azure IoT Plug and Play
A Microsoft technology based on an open modeling language that enables developers to connect internet of things (IoT) devices to the cloud without having to write any code.
18 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,205 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
223 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,671 Reputation points Microsoft Employee
    2021-11-18T16:16:47.367+00:00

    Hello @Choubey, Gaurav ,
    The Device Update Agent (installed on your device) will be responsible to set the "update status" as started succeeded , failed or idle.

    150668-image.png

    As per your scenario and since Device Update Agent is open-sourced (https://github.com/Azure/iot-hub-device-update) you can customize the Interface and Platform Layers to achieve it. IoT Hub should not be impacted by 30 days or more waiting period for the update to be completed.

    Update after conversation with Product Team

    Client has no internal time limit on each phase of workflow (download, install, apply). If client exits without reporting back a final state to service, it will remain in "In-Progress" on the portal. The client should go back to Idle state so that it can report either failure or success, rather than exit uncleanly without reporting final state when Approval is denied.

    We don’t have any kind of timeout on the service side. There’s no limit on how long the service waits for a device to respond. You can change the agent implementation however the device won’t be counted as “in the deployment” until it sends the “InProgress” response.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.