Azure IoT C SDK Connection not authenticated, reason is IOTHUB_CLIENT_CONNECTION_NO_NETWORK

50 Views Asked by At

I'm trying to connect to my IoT hub using an nRF52840. I've loaded the Azure IoT C SDK version 1.2.7 onto it to send telemetry to the cloud. I'm using the SAS authorization to connect. My device also has the DigiCert Baltimore Root, Microsoft RSA Root Certificate Authority 2017, DigiCert Global Root G2, Microsoft ECC Root Certificate Authority 2017, and DigiCert Global Root G3 certificates for authentication. I'm able to connect my device to a WIFI Hotspot and attempt to send telemetry. Sometimes, telemetry is sent with no issue to my iotHub, which I verify by using IoT Explorer to view the telemetry. However, most of the time the device attempts to send telemetry and instead receives an NSAPI error of -3016 Connection Lost, which shows up as connection not authenticated with the reason being IOTHUB_CLIENT_CONNECTION_NO_NETWORK. I'm unsure of what's causing this but I believe it's the IoT hub shutting the connection to my device for an unknown reason.

I've tried running the latest version of the telemetry sample (1.11.0) on my windows laptop. It builds and connects to my IoT Hub without issue. I then connect my laptop to the WIFI hotspot and rerun the telemetry sample, which connects to my IoT Hub without issue. If I then use the nRF device to send telemetry using the WIFI Hotspot, it is able to send telemetry without issue as well.

0

There are 0 best solutions below