Can't get or set hostname on netif
Posted: Fri Oct 06, 2023 8:40 am
Hi,
I'm trying to set the hostname for the ethernet interface.
But `esp_netif_set_hostname()` always returns `ESP_ERR_ESP_NETIF_IF_NOT_READY`.
`esp_netif_get_hostname()` also always only returns `ESP_ERR_ESP_NETIF_IF_NOT_READY`.
I've checked the source code of these functions and they look like:
`LWIP_NETIF_HOSTNAME` is defined as '0', so the useful code is removed.
How and where can I make sure that `LWIP_NETIF_HOSTNAME` is properly defined?
I'm using ESP-IDF 4.4.
Thanks in advance.
Kind regards,
Remco Poelstra
I'm trying to set the hostname for the ethernet interface.
But `esp_netif_set_hostname()` always returns `ESP_ERR_ESP_NETIF_IF_NOT_READY`.
`esp_netif_get_hostname()` also always only returns `ESP_ERR_ESP_NETIF_IF_NOT_READY`.
I've checked the source code of these functions and they look like:
Code: Select all
#if LWIP_NETIF_HOSTNAME
//Useful code
#else
return ESP_ERR_ESP_NETIF_IF_NOT_READY;
#endif
How and where can I make sure that `LWIP_NETIF_HOSTNAME` is properly defined?
I'm using ESP-IDF 4.4.
Thanks in advance.
Kind regards,
Remco Poelstra