add DHCP workaround (disabled for now)

This commit is contained in:
proddy
2026-08-05 15:43:30 +02:00
parent 7212439f1b
commit 3a81c70018
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -539,6 +539,17 @@ void Network::startEthernet() {
return; return;
} }
/*
// The Tasmota SDK is built with CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=2, so the Ethernet MAC is derived as
// a locally-administered address from base+1 instead of the universal base+3 that Arduino Core 2 used.
// Seed the MAC table with the old value before the EMAC driver reads it, so DHCP reservations survive an upgrade.
uint8_t eth_mac[6];
if (esp_read_mac(eth_mac, ESP_MAC_BASE) == ESP_OK) {
eth_mac[5] += 3;
esp_iface_mac_addr_set(eth_mac, ESP_MAC_ETH);
}
*/
// reset power and add a delay as ETH doesn't not always start up correctly after a warm boot // reset power and add a delay as ETH doesn't not always start up correctly after a warm boot
if (eth_power_ != -1) { if (eth_power_ != -1) {
pinMode(eth_power_, OUTPUT); pinMode(eth_power_, OUTPUT);
+1
View File
@@ -20,6 +20,7 @@
#define EMSESP_NETWORK_H_ #define EMSESP_NETWORK_H_
#ifndef EMSESP_STANDALONE #ifndef EMSESP_STANDALONE
#include <esp_mac.h>
#include <esp_wifi.h> #include <esp_wifi.h>
#include <ETH.h> #include <ETH.h>
#include <WiFi.h> #include <WiFi.h>