Go Down

Topic: TinkerIT Ethernet shield compatibility with 1.0.3 library ??? static == (Read 1 time) previous topic - next topic


I purchased a couple of Arduino Mega (must be 1280), and Ethernet shields from Amazon awhile ago, then due to a change in employment status had to set them aside. Now that I am getting back to them, I am struggling with the Ethernet shields, and questioning the library support for these boards.

I don't recall knowing there were different Ethernet shields at the time I bought them, and the only markings I can find on these say TinkerIT. They do have a W5100 chip, and a layout very close to the v3, though these don't have the SD carrier populated. I have tried a variety of example sketches, as well as trying from scratch but they all fail. That said, the boards do appear to work on the Ethernet side as all the leds flash appropriately (though I never see a DHCP attempt on the TX led), if they could only be configured correctly.

It doesn't matter if I try a DHCP, or a static assignment, addresses don't take. When I ping the subnet broadcast wireshark shows a response from with mac 0:0:0:0:0:0, but only when the Arduino is connected. Then a series of ICMP dst/port unreachable messages from, that coorespond to the TX led flashing, in response to port 137/138 traffic from the W7 machine running wireshark. There is also a TX flash every 30 sec, what would appear to be a response to the RIP update sent to subnet broadcast, though that is not getting through the switch to wireshark. This address is consistent with the output from: Serial.println(Ethernet.localIP()), so it would appear that the address being passed through begin(), or acquired from DHCP are not getting to the chip.  There are unsubstantiated claims that the DHCP timeout in 1.0+ is 1 minute, but as far as I can tell in 1.0.3, it is longer than 30 minutes to drop out and print the address.

Since I can't get a static address assigned, and the board responds for the address it has, the next logical place to start looking is the library support. The first annoying thing I stumbled across is Ethernet.h where any parameter passed beyond (mac) causes a status = Ethernet.begin(...) to fail. Why are those parameter options declared with void rather than int so a proper status is returned, even if most people will ignore it? The next was the decision to insert dns before gtw/mask. There are lots of example sketches showing (mac, ip, gtw, subnet), which are all invalid after 1.0 as far as I can tell. On top of that there is the confusing practice of stating a current string as (mac, ip, gtw, gtw, subnet). While I understand that is a handy short-hand for people too lazy to type out IPAddress dns_srv(,,,), it makes it look like a typo when compared to the older examples with only one gtw entry. 3rd is the fact that if you try to just use IPAddress dns(,,,) it fails compiling due to an attempted reasignment of the array. 4th, why do all DHCP examples try once and fail, rather than retry after a reasonable period? (see below)  5th, I understand why the IDE closes the serial monitor during an upload, but why doesn't it remember that it did that and reopen it after the upload completes?     but I digress, so back to the problem at hand...

Is there any code to get full status from the W5100, or perform diagnostics? Search turns up nothing but other people looking for the same. I have been searching for all kinds of errors related to these boards, and/or assignments resulting in, with absolutely no luck. Is there some incompatibility between the Mega and this shield? Do I need to do something with ../hardware/arduino/variants/mega/pins_arduino.h, or did declaring the board type to the IDE take care of that? Anyone have a suggestion of what to try next?

Here is the currently loaded sketch:

IDE 1.0.3 on W7
Arduino Mega (1280)  w/ tinkerit ethernet shield both acquired Mar 2010.
// pasted together from several sketches  +  edits & insertions

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

boolean status = false;

byte mac[] = {  0x02, 0xAA, 0xBB, 0xCC, 0xDD, 0x02 };

IPAddress ip(192,168,123,24);

EthernetClient client;

void setup() {
  // turn off SD select,  despite lack of socket on this board
  // ambiguous claims all over the place about needing to do this to make 5100 work
// Open serial communications and wait for port to open:
   while (!Serial) {

  Serial.println("start the Ethernet connection:");
//  status = Ethernet.begin(mac, ip);   // this fails because ethernet.h has void for parameters beyond (mac)
//  Serial.println(status);    // this makes no sense when the above fails

  Ethernet.begin(mac, ip);   // could do more, but this should be enough for on-subnet ping

/*       comment out above and uncomment below for DHCP
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");    // never prints this
    // keep trying at 1 minute intervals until it works
    while (!Ethernet.begin(mac)) {
      delay( 60000 + random(0,100) );
      Serial.println("Failed DHCP Retrying");

  delay(2000);  // let things settle before moving on...

// print the local IP address:
  Serial.print("My IP address: ");
  for (byte thisByte = 0; thisByte < 3; thisByte++) {
    // print the value of each byte of the IP address:
    Serial.print(Ethernet.localIP()[thisByte], DEC);
    Serial.print(Ethernet.localIP()[3], DEC);


void loop() {
  // no point in putting anything here until a valid address gets assigned

Serial Monitor output:

start the Ethernet connection:
My IP address:


You might try the below.

Code: [Select]

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

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,102);

void setup() {

  // disable SD card if one in the slot

  Serial.println("Starting w5100");


void loop() {

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)


I had tried one similar, but ran yours with and without modification of the IP address, and get back:
Starting w5100

After the original post I stumbled across a video blog talking about an NKC board that was "not compatible with the MEGA". NKC was the distributer for Amazon on the boards I purchased, but those were clearly different as the chip & RJ45 were on a separate daughter card. In any case, it would appear that boards using a reference design before the MEGA was released might have a problem. Even the description of the official R3 says the prior revision was not compatible as the SPI bus was moved.

If I define 11, 12, & 13 as input can I jumper 50, 51, & 52 to those without damaging anything?


I'd like to see the ethernet shield. Do you have a link to that?

If the ethernet shield has an ICSP connector on the bottom that connects to the ICSP pins on the Mega, then it is Mega compatible and needs no jumpers. If not, you will probably need to jumper the SPI data pins before it will function.
MOSI = D11 -> D51
MISO = D12 -> D50
SCK = D13 -> D52

D10 stays where it is. That is the standard ethernet slave select.


I don't have a pointer to an image, and the Amazon one now shows the official R3 distributed by NKC. It is almost identical, but doesn't have the underside connector to the ICSP pins.

I did do the jumper thing as you indicated and it works both static & DHCP.

start the Ethernet connection:
My IP address:

Reply from bytes=32 time<1ms TTL=128


Go Up