Page 1 of 1

esp32 wired Ethernet and mDNS

Posted: Tue Nov 06, 2018 10:41 am
by Spooney
Hi All

I am trying to get mDNS working with the esp32 on the wired Ethernet connection.

I have done a small program to test based on a wired Ethernet example and the example mDNS code. I have done it so that I can choose (at build time) either wifi or Ethernet. The mDNS works fine with Wifi connection and I can see the devices on my local network. But wired I get no results.

Looking with Wireshark I can see that with the wired connection, the ESP32 is sending out the correct mDNS packets but the it does not respond to any replies. It does not respond to a search with Bonjour browser either. Both of these work fine with the WiFi connection.

It is the latest ESP-IDF downloaded from git-hub and I have tested with both DHCP enabled and with a static IP address.

Any one come across this before?

Thanks

Mark

Re: esp32 wired Ethernet and mDNS

Posted: Tue Nov 06, 2018 11:54 am
by ESP_morris
Does it seem like esp32 cannot receive any multicast frames?
We have just fix one bug related to multicast with Ethernet. And the patch will be soon pushed to github.

Re: esp32 wired Ethernet and mDNS

Posted: Tue Nov 06, 2018 1:32 pm
by ESP_morris
Hi Spooney
I have just tested the mDNS with Ethernet, it works fine now, after we solved the multicast issue with Ethernet.
Thanks for your interest in ESP32.

Re: esp32 wired Ethernet and mDNS

Posted: Tue Nov 06, 2018 1:47 pm
by Spooney
Hi Morris

Excellent! that is fast and thanks for that. Is the patch on github yet and if not any idea when or how I can get it?

Spooney

Re: esp32 wired Ethernet and mDNS

Posted: Wed Nov 07, 2018 2:41 am
by ESP_morris
Not yet. Here is the tip to get over the issue:
1. Open the file : components/ethernet/emac_dev.c
2. Find the function called: emac_mac_init
3. add one line in the end: REG_SET_BIT(EMAC_GMACFF_REG, EMAC_PAM);
Have a try,good luck.

Re: esp32 wired Ethernet and mDNS

Posted: Wed Nov 07, 2018 10:43 am
by Spooney
Hi Morris


Thanks but unfortunately that did not work

I now have


void emac_mac_init(void)
{
REG_SET_BIT(EMAC_GMACCONFIG_REG, EMAC_EMACDUPLEX);
REG_SET_BIT(EMAC_GMACCONFIG_REG, EMAC_EMACMII);
REG_CLR_BIT(EMAC_GMACCONFIG_REG, EMAC_EMACFESPEED);
REG_SET_BIT(EMAC_GMACFF_REG, EMAC_PAM);
}


The version of ESP-IDF I am using is the version off github and was downloaded about 2 weeks ago from the main page, the dev board is from Ollimex with a LAN8720 equivalent chip on board. All of the 'normal' network sfuff works UDP / TCP etc just not the multicast mDNS receive.

Might make sense to wait for you guys to put the patch on git hub

Do have have any idea on when it will be posted to git?


Anyway many thanks, great support!

Spooney

Re: esp32 wired Ethernet and mDNS

Posted: Fri Jan 18, 2019 1:29 pm
by MattiaBerton
Hello,
I have the same problem of Spooney, with Wifi I can connect with mDNS, while I can't with wired Ethernet. If I try to ping the name given to the mDNS, it does not respond.
Moreover, the IP which is assigned to the ESP32 board in the pinging request is not what has been assigned to the board from DHCP: I have the "execution of Ping to esp32-mdns.local [54.72.52.58] ..." while my board has been assigned to 192.168.178.42.

I already have the REG_SET_BIT(EMAC_GMACFF_REG, EMAC_PAM) instruction in my emac_mac_init function.

What could be the problem?
Thank you,
Mattia