This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Azure IoT Hub Linux Certificates

Hello,

I'm using the Azure Iot Hub example on a Thingy91 and am having issues with certs generated from a Linux environment. Everything works just fine with and without DPS when the certs are generated from Windows using the linked tutorial (https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-x509-scripts) on the project page.

However, we need to use DPS and the bash script in the long term, but I cannot get the device to connect with that method:

1. Generate root/intermediate certs with ./certGen.sh create_root_and_intermediate

2. Upload root cert to Azure IoT Hub and DPS

3. Verify in both places

4. Link IoT Hub instance to DPS

5. Generate device cert with ./certGen.sh create_device_certificate test_device

6. Provision Baltimore CyberTrust root certificate, device certificate, and device private key to the device

7. Configure application to use DPS with the correct IO Scope, as well as the correct device name and security tag

8. Update device firmware

This results in a couple of error messages, "DPS registration request not successful", and "Code was 401, while 202 was expected".

I got the same result using the default RSA algorithm in the bash script, as well as with ECC by modifying the script to use the same algorithm as the powershell script. Can you please provide some insight on why this might not be working or what that error code means?

Thanks,

Nick

Related