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.

CC3220SF: TIDM-1020: Smart Config Fail?

Part Number: CC3220SF

Hi,

Follow up question on the related post. I was able to flash the bin file following the getting started guide. My hardware is just CC3220SF LP + BOOSTXL-SENSORS. I disabled anything not needed at wifi_thermostat_app.h.

I try Smart Config using SimpleLink Starter Pro. I get this error message below.

"Application cannot configure the selected device. Either you have selected a non-SimpleLink device or you have selected a SimpleLink device which supports only legacy provisioning sequence. Please choose another SimpleLink device".

How do I solve this problem.

-kel

  • Hi Kel,

    To ensure that the smartconfig provisioning is the problem and not something else in the system, have you tried disabling provisioning and simply connecting to a hard-coded Wi-Fi network?

    To do so, go to wifi_thermostat_app.h and disable APSC_PROVISIONING and BLE_PROVISIONING by setting those defines to 0. Then, define your static AP parameters using the SSID_NAME, SECURITY_TYPE, and SECURITY_KEY defines. If you do so, are you able to run the thermostat example as expected?

    Regards,

    Michael

  • Hi Michael,

    My hardware is just CC3220SF LP and I set the wifi_thermostat_app.h to this below. I also set my WiFi SSID_NAME, SECURITY_TYPE, and SECURITY_KEY.

    #define NETWORK_IF          (1) // Enables network interface task
    #define CONTROL             (1) // Enables control task
    #define APSC_PROVISIONING   (0) // Enables AP Provisioning and TI SmartConfig
    #define BLE_PROVISIONING    (0) // Enables BLE Provisioning if using CC2640R2F as SNP
    #define OTA                 (0) // Enables OTA software update state machine
    #define MQTT                (1) // Enables MQTT client for receiving messages from the cloud
    #define TOUCH               (0) // Enables resistive touch functionality
    #define SENSORS             (1) // Enables reading sensors when using BOOSTXL-SENSORS
    #define THERMOSTAT          (0) // Enables thermostat state and screen render

    Then using Alexa App I go to my skill Manage Smart Home Devices->Devices->Discover. I am not able to discover the CC3220SF Thermostat.

    I also speak my Amazon Echo Dot "Alexa set thermostat to 28". It replied "Sorry i did not find a device named thermostat"

    -kel

  • Hi Michael,

    Checking the Tera Term output I am able to connect to my WiFi network. But there is a problem connecting to AWS. Any ideas what could cause this problem. I followed the guide as is. 

    ERROR: runAWSClient L#283
    Shadow Connection Error (-13)

    **** Starting control thread loop ****
    [MQTT Thread] MQTT Client library initialized successfully
    [Main Thread] Start all threads
    [Network Interface] Device came up in Station mode
    [Network Interface] Device came up in Station mode

    *************************************************

    CC3220 Wi-Fi Thermostat Example Ver: 2.0

    *************************************************

    CHIP: 0x30000019
    MAC: 2.0.0.0
    PHY: 2.2.0.0
    NWP: 3.0.1.4
    ROM: 0
    HOST: 3.0.1.51
    MAC address: 04:a3:16:45:a6:b7

    *************************************************
    [Network Thread] Profile does not exist
    [Network Thread] Using hard-coded profile for connection.
    [Network Interface] Device came up in Station mode
    [WLAN EVENT] STA Connected to the AP: jef wifi , BSSID: 18:c5:1:4d:80:5c
    [NETAPP EVENT] IP Acquired: IP=192.168.254.100 , Gateway=192.168.254.254
    [Network Thread] Device has connected to jef wifi

    [Network Thread] Setting time zone to -360 (in minutes)
    [Network Thread] Error getting time = -202
    [Network Thread] Failed to set RTC!

    AWS IoT SDK Version(dev) 3.0.1-

    Shadow Init


    Shadow Connect


    ERROR: runAWSClient L#283
    Shadow Connection Error (-13)


    [MQTT Thread] Connection to broker failed, Error code: -13
    [MQTT Thread] MQTT Client not idle, has state 2
    [MQTT Thread] MQTT Client Handle deleted
    [MQTT Thread] MQTT Client library initialized successfully

    -kel

  • Hi Kel,

    I would double-check the certificates that you are using with AWS in your certs.h file to ensure that they are formatted correctly. Also, I would double-check the root CA cert you are providing and making sure that it matches the endpoint you are using. See the posts in the thread here for more details:

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/789112/2919312#2919312

    Regards,

    Michael

  • Hi Michael,

    I double checked the certificates at certs.h and is okay. How do I know that root ca matches with the endpoint. From the document guide page 9 says use "Verisign Class 3 root CA certificate", and there is just 1 link to get it.

    endpoint

    xxxxxxxxxxxxxx-ats.iot.us-east-1.amazonaws.com

    root ca

    -----BEGIN CERTIFICATE-----
    MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjN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BAUwAwEB/zAOBgNVHQ8BAf8E
    BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
    BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
    aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
    MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
    p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
    5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
    WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
    4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
    hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
    -----END CERTIFICATE-----

    -kel

  • Hi Michael,

    I checked Shadow Connection Error (-13) is "NETWORK_DISCONNECTED_ERROR". What could cause this. The Tera Term output shows connecting to my wifi network.

    I see at AWS IOT Console successful connection after I get the Error -13.

    -kel

  • Hi Kel,

    Since you are using an ATS-enabled endpoint, you will need to use the Starfield Class 2 Certificate Authority Certificate. I have that certificate formatted as needed for use as the root_ca_pem[] in my post here:

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/789112/2937041#2937041

    If you copy that into your certs.h, reflash your CC3220 to ensure that all previous certs are removed, and then try again do you still get the same error?

    Regards,
    Michael

  • Hi Michael,

    I delete certificates, then create a new ones. After that I attach my policy to my new certificates. I activate the certificates. I update the certs.h with the new certificates and also use your Starfield Class 2 Certificate Authority Certificate for root ca. But, I get the same error -13

    I checked my wifi and the authentication is WPA2-PSK. Same with what is set at SECURITY_TYPE.

    Anyway I will try again at my original region Asia (Tokyo). 

    -kel

  • Hi Kel,

    Looking at some of the previous logs that you provided, something that seems odd is that you get an error when setting the device time. That functions works off of the clocksync SNTP library, and should work as long as the network you are using has internet connectivity.

    Have you tried other Wi-Fi networks, or tested a more basic CC3220 example on your current network to ensure that you don't have connectivity issues with your current AP?

    Regards,

    Michael

  • Hi Michael,

    Before trying the wifi thermostat example program, I was able to connect several times to my wifi network using oob example program. But, I used smart config to connect to wifi network. Anyway I will try other example programs such as network terminal.

    -kel

  • Hi Michael,

    I updated the service pack and now seems it is able to connect to AWS. But, when I say to Echo Dot "Alexa set thermostat temperature to 28", it replied "Sorry I didn't find a device named thermostat"

    **** Starting control thread loop ****
    [MQTT Thread] MQTT Client library initialized successfully
    [Main Thread] Start all threads
    [Network Interface] Device came up in Station mode
    [Network Interface] Device came up in Station mode

    *************************************************

    CC3220 Wi-Fi Thermostat Example Ver: 2.0

    *************************************************

    CHIP: 0x30000019
    MAC: 2.0.0.0
    PHY: 2.2.0.6
    NWP: 3.11.0.6
    ROM: 0
    HOST: 3.0.1.51
    MAC address: 04:a3:16:45:a6:b7

    *************************************************
    [Network Thread] Profile does not exist
    [Network Thread] Using hard-coded profile for connection.
    [Network Interface] Device came up in Station mode
    [WLAN EVENT] STA Connected to the AP: jefwifi , BSSID: 18:c5:1:4d:80:5c
    [NETAPP EVENT] IP Acquired: IP=192.168.254.100 , Gateway=192.168.254.254
    [Network Thread] Device has connected to jefwifi

    [Network Thread] Setting time zone to -360 (in minutes)
    [Network Thread] Local time = Fri Sep 27 22:05:41 2019

    [Network Thread] Device time is: Day 27, Mon 9, Year 2019, Hour 22, Min 5, Sec 40
    Flashing certificate file ...
    Successfully wrote file /cert/ca.pem to flash

    Flashing certificate file ...
    Successfully wrote file /cert/cert.pem to flash

    Flashing certificate file ...
    Successfully wrote file /cert/key.pem to flash


    AWS IoT SDK Version(dev) 3.0.1-

    Shadow Init


    Shadow Connect

  • Hi Kel,

    Good to hear that your device can connect to AWS IoT.

    Have you linked your alexa skill to your alexa account by following steps 16-22 of section 3.2.2.3 of the TI design guide? Did the skill linking work? Was the thermostat detected and added to your account?

    As for the Alexa skill not working, the cause of the issue is probably your lambda function. The discovery functionality doesn't rely on AWS IoT at all, as the lambda function is hardcoded to always return the same dummy Smart Thermostat object for ease of demo. The "Sorry I didn't find a device named thermostat" response is generally due to Alexa not finding a thermostat associated with your account. I suggest you ensure that your lambda function is setup and configured correctly. It may also be helpful to go through the cloudwatch logs associated with your Alexa requests to see if there are any errors there.

    Regards,

    Michael

  • HI Michael,

    I have to do other projects. I will mark this post as resolved. I will just create a new post and link to this post, If I have not resolved the problem by then.

    -kel