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

Sample nRF9160: Azure IoT Hub

I created an Azure IOT Hub and simulated a X.509 device using C and device SDK for Azure.
No problems here.
Then I run sample nRF9160: Azure Iot Hub and receive the following error
Now I look for some guidance to troubleshot the mqtt_connect error.
 
First:
Can Nordic please clarify the certificate requirements mentioned on page Azure IoT Hub — nRF Connect SDK 1.3.99 documentation in more detail.
Does Baltimore CyperTrust Root certificate equate to file RootCA.pem?
Does Device certificate equate to file mydevice-public.pem?
Does Private key equate to file mydevice-private.pem?
Files under the ..\azure-iot-sdk-c\tools\CACertificates directory listed here:
Second:
How does one  best  investigates mqtt_connect errors ?
Parents
  • Hi Sabine, 

    In our docs about Azure we point to this link to get the certificates.

    In that page there is a link to "Managing test CA certificates for samples and tutorials" which has the scripts used and the explanations you are looking for.


    So the following is needed to get it to work with PowerShell-generated certs:

    • CA certificate: Baltimore CyberTrust Root certificate
    • Client certificate: <device name>-public.pem
    • Private key: <device name>-private.pem

    "RootCA.pem" has to be uploaded to the IoT Hub and verified.

    For bash-generated certs, then the following is needed:

    • CA certificate: Baltimore CyberTrust Root certificate
    • Client certificate: certs/new-device.cert.pem
    • Private key: private/new-device.key
    "certs/azure-iot-test-only.root.ca.cert.pem" has to be uploaded to IoT Hub and verified.


    Best regards,
    Martin L. 

Reply
  • Hi Sabine, 

    In our docs about Azure we point to this link to get the certificates.

    In that page there is a link to "Managing test CA certificates for samples and tutorials" which has the scripts used and the explanations you are looking for.


    So the following is needed to get it to work with PowerShell-generated certs:

    • CA certificate: Baltimore CyberTrust Root certificate
    • Client certificate: <device name>-public.pem
    • Private key: <device name>-private.pem

    "RootCA.pem" has to be uploaded to the IoT Hub and verified.

    For bash-generated certs, then the following is needed:

    • CA certificate: Baltimore CyberTrust Root certificate
    • Client certificate: certs/new-device.cert.pem
    • Private key: private/new-device.key
    "certs/azure-iot-test-only.root.ca.cert.pem" has to be uploaded to IoT Hub and verified.


    Best regards,
    Martin L. 

Children
Related