Hello everyone,
I'm experiencing an issue with the AWS IoT Sample on my nRF device . Although I've provisioned the necessary certificates and configured my project to connect to AWS IoT Core, I'm now encountering error -116 during MQTT connection.
Configuration Details (Redacted):
-
AWS IoT Endpoint:
Configured in CONFIG_AWS_IOT_BROKER_HOST_NAME (e.g., "your-endpoint.iot.region.amazonaws.com"). -
Static Client ID:
Configured in CONFIG_AWS_IOT_CLIENT_ID_STATIC (e.g., "YourThingID"). -
Static IP:
Configured in CONFIG_MQTT_HELPER_STATIC_IP_ADDRESS (e.g., "XX.XX.XX.XX"). (IP address resolved from AWS Endpoint) -
Security Tag:
CONFIG_MQTT_HELPER_SEC_TAG is correctly set. -
Connect Timeout:
CONFIG_AWS_IOT_CONNECT_TIMEOUT_SECONDS is set to a higher value (e.g., 1200). -
Certificates:
Certificates are provisioned correctly (verified via AT command output).
Observed Behavior:
Despite these settings, the logs still show:
[00:01:28.023,437] <inf> aws_iot_sample: Network connectivity established
[00:01:33.023,529] <inf> aws_iot_sample: Connecting to AWS IoT
[00:01:56.530,639] <err> mqtt_helper: mqtt_connect, error: -116
[00:01:56.530,670] <err> aws_iot: mqtt_helper_connect, error: -116
[00:01:56.530,700] <err> aws_iot_sample: aws_iot_connect, error: -116
[00:01:56.530,700] <err> aws_iot_sample: Fatal error! Rebooting the device.
What I’ve Tried:
- Verified network connectivity.
- Confirmed certificates are provisioned correctly.
- Increased the connection timeout.
- Configured a static IP in the MQTT helper (to bypass DNS issues).
Questions:
- Is using a static IP in this manner expected to work reliably with AWS IoT Core?
- Are there any recommended debugging steps or configuration adjustments for resolving error -116?
Any help or suggestions would be greatly appreciated. Thanks in advance!