From 3e337e0f9b2d596c36ce01703c71d9707df9ce15 Mon Sep 17 00:00:00 2001 From: Ing-Dom Date: Tue, 28 Jan 2025 10:04:51 +0100 Subject: [PATCH] fix getting MAC-Address from ipstack in rp2040 and ESP plattform --- src/esp32_platform.cpp | 2 +- src/rp2040_arduino_platform.cpp | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/esp32_platform.cpp b/src/esp32_platform.cpp index 9c6c087..18fafc7 100644 --- a/src/esp32_platform.cpp +++ b/src/esp32_platform.cpp @@ -67,7 +67,7 @@ uint32_t Esp32Platform::currentDefaultGateway() void Esp32Platform::macAddress(uint8_t * addr) { - esp_wifi_get_mac(WIFI_IF_STA, addr); + KNX_NETIF.macAddress(addr); } uint32_t Esp32Platform::uniqueSerialNumber() diff --git a/src/rp2040_arduino_platform.cpp b/src/rp2040_arduino_platform.cpp index 6ac1ea4..23f7258 100644 --- a/src/rp2040_arduino_platform.cpp +++ b/src/rp2040_arduino_platform.cpp @@ -461,12 +461,7 @@ uint32_t RP2040ArduinoPlatform::currentDefaultGateway() } void RP2040ArduinoPlatform::macAddress(uint8_t* addr) { -#if defined(KNX_IP_LAN) - addr = KNX_NETIF.getNetIf()->hwaddr; -#else - uint8_t macaddr[6] = {0, 0, 0, 0, 0, 0}; - addr = KNX_NETIF.macAddress(macaddr); -#endif + KNX_NETIF.macAddress(addr); } // multicast