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

mqtt_simple connect to AWS

I have an AWS account and I am comfortable with the AWS IOT operation in general. I have used it in the past. I am trying to get the sample mqtt_simple to connect to AWS IOT and be able to send packets and receive packets to the nRF9160dk board.

 I am not sure how to set up mqtt_simple parameters? I have created a thing and certificates. I have named the thing "nrf-IMEI" as recommended so it has the board ID in it. All I want to do is to be able to publish a packet to a topic on my AWS account and receive a packet from a topic in my AWS account. I have done this several times in the past with other systems so I am comfortable with AWS IOT operations and formats. I just do not understand how to get mqtt_simple to publish from my board to AWS and subscribe to messages from AWS.

Is this the correct program to use. It seems like all the pieces are there I just do not know how to use them.

I appreciate any help you can give, This is an essential requirement of our production system. right now we are using the pre-production system with a modified version of asset_tracker to send sensor data to the nRF Connect site. We need to be able to send sensor data to our AWS site.

  • Can anyone tell where to look for the client token object in received jobs. How do I tell if jobs are empty and if so why are they empty? is that fatal? If they are empty who is supposed to put data in them? I appreciate any help you can give. I am sure it is something simple I have not added or set correctly. It does send the Flip data JSON packet so a lot has to be working for that to go to my AWS account.

  • There is another problem with the V1.2.0 asset_tracker for AWS that is a show stopper. The Asset_tracker connects to AWS and sends the FLIP, device info, RSRP, and status information to our AWS site, This runs without a problem forever on any single board. We have seen no problem running for days at a time. I recently got a second board working and a colleague got a board working. We are all running the same code. When any one of the boards starts up and connects to AWS and tries to publish the other boards see a POLLHUP which resets the boards. These boards will then in turn reach the same connection point and reset the other boards. It is a death spiral.

    How can two or more AWS connections be able to disconnect the MQTT connection on different boards no matter if they are located in different states. The only common denominator is the AWS account. All boards are connecting to the same AWS account which is a requirement since lambda functions on that account are putting all the data from the various boards into dynamodb tables.  any thing I could do to fix this problem would be appreciated.

  • I forgot to mention that my two boards have two different sets of certificates.

  • Each board had the same AWS_IOT_CLIENT_ID_STATIC. I gave each board a unique ID and that seems to make it work. I will let both boards run overnight to see if that fixes the problem. but all looks good so far.

  • Sounds good, let me know if there are new issues that may pop up.
    Are there any pending questions left?

Related