I've done my due diligence on this one. Keeping in mind that no matter what I try with the standard Ethernet5100 arduino shield, everything just works - my code, the examples, anything. As it should be; like falling off a log.
But, after wasting far too much time working with 4 different Seeed 5200s (v2.2) I have yet to have them connect properly or connect at all.
I have tried the suggested library for the 5200 at GitHub (now called Ethernet Sheild W5200 master), I have tried the EthernetMod-W5x00 which is supposed to work for both, the Wiznet Ethernet library Master (with the correct mods for the 5200), and rolled my own based on the standard Ethernet lib from Arduino.
With the above libraries I've tried IDE 1.05, 1.06 and 1.65 - including both the old version of the GitHub EthernetV_2.0 and the newer Master version.
Running a test of the SPI works fine and returns the correct address. With the Mod Library, if I time it just right I can get it to show an attempt a connection in the serial monitor with the example webclient sketch, but of course if finally fails (the bigger mystery here at is why I have to time opening the serial monitor just right). But all other libraries just reveal a blank Serial Monitor.
I bought these 4 Seeeds because I was on location and there were no regular 5100's to be had. Should this really be this hard?
Given the above, I can't believe all 4 units (from different vendors) are bad, nor can I believe that I'm out of my depth given the 5100 is crazy easy.
But here I am again, a long way from a regular electronics outlet and only these 5200's to work with.
I think some(all?) of the seeed W5200 shields lack pull-up resistors on the SD CS line. Did you do digitalWrite(4, HIGH) to deselect the SD card before calling Ethernet.begin()?
Good suggestion, I've seen that mistake made. I did do the pull up on pin 4, and I'm not using the SD card so there is no back and forth on that to deal with.
And it's not an issue writing to the board itself (i've seen that on a few of the clones that don't have a connection to the reset pin on the base Arduino).
We thought initially that it might be the network itself, not allowing things like this to happen, but I've tried it on 4 different networks now (different locations) and no joy.
I also have a Seeed W5200 Shield v2.2. I have found that setting the SD CS line HIGH is necessary for reliable operation even with no SD card inserted which I haven't found to be the case with my Chinese W5100 or W5500 shields from eBay. I use the ChatServer example to test. I just tried it with GitHub - Seeed-Studio/Ethernet_Shield_W5200: Seeed Studio Ethernet Shield V2.0 Library with no problems. I did find a bug with the EthernetMod W5x00 library and W5200 causing it to get an IP address but not be able to connect which I have fixed so if you're using that library you should download the latest version: https://github.com/per1234/EthernetMod/archive/W5x00.zip
Thanks Pert. Tried your modded mod lib and also tried the Chat server (had only tried a few of the examples to this point). Still no luck. And this is across 4 different 5200 boards. Of course the 5100s work like a charm. Am making sure that SDCS is high although on the 5100s I have here I don't have a SC cards slot.