W5100 doesn't detect linkStatus
implement a bypass
This commit is contained in:
1 parent
d231c5bda1
commit
1fa5d48e74
1 file changed
+5
-1
+5
-1
@@ -833,9 +833,13 @@ void setup_ethernet() {
|
|||||||
trc(F("Spl eth cfg"));
|
trc(F("Spl eth cfg"));
|
||||||
Ethernet.begin(mac, ip);
|
Ethernet.begin(mac, ip);
|
||||||
}
|
}
|
||||||
|
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
||||||
|
trc("Ethernet shield was not found.");
|
||||||
|
}else{
|
||||||
trc(F("ip: "));
|
trc(F("ip: "));
|
||||||
Serial.println(Ethernet.localIP());
|
Serial.println(Ethernet.localIP());
|
||||||
trc(F("Eth ok"));
|
trc(F("Eth ok"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -886,7 +890,7 @@ void loop()
|
|||||||
#if defined(ESP8266) || defined(ESP32)
|
#if defined(ESP8266) || defined(ESP32)
|
||||||
if (WiFi.status() == WL_CONNECTED){
|
if (WiFi.status() == WL_CONNECTED){
|
||||||
#else
|
#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
|
#endif
|
||||||
lastNTWKReconnectAttempt = 0;
|
lastNTWKReconnectAttempt = 0;
|
||||||
if (client.connected()) {
|
if (client.connected()) {
|
||||||
|
|||||||
Reference in new issue
Block a user