AWS_IoT mqtt_connect,error: -111

Hello,

I am trying to program and use the AWS IoT example to send data to the amazon webserver.  I worked through this post (https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/software-and-protocols/posts/connecting-to-aws-cloud-services-using-the-nrf9160) with success up until loading the modified AWS IoT sample. 

The example in this post wouldn't build correctly, so I switched to the AWS IoT example and connected with the LTE Link monitor where I received the code:

AWS_IOT_EVT_CONNECTING


RRC mode: Connected


E: mqtt_connect, error: -111


AWS_IOT_EVT_CONNECTING


RRC mode: Idle


Next connection retry in 30 seconds

The newlib is active for this sample which means that error -111 means connection refused.

I found a few other posts that had gotten this error from running out of data on their sim card, but I checked this with the nRF cloud website and it was registered and had data.

Another potential area was the certificates, as I was a bit unsure of the instructions in the blog for this part.  The CA certificate and private keys were both straightforward, but I think amazon AWS has updated their certificates and there was no certificate labeled client certificate, only device certificate.  I assumed that these were the same and used the device certificate here but I was not sure if that was correct, and if it wasn't what else I would use.  

I've double checked the prj config file and updated/double checked the broker host/sec tag/device name which I suspected was an issue but could not find any errors.

Do you have any other suggestions for things that may have gone wrong or things to try?

Thanks for the help!

Parents Reply Children
  • Hello, here are the logs:

    I am using NCS V1.6.0.

    My 9160DK has the firmware 1.3.0 from the 2021-06-25_7a076c22 download.

    Also I should note that I have successfully connected with asset tracker to the nRF cloud website, the LTE device/SiM are verified on the site, and asset tracker was able to update a simulated flip by toggling switch 1 on the 9160DK so this seems to point to an issue with the AWS connection.

    I also tried checking the certificates by adding CONFIG_AT_CMD_RESPONSE_MAX_LEN=2560 to the prj.config file and then running the AT%CMNG=1 command and got this response: 

Related