Go Down

Topic: Ethernet Shield W5500 doesn't begin server (Read 12118 times) previous topic - next topic

bl0w

Hello.

I buy a Arduino Ethernet Shield 2 with Ethernet Controller W5500.

I run the webserver example of the IDE and the program doesn't start the server. Stops in line "server.begin();".

I tried with Arduino Uno and Arduino Mega and with another Ethernet Shield 2 and it happens the same.


Example Code from IDE

Code: [Select]

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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  Serial.println("I'm here!!!!");
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  Serial.println("And here!!!!");
  server.begin();
 
  Serial.println("Did I made the server.begin?");
 
 
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
}


void loop() {
//...
}



Print screen of the serial monitor:



Anyone have a good reason for it? The W5500 chip works different compared with W5100? I have a Ethernet shield with the W5100 and it works perfectly.


The board:
http://prntscr.com/7h8dpm



Btw... The SD CARD runs correctly with the IDE examples:


SurferTim

You must download and import the Seeed Studios library for the w5200/w5500.
https://github.com/Seeed-Studio/Ethernet_Shield_W5200
Then change the include to
Code: [Select]
#include <EthernetV2_0.h>

Wiznet has a library for the w5500 also, but I have not checked it yet.
https://github.com/Wiznet/WIZ_Ethernet_Library

bl0w

Thanks you.

I import the library and now It began the server. But the ip is not what I setup. The ip the program shows is 0.0.0.0 .

I have to change anything in EthernetV2_0.h file to match with my chip (W5500)?

SurferTim

If it shows 0.0.0.0 as the IP, then something is wrong with the SPI bus or the w5500.

All reports I see show the w5500 will run with that library.

bl0w

I have here two Ethernet shields (with W5500) and the ip they assume is the same: 0.0.0.0

I tried run the program on two different Arduinos (Uno and Mega) with the shields attached and the result is the same.


I supposed is not the SPI because I have here a Ethernet Shield with W5100 and it works.

But is a huge coincidence the two ethernet shields I bought have the w5500 broken.

SurferTim

Then try the Wiznet library. I think you must make a change for the w5500 in that library.

bl0w

#6
Jun 15, 2015, 06:37 pm Last Edit: Jun 15, 2015, 07:06 pm by bl0w
I try to use the wiznet library. The library selects the W5500 by default.

Code: [Select]
//#define W5100_ETHERNET_SHIELD // Arduino Ethenret Shield and Compatibles ...
//#define W5200_ETHERNET_SHIELD // WIZ820io, W5200 Ethernet Shield
#define W5500_ETHERNET_SHIELD   // WIZ550io, ioShield series of WIZnet


But with this library the "server.begin();" don't run. I put a serial.print before and after this line to have sure.

It is the same think happened before.


Edit:

I tried this version too: https://github.com/embeddist/WIZ_Ethernet_Library-IDE1.6.x
Because my IDE is 1.6.4 but nothing change, can't run the server.begin with the wiznet library

SurferTim

Until you get an IP. Nothing will work.

Post a link to the Ethernet shield you are using.


SurferTim

The shield looks ok by design. I don't know about construction though.

Until you can get the shield to get an IP, nothing else will work.

Do you have a SD card in the shield's slot? If so, remove it for a test and try it again.

bl0w

#10
Jun 16, 2015, 03:33 pm Last Edit: Jun 16, 2015, 03:36 pm by bl0w
I test it with and without SD card.  :(

I thought the shield is official by Arduino. It came in this box:

SurferTim

#11
Jun 16, 2015, 03:40 pm Last Edit: Jun 16, 2015, 03:47 pm by SurferTim
AFAIK, Arduino does not make an ethernet shield with a w5500.

edit: Note the website address on the box is Arduino.org, not Arduino.cc. I don't think they are the same company.


bl0w

 :o

I think it was the same because are both from Italy.

I hope I can put the shield to work but it's being difficult.

SurferTim

Only thing I can recommend is check the w5500 for solder bridges.

bl0w

Yes, finally It's working.

I use the IDE downloaded from arduino.org (Arduino 1.7.4) and the board now run the server.begin() function and shows the correct IP.

They use a different library. This is what says in comments.

Code: [Select]
/*
 modified 12 Aug 2013
 by Soohwan Kim (suhwan@wiznet.co.kr)

 - 10 Apr. 2015
 Added support for Arduino Ethernet Shield 2
 by Arduino.org team
 
 */




Thanks for all your help SurferTim  ;)

Go Up