Open coeurtech opened 1 year ago
I also have a DFR8050 and can confirm that it also fails. I'm using the example hardware check sketch from this repo. I had hoped the issue was a bad board. Mine was purchased from Digikey last month.
In testing it appears that the return values are moved over by 1 bit. So when the result should be 0000 0001 what gets returned is 0000 0010.
Try editing w5100.h to change 14000000 at line 21 to a slower speed, like 4000000 or even 2000000 just for the sake of troubleshooting.
https://github.com/arduino-libraries/Ethernet/blob/master/src/utility/w5100.h#L21C4-L21C4
Maybe this particular shield has a slow 5V to 3V buffer chip and just can't handle the normal SPI clock speed?
If using Arduino IDE 2, your Ethernet library is probably installed in a hidden folder. To discover its location, use File > Preference to turn on verbose output during compile. Click Verify to recompile. Then in the messages about compile, scroll up and look for the info about which libraries were used. You'll see the full pathname. How to access hidden folders depends on your operating system, but that sort of info is easy to look up with Google search.
I acquired a Leonardo board, uploaded the same sketch from my Uno boards, and the DFrobot shield works as intended. The sketch contained some pin mode setup code from the DFrobot wiki, which is apparently unnecessary as removing it did not stop the board from starting properly. No need to set an Ethernet.init pin either.
I will attempt Paul's suggested workaround for the Uno boards.
Arduino UNO v3 with DFRobot DFR0850 shield (w5500 chipset w/POE & SD card, https://wiki.dfrobot.com/Ethernet_and_PoE_shield_for_Arduino_W5500_SKU_DFR0850) using Ethernet library 2.0.2 immediately returns failure when
Ethernet.begin
is called andEthernet.hardwareStatus
returnsEthernetNoHardware
.Shield fails to get IP address using DHCP when using Ethernet2 library BUT DOES work with static IP, so issue appears to be with the official Ethernet library.
Code being used: