Ethernet Shield 2 not working

Hi everyone, I'm starting using Arduino for a project involving the ethernet shield

I have an Arduino Uno with a Ethernet Shield 2 , unfortunately the shield doesn't seem to be working.

All the relevant leds on the shield are ok, I tried this simple sketch which I found somewhere else on the forum to test if the interface is correct:

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0x90, 0xA2, 0xDA, 0x0F, 0xF8, 0x6D };

IPAddress ip(192, 168, 44, 176);

void setup() {
  Serial.begin(9600);

  // disable SD SPI
  pinMode(4, OUTPUT);
  digitalWrite(4, HIGH);

  // Start ethernet
  Serial.println(F("Starting ethernet..."));
  Ethernet.begin(mac, ip);
  Serial.println(Ethernet.localIP());

  delay(2000);
  Serial.println(F("Ready"));
}

void loop() {
}

I get this in the serial monitor:

Starting ethernet...
0.176.176.176
Ready

which surely isn't the ip I need, and it never changes regardless of the IP I try to set. I already checked 3 times the pin connection between the two boards, it surely is ok.

Should I just give up and substitute the ethernet shield ?

TIA

Claudio

When you say ethernet shield 2, do you mean 2.0? Like this one with a w5200 IC?

If so, you need to use the library for the w5200.

Hi,

I mean the one with the W5500 controller, isn't the standard ethernet library enough? I found no mention of a different library anywhere...

Bye

The standard ethernet library is not enough.The Wiznet w5500 is closer to the w5200.
http://wizwiki.net/wiki/doku.php?id=products:w5500:migration
I would try the w5200 library.

Hi,

I solved it in a rather easy way, I tried the ethernet2 library and everything is ok now.

I guess it would be better if this was written in the shield data sheet or the description, but anyway I'm just too happy to care .

Thank you for the suggestion, it pointed me to the library matter.

CiBi69:
Hi,

I solved it in a rather easy way, I tried the ethernet2 library and everything is ok now.

I guess it would be better if this was written in the shield data sheet or the description, but anyway I'm just too happy to care .

Thank you for the suggestion, it pointed me to the library matter.

Dear CiBi69, can you share the link of the "ethernet2 library"? I have exactly the same error you reported. Thanks for your help!

Chris.

Hi Chris,

the ethernet2 library is included in the arduino software, you can find it in the Import library menu item, menu Sketch.

Ciao

Claudio.

CiBi69:
Hi Chris,

the ethernet2 library is included in the arduino software, you can find it in the Import library menu item, menu Sketch.

Ciao

Claudio.

You must mean the IDE from Arduino.org, not Arduino.cc. Different websites. It is not included in the IDE from this website.

CiBi69:
Hi Chris,

the ethernet2 library is included in the arduino software, you can find it in the Import library menu item, menu Sketch.

Ciao

Claudio.

Ciao Claudio, thanks for your answer!

I must add that I solved the problem I had.

I just had to update the IDE to 1.7.4 which includes the "Ethernet 2" library and everything worked out!.

Look forward to any comment.

Thanks everyone.

Bye / Ciao / Adios! :slight_smile:

Chris.

I just had to update the IDE to 1.7.4 which includes the "Ethernet 2" library and everything worked out!.

Makes you wonder why the Arduino.cc crew can't upgrade their ethernet library, doesn't it?