Connect to AWS demo project with TI CC3220SF-Launch XL

mbasile wrote on June 07, 2018:

Hello all,

I am trying run the “Connect to AWS” demo project for Amazon FreeRTOS on a Texas Instruments CC3220SF-LaunchXL board. I am following the directions linked below. When I run the code, the board connect to WiFI but I do not see any message show up on the IoT console test screen. Here is the terminal output from the board
terminal photo:https://postimg.cc/image/c8vze0j7f/
link:https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_ti.html

Unsure what to make of this output. Any help is greatly appreciated

Thanks,
Mike

Gaurav-Aggarwal-AWS wrote on June 08, 2018:

You are getting SL_ERROR_BSD_ESECCLOSED from SimpleLink which indicates some problem with the certificate/keys.

Thanks.

mbasile wrote on June 09, 2018:

Thanks for the reply!
I have followed the guide as far as formatting the certificates using the tool, generating the aws_clientcredential_keys.h file and placing into the project directory, so I would think my certificates are all good, but I will try this again just to be sure.

As for the policy attached to my certificate, I followed the instructions on the following page:
https://docs.aws.amazon.com/freertos/latest/userguide/freertos-prereqs.html
to create the policy and attach it to the certificate. The text of the policy is as follows:

,{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "iot:Connect",
      "Resource": "arn:aws:iot:a3ruens3d4f7zu.iot.us-east-2.amazonaws.com:495507409095:*"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Publish",
      "Resource": "arn:aws:iot:a3ruens3d4f7zu.iot.us-east-2.amazonaws.com:495507409095:*"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Subscribe",
      "Resource": "arn:aws:iot:a3ruens3d4f7zu.iot.us-east-2.amazonaws.com:495507409095:*"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Receive",
      "Resource": "arn:aws:iot:a3ruens3d4f7zu.iot.us-east-2.amazonaws.com:495507409095:*"
    }
  ]
},

Gaurav-Aggarwal-AWS wrote on June 10, 2018:

Assuming that you created your resources in us-east-2, would you please update your policy document to the following:


{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "iot:Connect",
      "Resource": "arn:aws:iot:us-east-2:495507409095:*"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Publish",
      "Resource": "arn:aws:iot:us-east-2:495507409095:*"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Subscribe",
      "Resource": "arn:aws:iot:us-east-2:495507409095:*"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Receive",
      "Resource": "arn:aws:iot:us-east-2:495507409095:*"
    }
  ]
}

mbasile wrote on June 11, 2018:

This did the trick. Thank you so much for your help!