How to keep a DNS entry active

Aussie Susan
Posts: 45
Joined: Thu Aug 22, 2019 3:48 am

How to keep a DNS entry active

Postby Aussie Susan » Tue Sep 22, 2020 7:04 am

I have built a WiFi station (which has a WROVER MCU on board) using ESP-IDF V4.1 which calls the 'tcpip_adapter_set_hostname' within the WIFI_EVENT WIFI_EVENT_STA_START event handler and that seems to be working nicely as I can see the hostname in my home routers list of hostnames, IP address and MAC addresses.
I can then access the device remotely using the hostname.
However after a while (30+ minutes???) the entry in the router seems to be the same (there is a little green indicator next to it that goes off but all of the other information is the same) and the access by hostname stops. I can still access the device using the IP address.
Sometimes the 'light' comes back on and the access by hostname works again. (I am assuming that something is being reset/refreshed and that is probably something within my device but I don't know enough about these things to know what.)
I've set the DHCP server which is also in the router to always give my device the same static IP address but that may change in the future.
What do I need to do in my program to make sure that the hostname access stays active all the time?
Susan

Who is online

Users browsing this forum: No registered users and 384 guests