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

Errors while making a connection to AWS IoT cloud

Hello,

I have a project based on Cloud Client v1.4.0 using AWS IoT cloud as the backend. I have made some changes in the code so that I disconnect after sending some values to the cloud and reconnect after 10 minutes or so and make a connection again. But after doing this for sometime I am getting the following errors while making a new connection to AWS IoT:

Can someone please help me identify what these error means and how can I resolve them?

Thank you.

Regards,

Haris Ahmed

  • Hi,

    Why do you want to disconnect, only to reconnect 10 minutes later?

    AWS IoT Hub has a default keepalive value of 20 minutes, so you can stay connected without sending anything for those 10 minutes.

    And, both when disconnecting and reconnecting, you will have to signal the server. This means that you will use extra power, and extra bytes of your data plan.

    Instead of disconnecting, I would've just used PSM or eDRX.

    When getaddrinfo returns -11, it means you have to check errno for the real error code.

    The other errors are just a consequence of the getaddrinfo error.

    How is your logic for closing the connection? Do you also disconnect from the LTE network?

    Can you print out the whole +CEREG notification (in the network registration status line in the log)?

    Are you using LTE-M or NB-IoT? Which modem firmware version are you using? And what NCS version?

    Best regards,

    Didrik

Related