Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How do I start mDNS service over an Ethernet interface on Arduino-ESP32 #7213

Unanswered
avillacis asked this question in Q&A
Discussion options

I am currently experimenting on connecting an Ethernet chipset (W5500) to an ESP32-S2 board using SPI. So far, DHCP runs over the interface, connection is established, and I can view a HTTP server formerly visible through the WiFi STA and AP interfaces. However, my starting project was supposed to enable mDNS using the ESPmDNS class, which I see is a wrapper over the mdns APIs from Espressif. My project correctly announced _http._tcp availability over the STA interface, but the problem is that it is not doing so over the Ethernet interface. Why? Do I have to do some extra step to enable mDNS over Ethernet?

I have tried disassociating the STA interface from the local access point, then rebooting. In this scenario, the project sets up the AP interface only, and now the Ethernet interface. And it still does not announce the mDNS service.

You must be logged in to vote

Replies: 3 comments

Comment options

The ethernet library is explained a little bit more in this pull request.

It contains this picture, the main point is that the Ethernet used by the Arduino is not the same Ethernet used by the Espressif IDF, base class. Meaning that you probably are not establishing a connection with the underlying Espressif IDF Ethernet Driver but the external Arduino Library.

This is the case because the W5500 is currently only supported when using the external connection, which uses a completely different interface. Mainly because the Arduino library existed before the base Espressif IDF had support for the W5500.

image


There are few recommendations I could make, the easiest would probably be waiting until the pull request might be merged or if you do not require the SPI, you can copy this method into your code and use it to initialise a Ethernet connection with the base Espressif IDF.

Be aware this will cause unexpected errors if you use the SPI? with Arduio(SD Card, External Display, Ethernet), because theEspressif IDFandArduinouse their ownSPIdriver. Which results in the SPI not working if both theEspressif IDFandArduinoeach attempt to send data over theSPI` driver.

You must be logged in to vote
0 replies
Comment options

I should have been more explicit in my scenario.

I am not using the Ethernet class that comes with Arduino-ESP32, precisely because it does not hook W5500 support.

Also, I am not currently using any external Arduino Library to manage the W5500. I used one in the past to check that the W5500 wiring was actually working, but then I implemented my own initialization for the W5500. My initialization is supposed to do pretty much what the merge request is doing, based around the calls to esp_eth_mac_new_w5500() and esp_eth_phy_new_w5500(). Both of these methods are exposed in the ESP32 libraries shipped in the Arduino-ESP32 2.0.6 library. I end the initialization with calls to esp_netif_attach() and esp_eth_start(), just as in the merge request.

However, despite doing all that, and (presumably) adding the interface to the list of interfaces known by ESP-IDF, MDNS does not work through the interface, contrary to what I expected.

You must be logged in to vote
0 replies
Comment options

I seem to have found an issue that tries to do the same thing just with barebones ESP-IDF components. It seems to additionaly link to this example, which might be useful as well.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /