Azure IoT C SDK library
The Azure Sphere team bases the C SDK on the Azure IoT C SDK. The Azure Sphere SDK includes a subset of the Azure IoT C SDK library. You can use this API to connect your application to an Azure IoT Hub. The entire supported API surface of the library is defined in the Azure Sphere SDK header files.
API reference: Azure IoT device SDK for C
Header file location: Sysroots\API set\usr\include\azureiot (Windows OS) folder or Sysroots/API set/usr/include/azureiot (Linux OS) folder of the Azure Sphere SDK installation directory at c:\Program Files.
Azure IoT C SDK library features
Azure Sphere is configured with these settings for constrained devices:
- Access to the lower layer (LL) programming model only; no access to the convenience layer.
- Use of the MQTT protocol.
- No support for blob storage.
- Support of web sockets.
Note
Due to security and size constraints, the Azure Sphere subset of the Azure IoT C SDK library omits support for HTTP and AQMP.
Azure IoT C SDK library functions
IoTHubDeviceClient_LL_CreateWithAzureSphereDeviceAuthProvisioning
IoTHubDeviceClient_LL_CreateWithAzureSphereFromDeviceAuth
AzureIoT_OverrideAzureSphereAuthDPS
AzureIoT_OverrideAzureSphereAuthIoTHub
Known issue
- When using the Azure IoT C SDK to connect to IoT Hub or IoT Central using the Device Provisioning Service, you must implement connection retry logic using your application. If you rely on internal retry logic, you may see an authentication error.