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