Here are some cases where you might want to modify the Device Update Agent code to fit your scenarios and devices.
You may want to implement your own Azure IoT PnP interfaces in addition to the ones necessary for Device Update for IoT Hub. We recommend looking at how the ADU Core Interface and Device Information interfaces are implemented in src/agent/adu_core_interface. Specifically adu_core_interface.h and adu_core_interface.c.
You may want to implement your own version of IsInstalled, Download, Install and Apply for your device or installer. You can provide your own implementation of the Step Handler APIs in src/extensions/step_handlers
In addition to customizing step handlers, you can customize:
- How update steps in the update metadata are orchestrated/processed,
- How update payloads and detached v4 update manifest files are downloaded,
- How hardware sub-module "components" are enumerated and queried,
- How update payloads can be pre-processed to reconstitute payloads (particularly large ones) without downloading them (e.g. Delta Updating).
For comprehensive docs on all extensibility points, refer to the Device Update Agent Extensibility points doc.
If you want to use the Device Update Agent on an OS or platform that isn't supported out-of-the box, you can provide your own Platform Layer implementation. You may also need to port the Azure IoT C SDK to your device.
- Follow these steps to get the Device Update sample application running on other boards
- Implement the Azure IoT device SDK for C, see an example for Arduino here.
- Implement the IoT Hub Plug and Play Device Client Sample.
- Once you have a IoT Hub Plug and Play enabled device, implement the 'ADU core' interfaces for your application by following this source code.
- Once you get a basic IoT Hub Plug and Play Device Client sample up and running on the device, look at our current Device Update Agent implementation to implement over-the-air ‘Update Actions’ using the Device Update Service.