diff --git a/WifiESP32.cpp b/WifiESP32.cpp index e45d0e8..aa73675 100644 --- a/WifiESP32.cpp +++ b/WifiESP32.cpp @@ -181,7 +181,14 @@ bool WifiESP::setup(const char *SSid, if (WiFi.status() == WL_CONNECTED) { // DIAG(F("Wifi STA IP %s"),WiFi.localIP().toString().c_str()); DIAG(F("Wifi in STA mode")); - LCD(7, F("IP: %s"), WiFi.localIP().toString().c_str()); + // + if (MAX_MSG_SIZE < 20) { + LCD(4, F("IP: %s"), WiFi.localIP().toString().c_str()); + LCD(5,F("PORT=%d WiFi"), IP_PORT); + } else { + LCD(4, F("WiFi UP")); + LCD(5, F("%s:%d"), WiFi.localIP().toString().c_str(), IP_PORT); + } wifiUp = true; } else { DIAG(F("Could not connect to Wifi SSID %s"),SSid); @@ -228,12 +235,12 @@ bool WifiESP::setup(const char *SSid, havePassword ? password : strPass.c_str(), channel, false, 8)) { // DIAG(F("Wifi AP SSID %s PASS %s"),strSSID.c_str(),havePassword ? password : strPass.c_str()); - DIAG(F("Wifi in AP mode")); - LCD(5, F("Wifi: %s"), strSSID.c_str()); + DIAG(F("WiFi in AP mode")); + LCD(4, F("WiFi: %s"), strSSID.c_str()); + LCD(5, F("%s:%d"),WiFi.softAPIP().toString().c_str(), IP_PORT); if (!havePassword) - LCD(6, F("PASS: %s"),strPass.c_str()); + LCD(6, F("PASS: %s"),strPass.c_str()); // DIAG(F("Wifi AP IP %s"),WiFi.softAPIP().toString().c_str()); - LCD(7, F("IP: %s"),WiFi.softAPIP().toString().c_str()); wifiUp = true; APmode = true; } else { diff --git a/WifiInterface.cpp b/WifiInterface.cpp index 9a4b37f..014b7e9 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -166,10 +166,10 @@ wifiSerialState WifiInterface::setup(Stream & setupStream, const FSH* SSid, con if (wifiState == WIFI_CONNECTED) { StringFormatter::send(wifiStream, F("ATE0\r\n")); // turn off the echo checkForOK(200, true); - DIAG(F("WiFi CONNECTED")); + DIAG(F("WiFi UP")); // LCD already shows IP } else { - LCD(4,F("WiFi DISCON.")); + LCD(4,F("WiFi DOWN")); } return wifiState; } @@ -366,11 +366,15 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password, } ipString[ipLen]=ipChar; } - LCD(4,F("%s"),ipString); // There is not enough room on some LCDs to put a title to this - } - // suck up anything after the IP. + if (MAX_MSG_SIZE < 20) { + LCD(4,F("%s"),ipString); // There is not enough room on some LCDs to put a title to this + LCD(5,F("PORT=%d WiFi"),port); + } else { + LCD(4,F("WiFi UP")); + LCD(5,F("%s:%d"), ipString, port); + } + } if (!checkForOK(1000, true, false)) return WIFI_DISCONNECTED; - LCD(5,F("PORT=%d"),port); return WIFI_CONNECTED; }