W5100 doesn't detect linkStatus

implement a bypass
This commit is contained in:
1technophile committed 2019-10-30 07:07:34 +01:00
1 parent d231c5bda1
commit 1fa5d48e74
1 file changed
+8 -4
+8 -4
View File
@@ -833,9 +833,13 @@ void setup_ethernet() {
trc(F("Spl eth cfg"));
Ethernet.begin(mac, ip);
}
trc(F("ip: "));
Serial.println(Ethernet.localIP());
trc(F("Eth ok"));
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
trc("Ethernet shield was not found.");
}else{
trc(F("ip: "));
Serial.println(Ethernet.localIP());
trc(F("Eth ok"));
}
}
#endif
@@ -886,7 +890,7 @@ void loop()
#if defined(ESP8266) || defined(ESP32)
if (WiFi.status() == WL_CONNECTED){
#else
if (Ethernet.linkStatus() == LinkON){
if ((Ethernet.hardwareStatus() != EthernetW5100 && Ethernet.linkStatus() == LinkON) || (Ethernet.hardwareStatus() == EthernetW5100)){//we are able to detect disconnection only on w5200 and w5500
#endif
lastNTWKReconnectAttempt = 0;
if (client.connected()) {