Help- can't get Seeed W5200 to work with ethernet2.0.0 library

I can’t seem to get W5200 seeed shields to work with the new ethernet library and IDE 1.8.9
I am testing with the Webserver example provided with the 2.0.0 library.except I have added some stuff trying to troubleshoot why I can’t get the W5200 shields to work.
I tested this with 3 new Seeed W5200 shields with the same result so don’t suspect a bad board.
Any Suggestions as to what I should try next would be appreciated. I assume I have missed something.

This is console output with W5100 shield which seems to work fine.

The library Id= 989
Ethernet WebServer Example
Local IP is 192.168.0.50
Hardware status returned= 1
W5100 Ethernet controller detected
Server is at 192.168.0.50 num of sockets 8
Free Ram in loop: 7489.

Note that MAX_SOCK_NUM is 8 but should be 4 for W5100
I find I can change that by editing the line in ethernet.h, but it seems to me that it isn’t setting it right.

This is the web page result
analog input 2 is 513
analog input 3 is 511
analog input 4 is 510
analog input 5 is 515
Refresh 0

**** following is what I get with same sketch with seeed W5200 shield
This is console output:
The library Id= 989
Ethernet WebServer Example
:Local IP is 1.0.0.0
Hardware status returned= 0
Ethernet shield was not found. Sorry, can’t run without hardware. :frowning:
.
Note that the address did not get set by Ethernet.begin(mac, ip);

Also tested Seeed bd with Webserver example from w5200 library both using IDE106 and IDE189
and it works with W5200 shield
Console output:
Server is at 192.168.0.50
new client
GET /menu HTTP/1.1 I guess I must have entered the /menu
Host: 192.168.0.50
etc …

client disconnected

browser page:
analog input 0 is 557
analog input 1 is 551
analog input 2 is 549
analog input 3 is 534
analog input 4 is 552
analog input 5 is 533

WebServertest.ino (5.4 KB)

Forgot to mention that shield is on Mega 2560.

I've also had problems using the Arduino Ethernet library 2.0.0 library with my Seeed W5200 shield, even though that library works great with the W5100 and W5500.

pumpmck:
with Webserver example from w5200 library both using IDE106 and IDE189
and it works with W5200 shield

By "w5200 library", do you mean this one?:

I am able to use the W5200 shield with that library.

this is the one that I can't get to work.

And yes this one seems to work with my Seeed W5200

Noticed at Arduino Ethernet Library 2.0.0 that seeed W5200
is not listed as being tested so maybe it hasn't.
This is from the above site under Benchmarks & Test Results
Arduino Mega 2560 Arduino Ethernet R2 77.44 74.31 ok ok
WIZ820io 325.44 172.73 ok ok
Seeed Ethernet W5500 323.36 179.58 ok ok

For now I guess I will need to use the library from

I talked to Paul Stoffregen about the issue I had with my Seeed W5200 shield while I was doing testing prior to the 2.0.0 release of the Ethernet library. They said they had also encountered some problems when testing the library with W5200.

In my case, the W5200 shield works fine with the Ethernet library when it's plugged into my Uno or Leonardo. It's only when I try using the W5200 shield on my Mega that it doesn't work. I can use the W5200 on the Mega with the Seeed EthernetV2_0 library, no problem. So I know the Ethernet library has some compatibility with W5200 and I know my hardware is not just bad, but I don't understand the reason why only that one particular combination of hardware and library doesn't work.

Ok, that is what I am doing too. Using the new library with W5100 and Seeed EthernetV2_0 library with W5200 boards.
Too bad these issues are not pointed out someplace convenient so one doesn't have to spend a lot of time figuring out what works with what.
While I am at it a couple of other issues:
1.The W5100 board gets configured with 8 sockets when using 2560 system. I can edit the library file ethernet.h to change it to 4 so it is not a big deal. (if one knows about it)
I see a discussion about that problem at MAX_SOCK_NUM is faulty determined in combination with Mega board · Issue #70 · arduino-libraries/Ethernet · GitHub, but don't know where that will wind up. Doesn't seem like there is agreement on how to solve that problem. I guess this isn't much a problem for me since the W5200 board doesn't work with the new library anyhow,
but if that gets fixed then I would want the W5200 to have 8 sockets.and not be limited by the library change I put in.
2. The timeout for dhcp defined in ethernet.h is set for 60000 msec which seems way too long to me. Maybe 5 seconds would be reasonable, but not 60.
I have my system set to restart the ethernet server if it can't get to the router for some reason and taking that long to timeout causes my system to get a wdt fault since
it is longer that the 8 seconds I have wdt set to. This too I can change in the library file ethernet.h. Even without the wdt issue hanging for 60 seconds in setup waiting
for the dhcp to timeout is kind of a pain.

This note is just in case someone else comes across these issues.