diff --git a/src/hasp_ethernet_esp32.cpp b/src/hasp_ethernet_esp32.cpp index 033f9c82..fbfa33cc 100644 --- a/src/hasp_ethernet_esp32.cpp +++ b/src/hasp_ethernet_esp32.cpp @@ -19,10 +19,11 @@ void EthernetEvent(WiFiEvent_t event) case SYSTEM_EVENT_ETH_START: Log.notice(TAG_ETH, F("Started")); // set eth hostname here - ETH.setHostname("esp32-ethernet"); + ETH.setHostname(mqttGetNodename().c_str()); break; case SYSTEM_EVENT_ETH_CONNECTED: Log.notice(TAG_ETH, F("Connected")); + eth_connected = true; break; case SYSTEM_EVENT_ETH_GOT_IP: Log.notice(TAG_ETH, F("MAC Address %s"), ETH.macAddress().c_str()); @@ -60,7 +61,7 @@ void ethernetLoop(void) bool ethernetEvery5Seconds() { - Log.warning(TAG_ETH, eth_connected ? F("ONLINE") : F("OFFLINE")); + // Log.warning(TAG_ETH, eth_connected ? F("ONLINE") : F("OFFLINE")); return eth_connected; } diff --git a/src/hasp_http.cpp b/src/hasp_http.cpp index ca9e3297..201a70db 100644 --- a/src/hasp_http.cpp +++ b/src/hasp_http.cpp @@ -504,7 +504,24 @@ void webHandleInfo() httpMessage += String(WiFi.macAddress()); #endif #endif - +#if HASP_USE_ETHERNET > 0 +#if defined(ARDUINO_ARCH_ESP32) + httpMessage += F("
Ethernet: "); + httpMessage += String(ETH.linkSpeed()); + httpMessage += F(" Mbps"); + if(ETH.fullDuplex()) { + httpMessage += F(" FULL_DUPLEX"); + } + httpMessage += F("IP Address: "); + httpMessage += String(ETH.localIP().toString()); + httpMessage += F("Gateway: "); + httpMessage += String(ETH.gatewayIP().toString()); + httpMessage += F("DNS Server: "); + httpMessage += String(ETH.dnsIP().toString()); + httpMessage += F("MAC Address: "); + httpMessage += String(ETH.macAddress()); +#endif +#endif /* Mqtt Stats */ #if HASP_USE_MQTT > 0 httpMessage += F("
MQTT Status: ");