This sample is based on the ESPRESSIF ESP32 sample from https://github.com/azure-samples/iot-middleware-freertos-samples
To use this sample with Device Provisioning Service (DPS) and x509 certificates, follow these steps:
-
Generate and update the certificates in DPS
Example of guideline to generate certificates: https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-x509-openssl
-
Create an individual enrollment in your DPS, using x509 authentication and the device certificate generated in step 1
-
Set the kconfig configuration in this sample
Run
idp.py menuconfig(similar to instructions in the base ESP32 sample)Disable
Use PnP in Azure SampleEnter your
device id(from DPS individual enrollment) intoAzure IoT Device IDSelect
X509 CertificatesinAzure IoT Authentication MethodEnter your device certificate (see instructions in the base ESP32 sample)
Enter your device private key (see instructions in the base ESP32 sample)
Enable
Enable Device Provisioning SampleEnter your DPS ID Scope
Enter your DPS individual enrollment device ID into
Azure Device Provisioning Service Registration ID -
Follow remaining steps in the base ESP32 sample to build, flash and monitor.