Keep getting server address of 0.0.0.0 with brand new arduino shiled

Hi
I tried this with a 3rd party network shield,and failed, so I have paid for and just received a brand new, boxed, genuine (and quite costly) network shield complete with very nice clear plastic base cover to avoid contact with the main board.

I plugged it on to a brand new arduino uno board, uploaded various sketches to the board, and I still get server address = 0.0.0.0 which is of course of no use whatsoever.

I have even tried using the "direct IP" assignment by passing MAC, IP, gateway and mask to the ethernet.begin command, same result.

So summing up, trying for a DHCP IP address hangs totally, despite my whole network running on DHCP assigned addresses, and specifying manually also fails.

I am using the following :
#include <SPI.h>
#include <Ethernet.h>

Driving me nuts basically.

Does anyone have some ideas as to how to get this shield to work correctly. I would be really appreciative of some concrete help here

Cheers
Ian

What ethernet controller is on the shield? Could be a w5100, w5200, w5500, or an ENC28J60.

SurferTim:
What ethernet controller is on the shield? Could be a w5100, w5200, w5500, or an ENC28J60.

Just checked it and it is a Wiznet w5500 Tim ?

Have you downloaded and installed a library compatible with the w5500? If not, download and install this one. It has the w5500 set as the default.

SurferTim:
Have you downloaded and installed a library compatible with the w5500? If not, download and install this one. It has the w5500 set as the default.
GitHub - Wiznet/WIZ_Ethernet_Library: WIZnet Ethernet Library

Hi again Tim

I have downloaded and (eventually) installed it.

I now get an IP of 0.175.175.175 - really weird ?

I dived into the W5100 headers (I used to write my own TCP/IP code in another life), and confirmed that as per the documentation the W5500 declaration was there and not commented out. I even tried uncommenting the W551io declaration to let me send all the details manually, and in fact tried several different of the available methods shown in the header. Everything gave me the same result - 0.175.175.175, or if I go the DHCP route, it simply hangs for ever, so clearly the Ethernet.begin() command never returns.

Totally confused now, it just cannot be another faulty shield. ?????

Is the shield inserted fully into the Arduino? The ICSP connector is how the SPI data lines connect.

Any other SPI devices connected, like maybe a SD card?

Some shields have been assembled carelessly and have solder bridges on the w5500.

SurferTim:
Is the shield inserted fully into the Arduino? The ICSP connector is how the SPI data lines connect.

Any other SPI devices connected, like maybe a SD card?

Some shields have been assembled carelessly and have solder bridges on the w5500.

Hi Tim

Yep, fully inserted with no looseness at all. I have removed the plastic shield as well and plugged it literally in AS FAR AS IT WILL GO.

The shield has a built in SD card, hence my additional "security" code

pinMode(4, OUTPUT);
digitalWrite(4, HIGH);

to ensure I have disabled the SD card. JIC

I also suddenly realized when I took the shield off the Uno that the new shield had a sticker on it giving me its own personal MAC address (first time that has happened, the old shield did not do so) , so I modified the code to use that MAC address, but sadly, I got the exact same result - IP address of 0.175.175.175

It must indicate something in that whatever changes I make in the software in terms of initialization, it insists on giving me the same, and clearly wrong and unusable IP address for the shield. Even using the manual configuration option, it still ignores it and gives me the same stupid IP

I notice that the LED's on the shield are ALL on, that is to say the 100Mb LED connection is recognized, the LINK and the FDX ?? (not sure what that is showing) LEDS are all lit permanently, while the "ACT" LED flashes intermittently, which I assume is showing that it is trying to poll for an active socket ? but I could be wrong of course in that assumption.

I have used a magnifying glass on the board, but can see no sign of any poor soldering or linked joints causing any unwanted bridges on the board AFAIK

Really weird what is going on isn't it ?

Are you certain you are using the new library? Put this in setup after initializing the serial port. Does it print w5500?

#ifdef W5100_ETHERNET_SHIELD
  Serial.println("w5100");
#endif
  
#ifdef W5200_ETHERNET_SHIELD
  Serial.println("w5200");
#endif

#ifdef W5500_ETHERNET_SHIELD
  Serial.println("w5500");
#endif

Hi Tim

I was actually already ahead of you, and yes, it reports W5500 is the active library, exactly as I expected after my foray into the header files.

However, and even more strangely, when I tried it again this morning, the damned thing worked, and has continued to work all day, so tell me what goes on there - same code, same shield etc. ?

Thanks for your feedback Tim, I am sure I will be back with more questions on these shields, but as of today (so far at least) I now have a working Arduino Internet shield......

But there is definitely something nasty in the woodwork with these shields that needs bottoming out ?

YeeHaa.

Hard to say. Maybe a cold solder joint. Maybe a pin not inserted quite fully.

My w5100 works fine. Most users here report the w5500 works fine also.