An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
Hello @West Coast John ,
The error nx_azure_iot_hub_client_connect() returning 0x00010085 typically indicates an authentication or connection validation issue. Based on Azure IoT Hub connectivity guidance, I'd recommend reviewing the following areas:
- Verify the device clock
- SAS token authentication is time-sensitive. If the device clock is significantly out of sync with UTC, authentication can fail.
- Ensure the device is successfully synchronizing time using SNTP/NTP and verify the RTC time after synchronization.
- Validate device credentials
- Confirm that you're using the device Primary Key (Base64 encoded) and not the device connection string.
- Verify the IoT Hub hostname and Device ID exactly match the values configured in Azure IoT Hub.
- If SAS tokens are generated on the device, validate the expiry time, resource URI, and HMAC-SHA256 signature generation.
- Check device status in IoT Hub
- In the Azure portal, navigate to IoT Hub > IoT Devices and confirm the device is enabled.
- Verify that the device identity being used by the application exists and has not been disabled.
- Review TLS configuration
- Azure IoT Hub requires TLS 1.2.
- Ensure the correct root CA certificates are present and that the TLS configuration supports the required cipher suites.
- Test network connectivity
- Verify that the device can reach the IoT Hub endpoint over port 8883 (MQTT) or the protocol being used.
- If possible, test connectivity from another client on the same network to rule out firewall, proxy, or routing restrictions.
- Enable SDK tracing
- Enable detailed SDK logging to capture MQTT and TLS handshake information.
- Additional traces can often identify whether the failure occurs during authentication, certificate validation, or network connection establishment.
- Review IoT Hub networking settings
- If IoT Hub is configured with IP filtering, private endpoints, or custom network restrictions, ensure the device network is allowed to connect.
Helpful references:
- IoT Hub error troubleshooting
- IoT Hub connectivity troubleshooting
- Shared Access Signature (SAS) authentication
- TLS support in Azure IoT Hub
- IoT Hub IP filtering
If you still face problems, share additional details and we’ll assist further.
If these steps resolve your issue, please mark this answer as Accepted so others can easily find the solution.
Thankyou!