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

mqtt_connect fails with error -95 aws_fota

Hi !

I am working on aws_fota, with a nrf9160 dk, sdk 1.3.0. When I try to connect in mqtt, I get my IPv4 address I get the following message: ERROR - mqtt_connect -95.
When I try to debug myself, I notice that my error appears on line 97 :     ret = connect(client->transport.tls.sock, client->broker, peer_addr_size); 
of the mqtt_transport_socket_tls.c file within its mqtt_client_tls_connect () function.

could you help me ? thanks in advance
Parents Reply
  • That should not be the problem, as I did not modify it either and successfully established a connection. 

    However, I managed to get the -95 error by using the wrong certificates (as you did previously), so I just want to ensure that your certificates are correct:

    CLOUD_CLIENT_PRIVATE_KEY contains the <unique_id>-private.pem
    CLOUD_CLIENT_PUBLIC_CERTIFICATE contains the  <unique_id>-certificate.pem
    CLOUD_CA_CERTIFICATE contains AmazonRootCA1.pem

    Is this your current certificates.h configuration? 

    You have probably followed the readme for the sample, but make sure that every step is correct. 

    Best regards
    Carl Richard
Children
Related