From 7679710c23fd58b67829ee935aa290f7fa42741a Mon Sep 17 00:00:00 2001 From: Ash-4 Date: Sun, 4 Feb 2024 23:23:56 -0600 Subject: [PATCH] lib_ignore wifi for F429ZI and F439ZI and update Ethernet disconnect messages --- EthernetInterface.cpp | 13 +++++++++---- platformio.ini | 10 ++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/EthernetInterface.cpp b/EthernetInterface.cpp index 450253d..5a76c29 100644 --- a/EthernetInterface.cpp +++ b/EthernetInterface.cpp @@ -182,11 +182,15 @@ bool EthernetInterface::checkLink() { if (ip[0] == 0) LCD(4,F("Awaiting DHCP...")); while (ip[0] == 0) { // wait until we are given an IP address from the DHCP server - // LCD(4,F(".")); ip = Ethernet.localIP(); // look what IP was obtained (dynamic or static) } - LCD(4,F("IP: %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]); - LCD(5,F("Port:%d"), IP_PORT); + if (MAX_MSG_SIZE < 20) { + LCD(4,F("%d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]); + LCD(5,F("Port:%d Eth"), IP_PORT); + } else { + LCD(4,F("Ethernet UP")); + LCD(5,F("%d.%d.%d.%d:%d"), ip[0], ip[1], ip[2], ip[3], IP_PORT); + } mdns.begin(Ethernet.localIP(), WIFI_HOSTNAME); // hostname mdns.addServiceRecord(WIFI_HOSTNAME "._withrottle", IP_PORT, MDNSServiceTCP); // only create a outboundRing it none exists, this may happen if the cable @@ -208,7 +212,8 @@ bool EthernetInterface::checkLink() { // tear down server delete server; server = nullptr; - LCD(4,F("IP: None")); + LCD(4,F("Ethernet DOWN")); + LCD(5,F(" ")); } } return false; diff --git a/platformio.ini b/platformio.ini index 0e42cf7..2bc72a8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -252,6 +252,11 @@ lib_deps = ${env.lib_deps} stm32duino/STM32Ethernet @ ^1.3.0 stm32duino/STM32duino LwIP @ ^2.1.2 MDNS_Generic +lib_ignore = WiFi101 + WiFi101_Generic + WiFiEspAT + WiFiMulti_Generic + WiFiNINA_Generic build_flags = -std=c++17 -Os -g2 -Wunused-variable monitor_speed = 115200 monitor_echo = yes @@ -268,6 +273,11 @@ lib_deps = ${env.lib_deps} stm32duino/STM32Ethernet @ ^1.3.0 stm32duino/STM32duino LwIP @ ^2.1.2 MDNS_Generic +lib_ignore = WiFi101 + WiFi101_Generic + WiFiEspAT + WiFiMulti_Generic + WiFiNINA_Generic build_flags = -std=c++17 -Os -g2 -Wunused-variable monitor_speed = 115200 monitor_echo = yes