NEWBIE needs Ethernet Help!

Just got my Ethernet Shield, mounted to my Freeduino, plugged Ethernet cable into router, and don't know what to do now! I don't see the Arduino listed in the attached devices, though it is making all the happy flashing lights. Needless to say, I am unable to execute any Ethernet example routines with any success. What am I missing? How do I find a IP address if the router doesn't even see it?
Tried on two routers, same result.

I feel like I missed step 1 somehow, whatever that is...

I feel like I missed step 1 somehow, whatever that is...

There are at least two types of ethernet shields that are significantly different. What type do you have?

Well, that's an interesting question. I tried to order an Adafruit Ethernet Shield from Solarbotics, and an Ethernet module from WIznet to attach to it. (They were out of Ethernet Shields at the time). The order was delayed by months, and I had to call them to ask what happened to it. But then it appears that Solarbotics sent an Arduino Ethernet Shield instead, as it has the ethernet cable connector on it, and there is no obvious way to attach the Wiznet module to it. It also says "Arduino Ethernet Shield". It has the long pins that go all the way down to the analog and digital I/O pins of the Freeduino.

I could sure use some help!

Well, that's an interesting question.

Can you post links to the products you have?

This is my Freeduino: http://solarbotics.com/products/28920/
This is, I believe, my Ethernet Shield. http://www.solarbotics.com/products/51830/. Mine looks very similar, except for some components (the reset switch. can capacitors, e.g. are in a different place). My also appears to have a socket for flash memory. "Ethernet Shield" is printed on the board, as is the Arduino symbol.

This looks exactly like my Ethernet board: Google Shopping - Product not found.

Looks looks the the board and shield sould mate together with issues. Below is a simple client code you can try to see if it makes a connection. I assume you have tested your arduino type board and verified it is working.

//zoomkat 11-13-10
//simple ethernet client test code
//for use with IDE 0021 and W5100 ethernet shield
//modify the arduino lan ip address as needed
//open serial monitor to see what the arduino receives
//push the shield reset button to run client again

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

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 102 }; // Arduino IP address
byte server[] = { 208, 104, 2, 86 }; // zoomkat's web site

Client client(server, 80);

void setup()
{
  Ethernet.begin(mac, ip);
  Serial.begin(9600);
  Serial.println("starting simple arduino client test");
  Serial.println();

  delay(1000);

  Serial.println("connecting...");

  if (client.connect()) {
    Serial.println("connected");
    client.println("GET /~shb/arduino.txt HTTP/1.0");
    client.println();
  } else {
    Serial.println("connection failed");
  }
}

void loop()
{
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    Serial.println("==================================");
    Serial.println("");
    client.stop();
    for(;;);
  }
}

Yes, tried it, and get this response:

starting simple arduino client test

connecting...
connection failed

disconnecting.

And yes, Freeduino board otherwise appears to be working.

Although, again I don't have an ip address for the Arduino...

Although, again I don't have an ip address for the Arduino...

You need to do more study/reading on using the ethernet shield. Not knowing anything about your network setup of type of internet connection, hard to give suggestions.

The shield is not hooked to internet, only to a LAN Via a D-Link router (192.168.0.1). Ethernet cable from Ethernet Shield to D-Link, yet Shield does not appear as an attached device as far as I can tell. I see lights flashing on the Shield corresponding to lights on the router, so it looks as though they are in communication, but I am unable to do anything else, or execute any examples in the Ethernet library. I've no idea what I need to do, and I see no additional documentation.

Can I get the Shield's ip address from my computer, which is also on the LAN, i.e. a config/all command?

Below is the line that assigns an IP address to the arduino. You need to check your router to make sure there is not another device connected using the same 102 IP address, then change the IP address line to be like the bottom. Notice the 1 is changed to 0 to match your routers setup.

byte ip[] = { 192, 168, 1, 102 }; // Arduino IP address

byte ip[] = { 192, 168, 0, 102 }; // Arduino IP address

OK, tried that, got same message ("connection failed") as before. But I do now see the Arduino when I type an arp -a on command line which shows that ip address (192.168.0.102). However, it claims the "type" is "invalid" rather than "dynamic" as shown on the router ip address. It also give it no MAC address. It still does not show up as an attached device on the router config page. The DHCP range is 192.168.0.100 to 192.168.0.200, so should be ok?

Any other ideas? Should I try a different Arduino?

The stuff at...

... might help. You don't need to worry about the connecting to the outside world stuff yet... just getting your Arduino+Ethernet visible on your LAN shouldn't be TOO horrible...

It also give it no MAC address.

If you do random stuff instead of trying the provided code that works for me, the expectation and most likely (and observed) result is failure.

The routines at this website (sheepdog) appears to use a library I don't have (Ethershield), so I can't compile the code. WHY IS THIS SO HARD?? Surely there is something simple, stupidly wrong with what I'm doing. BTW, I now get a "dynamic" ip address of 192.168.0.102 for Arduino, so I guess that's progress...

Have still been unable to make connection using any example software or suggested code.

The routine at this website (SheepDog) appears to use a library I don't have, Ethershield. So I can't compile the code.

BTW, the arp -a now reports Arduno at 192.168.0.102 and type "dynamic" so I guess this is progress...but still not listed as an attached device by the router. All lights flashing happily. Still have not achieved connection with any software routine, example, etc. '

WHY IS THIS SEEMING SO HARD?? Surely there is something simple, stupidly wrong with what I'm doing.

To zoomkat-
I did exactly as you suggested, but was unable to achieve connection. So I don't know what's wrong, but it is not "doing random things rather than using provided code". I do surely appreciate your help and suggestions, btw. I am just getting a bit frustrated.

The arp -a does now also give the Arduino a MAC address de-ad-be-ef-fe-ed.

Below is some simple server code you can try on your lan using your pc connected to the router. You need to change the 1 to a 0 in the ip address and url like you have previuosly done to match your router.

// for W5100 ethernet shield
// the IP address will be dependent on your local network/router
// port 80 is default for HTTP, but can be changed as needed
// use IP address like http://192.168.1.102:84/ in your brouser

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

int x=0;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 102 };
Server server(84);

void setup()
{
  // start the server
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  // listen for incoming clients
  Client client = server.available();
  if (client) {
     while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // see if HTTP request has ended with blank line
        if (c == '\n') {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          
          //meta-refresh page every 2 seconds
          x=x+1;
          client.print("<HEAD>");
          client.print("<meta http-equiv=\"refresh\" content=\"2\">");
          client.print("<TITLE />Zoomkat's meta-refresh test</title>");
          client.print("</head>");
          client.print("page refresh number ");
          client.println(x);
          client.println("
");
          client.println("
");
                             
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("
");
            }
          break;
           }
        }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
  }
}