-
I'm attempting to use wiznet w5500 ethernet controller with ESP32. All went well (with a lot of help from here +trial and error) except that I need a MAC address. I assume that lots of ESP32 devices with Ethernet will be on my network for my project so avoiding address collision is crucial. I read from ESP-IDF document that an ESP32 has 4 universally administered MACs, with Ethernet MAC as base MAC + 3: So I'd like to know if there is a function that maps the esp_read_mac() call so I can obtain a universally administered address for Ethernet. I know a hack might be to establish a wifi interface and use the .config('mac') to get its MAC address, which should be the base address. Then use that address + 3. If there is a more proper way, without having to set up a wifi station, that would be preferred. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
A bit of info I got:
So if there is a read_eFuse() function implemented in ESP32 port, that would work too.
One more thing that's bothering me, I can't set the dhcp_hostname on the Ethernet interface! "dhcp_hostname" only exists in WLAN interface but not LAN. Also the network.hostname() only sets that for WLAN. The host name of Ethernet interface is stuck at "espressif". I'm trying to establish more stable connections to mission-critical devices with Ethernet. I have lots of ESP32 on the same network identified by their hostnames when they are on WiFi. So this is not a cosmetic thing for me. Is there any quick way to fix this in code? I know how to compile mp firmware now :D Thanks! |
Beta Was this translation helpful? Give feedback.
Re. the hostname, it appears to not be supported on the micropython LAN driver for esp32. It might be as simple as adding:
just before the end of
lan_active()
orget_lan()
inports/esp32/network_lan.c
. But, I don't currently have an esp32 device with a lan device to test (I hope to get one very soon).