Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Microsoft SDKs for IoT Hub Device Provisioning Service (DPS) help you build device and backend applications that provision IoT devices to one or more IoT hubs. The SDKs handle the underlying transport and security protocols between your devices or backend apps and DPS, freeing you to focus on application development. By using the SDKs, you get support for future updates to DPS, including security updates. This article describes the three categories of SDKs, lists the DPS SDKs published in popular languages, and provides links to SDK references, samples, and quickstarts.
Important
Certificate management in IoT Hub is in preview and is supported only in the following DPS Device SDKs: Embedded C (Bare metal, Free RTOS), C, and Python. IoT Hub SDKs don't support it. For more information, see the What is Certificate Management?
SDK categories
Three categories of software development kits (SDKs) work with DPS:
DPS device SDKs provide data plane operations for devices. Use the device SDK to provision a device through DPS.
DPS service SDKs provide data plane operations for backend apps. Use the service SDKs to create and manage individual enrollments and enrollment groups, and to query and manage device registration records.
DPS management SDKs provide control plane operations for backend apps. Use the management SDKs to create and manage DPS instances and metadata. For example, use them to create and manage DPS instances in your subscription, to upload and verify certificates with a DPS instance, or to create and manage authorization policies or allocation policies in a DPS instance.
The DPS SDKs help to provision devices to your IoT hubs. Microsoft also provides a set of SDKs to help you build device apps and backend apps that communicate directly with Azure IoT Hub. For example, to help your provisioned devices send telemetry to your IoT hub, and, optionally, to receive messages and job, method, or twin updates from your IoT hub. To learn more, see Azure IoT Hub SDKs.
Device SDKs
The DPS device SDKs enable your devices to register with DPS and receive their IoT hub assignment. Use the device SDKs to implement device-side provisioning with symmetric key, X.509 certificate, or TPM attestation. Platform device SDKs are available for devices that run a full operating system, and embedded device SDKs are available for resource-constrained and microcontroller-based devices.
Platform device SDKs
The DPS device SDKs provide implementations of the Register API and others that devices call to provision through DPS. The device SDKs can run on general MPU-based computing devices such as a PC, tablet, smartphone, or Raspberry Pi. The SDKs support development in C and in modern managed languages including in C#, Node.js, Python, and Java.
The following table lists the device SDKs available for each supported language.
| Platform | Package | Code repository | Samples | Quickstart | Reference |
|---|---|---|---|---|---|
| .NET | NuGet | GitHub | Samples | Quickstart | Reference |
| C | apt-get, MBED, Arduino IDE or iOS | GitHub | Samples | Quickstart | Reference |
| Java | Maven | GitHub | Samples | Quickstart | Reference |
| Node.js | npm | GitHub | Samples | Quickstart | Reference |
| Python | pip | GitHub | Samples | Quickstart | Reference |
Warning
The C SDK listed above is not suitable for embedded applications due to its memory management and threading model. For embedded devices, refer to the Embedded device SDKs.
Certificate management device SDKs (preview)
For SDKs that support Microsoft-backed X.509 certificate management in preview, use the following instructions and samples.
| Platform | Instructions | Sample |
|---|---|---|
| C | Instructions | Sample |
| Python | Instructions | Sample |
Embedded device SDKs
These SDKs were designed and created to run on devices with limited compute and memory resources and are implemented using the C language.
| RTOS | SDK | Source | Samples | Reference |
|---|---|---|---|---|
| Eclipse ThreadX | Azure RTOS Middleware | GitHub | Quickstarts | Reference |
| FreeRTOS | FreeRTOS Middleware | GitHub | Samples | Reference |
| Bare Metal | Azure SDK for Embedded C | GitHub | Samples | Reference |
Learn more about the device and embedded device SDKs in IoT SDKs.
Certificate management embedded device SDKs (preview)
For embedded SDKs that support Microsoft-backed X.509 certificate management in preview, use the following instructions and samples:
| RTOS | SDK | Instructions | Sample |
|---|---|---|---|
| FreeRTOS | FreeRTOS Middleware | Instructions | Sample |
| Bare Metal | Azure SDK for Embedded C | Instructions | Sample |
Service SDKs
The DPS service SDKs help you build backend applications to manage enrollments and registration records in DPS instances.
| Platform | Package | Code repository | Samples | Quickstart | Reference |
|---|---|---|---|---|---|
| .NET | NuGet | GitHub | Samples | Quickstart | Reference |
| Java | Maven | GitHub | Samples | Quickstart | Reference |
| Node.js | npm | GitHub | Samples | Quickstart | Reference |
Management SDKs
The DPS management SDKs help you build backend applications that manage the DPS instances and their metadata in your Azure subscription.
| Platform | Package | Code repository | Reference |
|---|---|---|---|
| .NET | NuGet | GitHub | Reference |
| Java | Maven | GitHub | Reference |
| Node.js | npm | GitHub | Reference |
| Python | pip | GitHub | Reference |
Next steps
The Device Provisioning Service documentation provides tutorials and additional samples that you can use to try out the SDKs and libraries.