Take a look at dependencies before you get started. You can build the Device Update agent as a standlone solution or integrate it in your existing application or solution.
- Dependencies
- As a standalone solution
- Integrate the Device Update agent in your existing application or solution
Take a look at dependancies before you get started. You can build the Device Update agent as a standlone solution or integrate it in your existing application or solution.
- Dependencies
- As a standalone solution
- Integrate the Device Update agent in your existing application or solution
- Azure IoT C SDK
- Delivery Optimization SDK
Use the Azure IoT C SDK to connect to IoT Hub and call Azure IoT Plug and Play APIs.
The Delivery Optimization SDK SDK provides a robust way for the client to download an update.
Use the scripts/install-deps.sh Linux shell script for a convenient way to install the dependencies of the Device Update for IoT Hub agent for most use cases.
Note: You may be prompted for sudo password or GitHub username and password
when running install-deps.sh. If your GitHub account has two factor auth
enabled, use a personal access token (PAT) as the password.
To install all dependencies run:
./scripts/install-deps.sh -aNote:: --use-ssh can be used to clone dependencies from the Git repo using SSH instead of https.
To install only the dependencies necessary for the agent:
./scripts/install-deps.sh --install-aduc-deps --install-packagesIf you want to install dependencies for a different distro other than Ubuntu 18.04 (the default option), use option -d, for example --deps-distro ubuntu2004. (Installing DO dependencies using
bootstrap script in do-client)
install-deps.sh also provides several options for installing individual
dependencies. To see the usage info:
./scripts/install-deps.sh -hThe Device Update for IoT Hub reference agent code utilizes CMake for building. An example build script is provided at scripts/build.sh.
To build the reference agent integrated with Delivery Optimization for
downloads but still mocks the Install and Apply actions:
./scripts/build.sh -c -p linuxTo see additional build options with build.sh:
build.sh -hAlternatively, you can build using CMake directly. Set the required product values for ADUC_DEVICEINFO_MANUFACTURER and ADUC_DEVICEINFO_MODEL in the top-level CMakeLists.txt before building. Optional CMake values can be found there as well.
mkdir -p build && pushd build
cmake ..
cmake --build .
popd > /dev/nullor using Ninja
mkdir -p build && pushd build
cmake -G Ninja ..
ninja
popd > /dev/nullTo install the Device Update Agent after building:
sudo cmake --build out --target installor using Ninja
pushd out > /dev/null
sudo ninja install
popd > /dev/nullNote If the Device Update Agent was built as a daemon, the install targets will install and register the Device Update Agent as a daemon.
Run Device Update Agent by following these instructions
Before integrating the Device Update agent in your existing application or solution review the below concepts.
- Learn how the Device Update service will communicate with the device client using IoT Hub Plug and Play properties to orchestrate over-the-air update actions from here.
- Understand the update manifest to be able to write code to respond to update actions from your client.
- Understand how to implement 'ADU Core' interface for the Device Update service to communicate with your client on the Device.
- Create an IoT Hub C-SDK Plug and Play client: Your application needs to support IoT Hub Plug and Play as shown in this example to be used by Device Update for over-the-air updating.
- Once you have a IoT Hub Plug and Play enabled device, implement the 'ADU Core' interfaces for your application, see reference code here.
- Review the below Device Update agent implementation and source code so that you can modify your application to replicate the same behaviors:
4.The result reported from your application should be in this format so that the Device Update service can work with your application. Learn more about plug and play format, and Device Update agent workflow.



