Skip to content

aws_iot_shadow_connect(&mqttClient, &scp) always returning "-28" #1913

Open
@pranoyd-nd

Description

@pranoyd-nd

Hi,

We are experiencing an issue while trying to connect to AWSIOT shadow where the return code is always "-28" (MQTT_REQUEST_TIMEOUT_ERROR)

The below are some key observations:

  • After re-creating the certificates (certificate.pem.crt & private.pem.key) the connection was successful.

  • The older certificates were not corrupted. There was no parse error for the certificates.
    The below errors were never seen:
    /** Returned when the device certificate is invalid /
    NETWORK_X509_DEVICE_CRT_PARSE_ERROR = -20,
    /
    * Returned when the private key failed to parse */
    NETWORK_PK_PRIVATE_KEY_PARSE_ERROR = -21,

  • The internet connectivity was fine.

  • It was never able to connect to the shadow with the certificates. And as soon as the certificates are re-generated/downloaded, it was able to connect.

Version: https://github.com/aws/aws-iot-device-sdk-embedded-C/releases/tag/v2.1.1

Kindly help to understand what is the issue with the certificates.
As the MQTT_REQUEST_TIMEOUT_ERROR may temporarily come due to actual connection timeout, we are not considering this return code (-28) as a trigger to reset the certificate and private key.
Kindly suggest how we can differentiate this behaviour with genuine timeouts so that we can effectively handle this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions