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/CC3220MODA: How to check whether the module is connected to the internet

Genius 3100 points
Part Number: CC3220MODA


Tool/software: TI C/C++ Compiler

Team,

What is the safest option to check whether there is internet connection available in CC3220 module ?

1) I have tried implementing PING request to 8.8.8.8 (Google DNS), however that did not work correctly. Though this works initially, after a reconnection the PING request keeps failing even when internet connection is present. 

2) As the next option, I have tried is to resolve www.google.com using sl_NetAppDnsGetHostByName to return an IP address. This also gives inconsistent result when the WiFi is connected and the internet is disabled. At times, ever thought the internet is unavailable, sl_NetAppDnsGetHostByName returns an IP address (may be due to some DNS cache).

Can someone please evaluate these cases and help us understand on such behaviour ? Is there a better and easy option to check for internet ? If so, please post some examples.

Regards,

Zac