Page 1 of 1

mDNS does not work with ethernet

Posted: Mon Sep 23, 2019 3:57 pm
by JPMJPM
Hi,

mDNS does not work with ethernet.

I am using IDF version v3.0-dev-899-g3a271a4a-dirty.

Code: Select all

mdns_server_t * mdns = NULL;
esp_err_t err = mdns_init(TCPIP_ADAPTER_IF_ETH, &mdns);
if (err) {
	printf("MDNS Init failed: %d\n", err);
	return;
}
mdns_set_hostname(mdns, "hostname");
mdns_set_instance(mdns, "ESP32");
"ping hostname" does not work.

Regards.

Re: mDNS does not work with ethernet

Posted: Wed Sep 25, 2019 12:18 pm
by JPMJPM
I have tested with IDF 3.3 version and "ping hostname" works but network scanner apps
like Windows "Advanced IP scanner" and Android "Fing" do not display the hostname.

Code: Select all

esp_err_t err = mdns_init();
if (err) {
	printf("MDNS Init failed: %d\n", err);
}
mdns_hostname_set("hostname");
mdns_instance_name_set("ESP32");
Any help ?