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