esp_eth_set_mac does nothing. Can't change ESP's MAC Address
Posted: Wed Nov 24, 2021 3:23 pm
Hello.
I'm trying to set the MAC of the ETH interface the same as the WiFi interface using the following code:
This prints the right MAC, which is the same as the WiFi's MAC (7c-9e-bd-30-2d-a8), but using arp -a in cmd or looking in the router's device list gives me the original ETH MAC: 7c-9e-bd-30-2d-ab
How do I properly change the ETH MAC Address ?
I have an ESP32-EVB with the following MACs:
WiFi Mac: 7c-9e-bd-30-2d-a8
ETH Mac: 7c-9e-bd-30-2d-ab
I am using PlatformioIDE with PlatformIO Core, version 5.2.3
I'm trying to set the MAC of the ETH interface the same as the WiFi interface using the following code:
Code: Select all
ETH.begin();
uint8_t mac[] = {};
esp_wifi_get_mac(WIFI_IF_STA, &mac[0]);
esp_eth_set_mac(&mac[0]);
Serial.print("ETH MAC: ");
Serial.println(ETH.macAddress());
How do I properly change the ETH MAC Address ?
I have an ESP32-EVB with the following MACs:
WiFi Mac: 7c-9e-bd-30-2d-a8
ETH Mac: 7c-9e-bd-30-2d-ab
I am using PlatformioIDE with PlatformIO Core, version 5.2.3