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.

Compiler/CC3220SF-LAUNCHXL: AWS IoT Example Demo cannot connect to Wifi, but out-of-box demo can

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF

Tool/software: TI C/C++ Compiler

Hello,

I am trying to use my CC3220SF LaunchPad with the AWS IoT plugin.

I am using Simplelink SDK v2.4 and AWS Plugin v2.2 (What the aws release notes reccomend).

I am trying to run the AWS TI Pub/Sub example demo for CCS.

http://software-dl.ti.com/targetcontent/AWS/2_20_00_02/exports/aws_cc32xx_2_20_00_02/docs/aws/AWS_Quick_Start_Guide.html

While debugging, the only serial output I get is 'Started the AWS IoT Example Application.'.

I cannot find anyone else who has this problem. It is surely a WiFi connectivity problem, as the next output would happen if wifi was configured correctly.

After debugging and looking through the code, it seems that my device is not connecting to and getting and IP from my Wifi. It gets stuck in some loop waiting for wifi connection or provisioning or something.

I am using an iPhone 6 hotspot for my wifi. This should work however, because I have used it successfully in the CC3220SF Out-Of-Box demo.

I am thinking this is because the way the code specifies the wifi access point in the aws demo, is slightly different than the code used by provisioning over AP mode in the out-of-box demo.

I have specified my network credentials in the wificonfig.h file. Specifying the SSID and Security Key, while also changing the encryption type to WPA2 using this line. (iPhone 6  hotspot has WPA2)

I changed this 

#define SECURITY_TYPE SL_WLAN_SEC_TYPE_WPA

to this

#define SECURITY_TYPE SL_WLAN_SEC_TYPE_WPA_WPA2

Nonetheless the aws example is not connecting and does not output anything else to the console or continue with the AWS Demo.

Does anyone have any advice or insight as to how to get around this?

How can I correctly specify my hotspot for use with this demo project?

Thank you!

  • Hi,

    Modifying the wificonfig.h file should be all that you need to do in order to get the AWS examples connected to your hotspot.

    Have you used the debugger to check and where the device ends up getting blocked? There are a few steps in addition to connecting to your phone hotspot before the CC32XX prints out its IP address. For one, there is the SNTP sequence in order to set the device time that sometimes times out. 

    If you can verify where you are getting blocked that would be useful. Also, please ensure you have flashed the latest servicepack onto the CC3220.

    Regards,

    Michael

  • Hi,

    I assume that you have resolved your issue since I have not heard back from you. If not, feel free to post a response to this thread, or open a new thread regarding this issue.

    Regards,
    Michael

  • Hello Michael,

    Sorry for the delay.

    Upon use of the debugger I have determined that my code gets stuck in this loop.

    Void Idle_loop(UArg arg1, UArg arg2)
    {
    /* INFINITE_LOOP.LOCAL */
    while (TRUE) {
    Idle_run();
    }
    }

    idle_run() is called infinitely. I don't understand how it gets here in the first place.

    Any thoughts on how to proceed from here?

    Thanks for your help!

  • Hi,

    The idle loop is used by the RTOS automatically when all of your threads are blocked. Thus, you should look into what is causing your threads to get blocked.

    If you step through awsThreadFxn(), where does it get stuck? Is it Network_startup()? If it is in there, does it get blocked at initWiFi(), or is it at startSNTP()?

    Regards,
    Michael