This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC3220SF-LAUNCHXL: Issue with MQTT WAS example

Part Number: CC3220SF-LAUNCHXL

Tool/software: Code Composer Studio

Hello

Currently I am getting the following error.

I have tried  solutions given for this issue in E2E community, but none of them really helped.

 

I don’t have much confidence in the way I have copy pasted the certificates in to CCS. If you have any documents that details the steps/things to take care with certificates, please share.

Basically, I have in total four certificates downloaded from AWS.

I am not sure, which one corresponds to root_ca_pem, client_cert_pem and client_private_key_pem in cert.h in CCS. And, do I need to change the certificates everytime if I make any changes in the AWS side?

 

Regards,

Reshmi

 

  • I am sorry, there was a type in the title. It is actually MQTT AWS publish_subscribe example in CCS.
  • Hi Reshmi,

    Have you already referred to the the docs within the plugin?

    C:\ti\aws_cc3220_1_10_00_07\docs

    The bottom of the QuickStart guide goes into the procedure of pulling the certificates from the .pem file into the certs.h file.

    It should be similar to the following form in CCS:

    const char root_ca_pem[] =
    "ABCD1234hxS39SFVT43STY#fdsiEIOFiu2=y!8cZxzXMh+12wDCy21h+8vJsDh4\
    <...>
    rzcuMZt6oPq6YJMtP3kSaik+bWyzRkdMOPGVL4TiPLAuyAZP1NXl";

    hope this helps,

    Kevin

  • I have followed exactly the same steps, but didn't help.

  • I'm seeing similar issues, so have a few questions that might help us understand.

    Please confirm the specific certificates to use are:

    • CA root certificate string - VeriSign-Class 3-Public-Primary-Certification-Authority-G5.pem
    • client certificate string - 7b9e18xxxx-certificate.pem
    • client (private) key string - 7b9e18xxxx-private.pem

    I believe you should not need to change these unless you use a different thing.

    Also, I see in other posts several other suggestions:

    • a patch to network_sl.c:  is this required when using the playground certs?
    • a change to the policy:  what should the default policy be?

  • I was trying to print the length of certificates while flashing them using the following code.

    Display_printf(AWSIOT_display, 0, 0, "Flashing certificate file ..., len = %d", bufflen);

     

    I have observed that the number of characters actually  flashed in each certificate is lesser than the length shown in editor.

    For example, for private key the length of certificate flashed is 1588, whereas in notepad++ the length was shown as 1613.

  • Hi Hendrix,

    1)I have confirmed I am using the right certificate files.
    2)I changed policy to the below one as suggested in one of the forums.
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Action": [
    "iot:*"
    ],
    "Resource": [
    "*"
    ]
    }
    ]
    }

    3) Patch to network_sl.c : I got some errors while doing this. Also the code looks like the patch is already there in CCSv7.2.0.
    Please confirm if I have to do this.
    Also, can you please elaborate on playground certs?

    Here is a sample of root CA I have used.
    const char root_ca_pem[] = "MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB\
    yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\
    ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp\
    U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW\
    ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0\
    aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL\
    MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW\
    ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln\
    biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUadfjDVQQDEzxWZXJp\
    U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y\
    aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1\
    nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex\
    t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz\
    SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG\
    BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+\
    rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/\
    NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E\
    BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH\
    BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy\
    aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv\
    MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE\
    p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y\
    5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK\
    WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ\
    4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N\
    hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq";
  • Hi Reshmi,

    Which CC3220 SDK are you using. The AWS plugin has been validated with SDK version 1.40.01.00 at this time.

    Please try this with the previous SDK version.

    Best,
    Kevin

  • Hi Reshmi.  I was able to get the subscribe_publish_sample example to run.  The two main issues I had were:

    Changes to network_sl.c were required to use the root CA from the certificate playground. Otherwise it would not connect. See https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/602961?tisearch=e2e-sitesearch&keymatch=aws%20cert

    Changes to my policy were required to get it to subscribe, publish, and read.  The instructions on the policy are not clear, and you need to make sure all actions are covered.  This is detailed in https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/598009?tisearch=e2e-sitesearch&keymatch=cc3220%20AWS