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-LAUNCHXL: Huge time wait during DNS resolutions when no internet for WAP.

Part Number: CC3220SF-LAUNCHXL


Hi support,

I'm using the following modules for my application.

Amazon FreeRTOS -> 202107 

FreeRTOS Kernel V10.4.3

AWS IoT Over-the-air Update v3.0.0

SL Host Driver Version 2.0.1.27

Service Pack Version sp_3.14.0.0_2.0.0.0_2.2.0.7.bin

 

Our product is battery operated device.

 

I was trying to establish MQTT connection with AWS IoT once the device got the profile (got connected to WAP). When establishing/creating the mqtt connection, there was not internet for the WAP, so was unable to establish connection as it will not be able to resolve the hostname and returns NETWORK ERROR. During this time while establishing connection, it is waiting for approx. 20 secs to resolve the DNS (please refer the API calls below). These 20 secs wait is a very huge time and consume more energy in a battery-operated device/system. Since in my application I am retrying to establish the connection once more, so the total delay will be 40 secs to resolve the DNS and return the response during the internet off.

_i16 sl_NetAppDnsGetHostByName(_i8 * pHostName,const  _u16 NameLen, _u32*  OutIpAddr,const _u8 Family );   (This function is taking 20 secs+ to return when internet is not available with WAP)

So here are my two questions: -

  1. Is there any possibility to reduce the 20 sec time it takes to resolve the DNS to lesser time during Internet off scenario. If yes, how can we change it and will the change in the delay time affect the functioning of the NWP.
  2. Is there any way to check that internet is available or not for the WAP before resolving the DNS, so that the resolved function is not called.

 

Thanks and regards,

Sai Jnaneswar