We're trying to connect to our Azure Iot Hub using the Azure Iot Hub library provided by Nrf Connect Sdk 2.6.0 (without DPS). We're currently using the evaluation board to test this. The error we get once we try to connect using the azure_iot_hub sample is this:
[00:00:04.760,253] <inf> azure_iot_hub_sample: Azure IoT Hub library initialized [00:00:04.760,284] <inf> azure_iot_hub_sample: AZURE_IOT_HUB_EVT_CONNECTING +CGEV: IPV6 0 [00:00:06.821,380] <inf> azure_iot_hub_sample: Connection request sent to IoT Hub [00:00:07.057,739] <err> azure_iot_hub: Connection was rejected with return code 5 [00:00:07.057,739] <wrn> azure_iot_hub: Is the device certificate valid? [00:00:07.057,769] <inf> azure_iot_hub_sample: AZURE_IOT_HUB_EVT_CONNECTION_FAILED [00:00:07.057,769] <inf> azure_iot_hub_sample: Error code received from IoT Hub: 5 [00:00:07.058,929] <wrn> azure_iot_hub: DISCONNECT, result: -111 [00:00:07.058,959] <inf> azure_iot_hub_sample: AZURE_IOT_HUB_EVT_DISCONNECTED [00:00:07.058,959] <err> mqtt_helper: Cloud MQTT input error: -111
So it seems like the issue is with the device certificates. However, I followed the documentation multiple times 1:1 so it's weird. Here is what I've tried so far:
- Follow the documentation at: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/libraries/networking/azure_iot_hub.html both at 2.5.0 and 2.6.0
- Try to connect to azure through our code and your azure_iot_hub sample
- Use nrfcredstore to add the certificates to the device
- Use Cellular Monitor from Nrf Connect Sdk for Desktop to add the certificates to the device
- Follow Microsoft's guide which I've found from the following thread: https://devzone.nordicsemi.com/f/nordic-q-a/106640/api-registration-of-certification-for-azure-iot-hub-dps
- Use Baltimore instead of DigiCert for the root certificate
- Switch between the first and secondary security tags (and change their numbers in general)
Here is a pastebin for the certification process (using nrfcredstore): https://pastebin.com/gx4Ahrcd
Any help would be appreciated