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 Download, Install and Apply for your device or installer. You can provide your own implementation of the Content Handler APIs in src/content_handlers
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.