-
Notifications
You must be signed in to change notification settings - Fork 7.7k
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments
-
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
.
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 the
Espressif IDFand
Arduinouse their own
SPIdriver. Which results in the SPI not working if both the
Espressif IDFand
Arduinoeach attempt to send data over the
SPI` driver.
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.