From a7bc2be9b75c993ff95d60898ddbbb49086fe309 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Wed, 22 Dec 2021 16:49:03 +0100 Subject: [PATCH] remove esp_eth_get_mac (for IDF 4.x) --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 129665c9..1cb3e3fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -126,7 +126,8 @@ void setup() { // hash 6 byte device MAC to 4 byte clientID uint8_t mac[6]; - esp_eth_get_mac(mac); + esp_read_mac(mac, ESP_MAC_WIFI_STA); + const uint32_t hashedmac = myhash((const char *)mac, 6); snprintf(clientId, 20, "paxcounter_%08x", hashedmac); ESP_LOGI(TAG, "Starting %s v%s (runmode=%d / restarts=%d)", clientId,