How to clear DNS cache?

Hi all,

Our application connects to a server in internet. Its adress is given as a name (not a numeric address), and it worked nicely for a few years.
But we’ve changed the internet provider, also changing the server’s IP address, and some of our devices still connect to the old IP. It’s been over 3 weeks now, when the DNS record only had a 1-week validity. Pretty much all of the internet got the new address within a few hours.
The issue seems to be a DNS cache inside the WIP library. As many have noted, there’s no direct API for the DNS susystem. We’ve found that the cache can be cleared by module’s reboot, but that’s not a very useful finding. We do use wip_netExit() after each connection, but it does not clear the cache.

Has anyone figured out how to clear the WIP library’s DNS cache without rebooting the module?


Please share the response of ATI9. Can you please share the application what you are using?

Also, from your explanation, it seems that you have a server and you are creating your own TCP client towards that server. If you change your service provider, then the DNS of the new service provider should be used. You are telling that the modules are still trying to connect to the older IP. What exactly is this IP? Is this the IP of the TCP server or simply your server where you are trying to connect? I believe you are hardcoding this IP in the application to be used by the TCP client. Please confirm my understating.


Please share the response of ATI9
I can only access the devices via SMS, so the length of the response is limited, and there may be a typo or 2.
ATI9 response:
“DWL”,“V10c05”,"",“Sierra Wireless”,62640,“051513 10:45”,“a0836b50”,“00010000”
“FW”,“FW_752_34_3.SL6087G”,“R7.52.0.201306260837.SL6087”,“Sierra Wireless”,673436,“062613 08:37”,“89796368”,“001d0000”
“MODEM”,1.3.36",“201306260837.SL6087”,“Sierra Wireless”,1713240,“062613 08:37”,“85a2fb97”,“00020000”
“OAT”,"","","",709728,"110514 15:50…

I guess it continues with something like this (response from a module I’m using here):
“OAT”,"","","",725184,“121614 18:52”,“86a13b22”,“002a0000”

it seems that you have a server
Yes we have a TCP server in the internet. The application uses its NAME since the beginning, never used an IP address.
We changed service provider (and IP) of that server. Customers are using their own SIM cards. We set DNS validity to 1 minute in anticipation of the move, and it seemed to work nicely throughout the internet (all of reported the new IP within 15 minutes).

What exactly is this IP
There is only one TCP server. The server’s name is . The new IP is The old IP was but we never used it anywhere.
Everything else is TCP clients: the Sierra Wireless modules with our application.

You are telling that the modules are still trying to connect to the older IP
Yes, to my best knowledge, this process should reproduce the issue:

  • connect to a server by NAME
  • disconnect
  • change server’s IP adress
  • wait, make sure module does not restart
  • connect again by NAME
  • the connection will be to the old IP, even after many weeks and many attempts
    The issue is fixed when we set the module (via SMS command) to connect to the new numeric IP address, or reset the module.

I believe you are hardcoding this IP
We “fix” the issue by hardcoding the NEW IP address (temporarily). We didn’t use the IP address before.

Can you please share the application what you are using
Our application is a result of several years of continuous development, but I’m pretty sure that memory management and such things are done correctly, so the issue lies in the WIP library, not in our application.
As this is not a critical issue to us, I can’t spend a week making a new demo project for this bug.
I thought the issue is pretty clear and the answer might be simple.

I hope now it’s clearer.