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.

CC3200 + AWS connection failed

Other Parts Discussed in Thread: UNIFLASH, CC3200

Hi,

I am using the AWS SDK with the CC3200 launchpad, I am able to compile and flash the code using the uniflash to the target( CC3200 launchpad ), but every time when I run the board not every time it is connecting to the aws, at least I need to try 4 to 5 times nby resetting the system then only it is able to connect to the aws server after that it works fine, but again in next restart it is taking 4-5 time to connect to Internet. I ran the aws sdk code in Linux environment with the same credentials and found every time that is working fine.

Note: here I am getting this message before it is getting failed, "startNTP: NTP host cannot be resolved!"


Please suggest what is going wrong here.

Thank you.

regards,

Zafar

  • Moving to TI-RTOS Forum

    Regards,
    Gigi Joseph.
  • Hi Zafar,
    The AWS SDK examples are not robust networking applications. They're simple examples to illustrate the use of the AWS MQTT APIs and were written by Amazon not Texas Instruments. We only provided the board support code to enable the Amazon examples run on the TI CC3200. What AWS example are you running?
    One tip is that you need to power-cycle the board to fully reset the network processor. The network processor can be left in a state by a previous run that could make the current run fail until you fully reset it by power-cycling. Also the error message you're seeing is coming from the startNTP function call in startsntp.c. The startNTP function can fail if the network processor is in a bad state so you can rework the startNTP function to return a success/fail. In NetWiFi_init check the returned value from startNTP(), if it's a fail then call sl_Stop to shut down the network processor and return an error from NetWiFi_init to your main task. With this your main task can check the result of NetWiFi_init and retry if it failed. You can define a number of times to retry before giving up.

    Let me know if this helps,
    Moses
  • Hi Moses,

    Thanks for your help,

    I added the retry code with a retry time of 5 times, Now I can see that it is working every time.

    Any way I was using the Publish Subscribe sample code from the AWS.


    Thanks a lot.