From f1d445e056054df604b136190c20837f8d1b67c0 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 6 Nov 2022 21:32:54 +0100 Subject: [PATCH] Do not abort ethernet startup on W5100 --- EthernetInterface.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/EthernetInterface.cpp b/EthernetInterface.cpp index a72f76c..2668ece 100644 --- a/EthernetInterface.cpp +++ b/EthernetInterface.cpp @@ -60,17 +60,16 @@ EthernetInterface::EthernetInterface() connected=false; #ifdef IP_ADDRESS - Ethernet.begin(mac, IP_ADDRESS); + if (Ethernet.begin(mac, IP_ADDRESS) == 0) #else if (Ethernet.begin(mac) == 0) + #endif { DIAG(F("Ethernet.begin FAILED")); return; } - #endif if (Ethernet.hardwareStatus() == EthernetNoHardware) { - DIAG(F("Ethernet shield not found")); - return; + DIAG(F("Ethernet shield not found or W5100")); } unsigned long startmilli = millis();