Ethernet shield not seen by uverse router

I am currently using the Arduino software ver 1.0.1 (Windows) with an UNO R3 and the ethernet w5100 ethernet shield with sd card.

The shield works fine on my local network but when I try to access from the internet(outside my home network) I cannot get to the shield.
I know I need to port forward but the shield is not seen by the router. I have even tried using a ethernet switch behind the router.
There is no way to add the shield manually that I can find.

Could be a couple reasons for that.

  1. You must redirect the public ip to your ethernet shield localnet ip.
  2. Many ISPs block port 80 from the internet.

The best way to check #2 is to try to access your router setup. Normally, you can use a web browser to access the setup page on your router. If you can do that from your localnet using the public ip and can't from the internet, then you are probably being blocked.

edit: Sometimes, there are ways around the block.

I have changed it to 8083 and still will not work......I first have to get the router to see the shield.....on the log it shows communication on the router 1 port when I access by local network

Then you should put the ethernet shield ip in the DMZ of your router. That should perform a NAT from the router's public ip to the localnet ip of the shield.

I have security cameras I access over the internet so I know it is possible to use the router to access my home network....the security system is seen on the router browser page

(Then you should put the ethernet shield ip in the DMZ of your router. That should perform a NAT from the router's public ip to the localnet ip of the shield)

Cannot do anything untill the router sees the shield

blacks1960:
(Then you should put the ethernet shield ip in the DMZ of your router. That should perform a NAT from the router's public ip to the localnet ip of the shield)

Cannot do anything untill the router sees the shield

What does that mean? I do not know about your routers, but none of mine have eyes. Did you not say that you could connect on the localnet, just not on internet? Is the arduino connected to a port on the router? And your computer is connected to a different port on the router?

When I go to the router browser page I can see all my computers,printers,and security listed as devices.
It does not list (see) the shield which is plugged into the back of the router. Computers and printer are wireless...security is plugged into back of router.

blacks1960:
When I go to the router browser page I can see all my computers,printers,and security listed as devices.
It does not list (see) the shield which is plugged into the back of the router. Computers and printer are wireless...security is plugged into back of router.

Then how does the router know how to find the arduino for localnet requests?

edit: I use Mikrotik routers with the ethernet shield and have great results. Wireless/wired routing is what I do for a living. I have commercial static ips tho. That avoids that port 80 block challenge.

I have no idea.

I have looked for two days for an answer and the only thing that was mentioned was to add a ethernet switch behind the router to get the router to recognize the shield.

How is your router set up? Sometimes if the router is set as a switch, you can access ip addresses that you would not normally be able to access. Is your Arduino assigned an ip that is in the subnet of the wired interface?

The Arduino is assigned an ip that is in the subnet .
Not sure what you mean is router set as a switch.

Without your code nobody will be able to help you much if you have code errors. How is the ethernet shield IP address being generated?

I assigned th IP address

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

// MAC address just has to be unique. This should work
byte mac[] = { 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX };
// The IP address will be dependent on your local network:
byte ip[] = { 192, 168, 1, 177 };
EthernetServer server(8083);

int numPins = 1;
int pins[] = {3};
int pinState[] = {0};
char line1[100];

void setup()
{
  for (int i = 0; i < numPins; i++)
  {
     pinMode(pins[i], OUTPUT);
  }
  Serial.begin(9600);
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  EthernetClient client = server.available();
  if (client) 
  {
    while (client.connected()) 
    {
      readHeader(client);
      if (! pageNameIs("/"))
      {
        client.stop();  
        return;
      }
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/html");
      client.println();

      // send the body
      client.println("<html><body>");
      client.println("<h1>Output Pins</h1>");
      client.println("<form method='GET'>");  
      setValuesFromParams();
      setPinStates();
      for (int i = 0; i < numPins; i++)
      {
         writeHTMLforPin(client, i);
      }
      client.println("<input type='submit' value='Update'/>");
      client.println("</form>");
      client.println("</body></html>");

      client.stop();            
    }
  }
}

void writeHTMLforPin(EthernetClient client, int i)
{
  client.print("<p>Pin ");
  client.print(pins[i]);  
  client.print("<select name='");
  client.print(i);
  client.println("'>");
  client.print("<option value='0'");
  if (pinState[i] == 0)
  {
    client.print(" selected");
  }
  client.println(">Off</option>");
  client.print("<option value='1'");
  if (pinState[i] == 1)
  {
    client.print(" selected");
  }
  client.println(">On</option>");
  client.println("</select></p>");  
}

void setPinStates()
{
  for (int i = 0; i < numPins; i++)
  {
     digitalWrite(pins[i], pinState[i]);
  }
}

void setValuesFromParams()
{
  for (int i = 0; i < numPins; i++)
  {
    pinState[i] = valueOfParam(i + '0');
  }
}

void readHeader(EthernetClient client)
{
  // read first line of header
  char ch;
  int i = 0;
  while (ch != '\n')
  {
    if (client.available())
    {
      ch = client.read();
      line1[i] = ch;
      i ++;
    }
  }
  line1[i] = '\0'; 
  Serial.println(line1);
}

boolean pageNameIs(char* name)
{
   // page name starts at char pos 4
   // ends with space
   int i = 4;
   char ch = line1[i];
   while (ch != ' ' && ch != '\n' && ch != '?')
   {
     if (name[i-4] != line1[i])
     {
       return false;
     }
     i++;
     ch = line1[i];
   }
   return true;
}

int valueOfParam(char param)
{
  for (int i = 0; i < strlen(line1); i++)
  {
    if (line1[i] == param && line1[i+1] == '=')
    {
      return (line1[i+2] - '0');
    }
  }
  return 0;
}

I assigned th IP address

Great. Now, how is the router supposed to know that? You have to tell the router that that address is ALWAYS the Arduino's address, and that it should NOT assign that IP address to another device in your network.

Below is some client test code you can try. Your choise of mac address might cause issues with the router.

//zoomkat 2-13-12
//DNS and DHCP-based web client test code
//for use with IDE 1.0
//open serial monitor and send an e to test
//and to see test result
//for use with W5100 based ethernet shields
//browser equivelant URL: 
// http://web.comporium.net/~shb/arduino.txt
//note that the below bug fix may be required
// http://code.google.com/p/arduino/issues/detail?id=605 

#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
char serverName[] = "web.comporium.net"; // zoomkat's test web page server
EthernetClient client;

//////////////////////

void setup(){
  Serial.begin(9600); 
  Serial.println("DNS and DHCP-based web client test 2/13/12"); // so I can keep track of what is loaded
  Serial.println("Send an e in serial monitor to test"); // what to do to test
  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }
  // print your local IP address:
  Serial.print("Arduino IP address: ");
  for (byte thisByte = 0; thisByte < 4; thisByte++) {
    // print the value of each byte of the IP address:
    Serial.print(Ethernet.localIP()[thisByte], DEC);
    Serial.print("."); 
  }
  Serial.println();
  Serial.println();
}

void loop(){
  // check for serial input
  if (Serial.available() > 0) //if something in serial buffer
  {
    byte inChar; // sets inChar as a byte
    inChar = Serial.read(); //gets byte from buffer
    if(inChar == 'e') // checks to see byte is an e
    {
      sendGET(); // call sendGET function below when byte is an e
    }
  }  
} 

//////////////////////////

void sendGET() //client function to send/receive GET request data.
{
  if (client.connect(serverName, 80)) {  //starts client connection, checks for connection
    Serial.println("connected");
    client.println("GET /~shb/arduino.txt HTTP/1.0"); //download text
    client.println(); //end of get request
  } 
  else {
    Serial.println("connection failed"); //error message if no client connect
    Serial.println();
  }

  while(client.connected() && !client.available()) delay(1); //waits for data
  while (client.connected() || client.available()) { //connected or data available
    char c = client.read(); //gets byte from ethernet buffer
    Serial.print(c); //prints byte to serial monitor 
  }

  Serial.println();
  Serial.println("disconnecting.");
  Serial.println("==================");
  Serial.println();
  client.stop(); //stop client

}

You are suppose to assign the address in the code!

I X out the mac addresses

Thanks Zoomcat......I do not understand what that code did but now the shield is listed under my devices on the router browser page ...thanks.