esp32 wired Ethernet and mDNS

Spooney
Posts: 7
Joined: Sun Jul 08, 2018 12:00 pm

esp32 wired Ethernet and mDNS

Postby Spooney » Tue Nov 06, 2018 10:41 am

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

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: esp32 wired Ethernet and mDNS

Postby ESP_morris » Tue Nov 06, 2018 11:54 am

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.

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: esp32 wired Ethernet and mDNS

Postby ESP_morris » Tue Nov 06, 2018 1:32 pm

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.

Spooney
Posts: 7
Joined: Sun Jul 08, 2018 12:00 pm

Re: esp32 wired Ethernet and mDNS

Postby Spooney » Tue Nov 06, 2018 1:47 pm

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

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: esp32 wired Ethernet and mDNS

Postby ESP_morris » Wed Nov 07, 2018 2:41 am

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.

Spooney
Posts: 7
Joined: Sun Jul 08, 2018 12:00 pm

Re: esp32 wired Ethernet and mDNS

Postby Spooney » Wed Nov 07, 2018 10:43 am

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

MattiaBerton
Posts: 36
Joined: Thu Aug 30, 2018 8:16 am

Re: esp32 wired Ethernet and mDNS

Postby MattiaBerton » Fri Jan 18, 2019 1:29 pm

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

Who is online

Users browsing this forum: asargent, Bing [Bot], Gaston1980, Google [Bot] and 165 guests