diff --git a/lib/ConnectionHandler/src/EthernetConnectionHandler.cpp b/lib/ConnectionHandler/src/EthernetConnectionHandler.cpp index 48488cd4..456d0f9f 100644 --- a/lib/ConnectionHandler/src/EthernetConnectionHandler.cpp +++ b/lib/ConnectionHandler/src/EthernetConnectionHandler.cpp @@ -57,6 +57,9 @@ bool EthernetConnectionHandler::connect(NetworkConfig config, SystemConfig sys) ethPowerPin = 16; ethMdc = 23; ethMdio = 18; + } else if(sys.boardType == 244) { + if (debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("LilyGO T-ETH-Lite\n")); + return false; // TODO } else { if (debugger->isActive(RemoteDebug::ERROR)) debugger->printf_P(PSTR("Board type %d incompatible with ETH\n"), sys.boardType); return false; @@ -146,17 +149,33 @@ void EthernetConnectionHandler::getCurrentConfig(NetworkConfig& networkConfig) { } IPAddress EthernetConnectionHandler::getIP() { + #if defined(ESP32) return ETH.localIP(); + #else + return NULL; + #endif } IPAddress EthernetConnectionHandler::getSubnetMask() { + #if defined(ESP32) return ETH.subnetMask(); + #else + return NULL; + #endif } IPAddress EthernetConnectionHandler::getGateway() { + #if defined(ESP32) return ETH.gatewayIP(); + #else + return NULL; + #endif } IPAddress EthernetConnectionHandler::getDns(uint8_t idx) { + #if defined(ESP32) return ETH.dnsIP(idx); + #else + return NULL; + #endif } diff --git a/lib/ConnectionHandler/src/WiFiAccessPointConnectionHandler.cpp b/lib/ConnectionHandler/src/WiFiAccessPointConnectionHandler.cpp index 6d08a0dd..2deb95e9 100644 --- a/lib/ConnectionHandler/src/WiFiAccessPointConnectionHandler.cpp +++ b/lib/ConnectionHandler/src/WiFiAccessPointConnectionHandler.cpp @@ -76,7 +76,11 @@ IPAddress WiFiAccessPointConnectionHandler::getIP() { } IPAddress WiFiAccessPointConnectionHandler::getSubnetMask() { + #if defined(ESP32) return WiFi.softAPSubnetMask(); + #else + return IPAddress(255,255,255,0); + #endif } IPAddress WiFiAccessPointConnectionHandler::getGateway() {