So I've been banging my head all day trying to figure this out, but not having any luck. I have an Arduino Mega 1280 with an Arduino branded Ethernet shield(w/ sd).
My issue is. I'm able to use the Ethernet libraries just fine at the beginning of my code, but once I initialize the sd library, the Ethernet becomes unreliable and the data sent to my server is full of garbage. Sometimes my actual message is buried in the garbage. For example I run this block of code
char mg = "GET /restInterface/sensor=11,temp=22,datetime=3333/ HTTP/1.1"; Serial.println(mg); client.println(mg);
And my server sees something like this
";odsf jpow4ujfpa98asfefGET /restInterface/sensor=11,temp=22,datetime=3333/ HTTP/1.1alsdkjf;iajoi8fj;oakjd;d"
I'm thinking the issue is the sd library or something with the HW is corrupting the SPI bus, but I can't figure it out. Anyone have any suggestions that may point me in the right direction? The full source can be found at http://code.google.com/p/arduinodatacollector/source/browse/#svn%2Ftrunkwith the SD code in the Logging.cpp and the Ethernet code in Networking.cpp