Cannot configure Ethernet on Leonardo ETH

Hello Everybody,

I’m have a problem with a new Leonardo with build in Ethernet (“Leonardo ETH R3”).

I have tried some examples, but I cannot bring them to work. So here is a little test scatch, that is just setting IP-configuration and an sends back the IP-address, that was just set.

#include <SPI.h>
#include <Ethernet.h>
byte mac[] =    { 0x90, 0xA2, 0xDA, 0x10, 0x58, 0xEC };
byte ip[] =     { 192, 168, 2, 67 };
byte dnsrv[] =     { 192, 168, 2, 1 };
byte gateway[] =     { 192, 168, 2, 1 };

byte server[] = { 192, 168, 1, 10 }; // Erstes XP20

//Ethernet localhost;

void setup() {
  Serial.begin(9600);
  while (!Serial) {;}
  Serial.println("Serial is working");
  Ethernet.begin(mac,ip,dnsrv,gateway);
  Serial.print("Eth configured, IP = ");
  Serial.println(Ethernet.localIP());
 
}

void loop() {
  //Serial.println(Ethernet.localIP());
}

and this is what i get on my serial monitor:

Serial is working
Eth configured, IP = 0.133.133.133

So where does the IP 0.133.133.133 come from? I was expecting 192.168.2.67

Has one of you seen this before? Searching the web for “0.133.133.133” does not bring a result.

Regards
Jens

Your expectation is correct, but I'll bet your library is at fault. That is a w5500 IC, correct? You must use this library. https://github.com/Wiznet/WIZ_Ethernet_Library

Hello SurferTim!

That's it! Now it works! Many Thanks!