Arduino identification issues at router

Hi,

I recently bought the ethernet sheild and have tried a few examples on data logging and using a web brouser to monitor an ananlogue input and switching LEDs on and off.

When I enter the IP address of my Arduino UNO the Web page appears and works as expected, but the problem I'm having is I'm unable to access the device from outside the local network. When entering my home router the Arduino does not appear in my active devices and therefore can not use port forwarding options.

I have since tried this with 2 different routers with the same issue occurring. Any advice or help would be much appreciated

Thanks

(deleted)

Yes are on the same subnet.

I set up a port forwarding option with port (80) and then set the intended device as the IP of the Adruino but this still doesn't allow any communication.

I believe the first time I entered my router settings the sheild appeared but since then it doesn't appear. I am still able to control the arduino using the local network. I reset my router back to default settings incase I had altered something I shouldn't have.

The 2 things that concern me is the first attempt I used pin 13 for my LED before realising this was used by the sheild and then again I swapped to pin 4 which i believe is the SD card uses. By setting these pins to output in earlier sketch could this have damage the sheild? (although i can still communicate with it).

Hi, many ISPs block port 80 to prevent home users from hosting a web server. Try using other ports first to see if it works.

Thank you for the advice, I had to use port 80 as using any other number the sketch wouldn't open at all.

I am now able to see my adruino sketch in the outside world by using a port forwarding option already on the router (HTTP Web Server) the problem I now have is it doesn't function as it does on my local network.

The sketch is a simple LED title with on and off buttons, on local network the buttons will do as the stated, but coming via the external IP/Port No. will show the page, the buttons and will send commands to the address bar, unfortunately the arduino doesn't recieve/responed to the commands. This is probably something obvious that I am now missing, any advice/suggestion would be appreciated.

Thank for your help.

Absee:
Thank you for the advice, I had to use port 80 as using any other number the sketch wouldn't open at all.

You need to change the port in your sketch and then port forward the changed port in your router. If you are unsure whether your ISP is blocking port 80, it is always safer to try it on a different port first.

You will also need to post your code.

(deleted)

One other thing to check for is local loopback. Some home routers don't allow it, so if you're getting to the arduino by typing in 192.168.nnn.nnn and it works, but when you try http://myplace.something it doesn't from the same machine, it could be that loopback isn't allowed. To test, call someone and have them try it or use a cell phone on the provider network. If that works, you'll have to figure out how to enable local loopback to get to it by name or address from the local network.

I had this problem and it took me three days to figure out how to enable the dsl modem.

Hi

I have post the code below, When I use port 80 I can access and control my Arduino over the local network using IP 192.168.1.20. When trying to control it from the outside (31...***/80) world using mobile and a friend tried using laptop the page will open up but no control.

I change the port to 50, 81, 8080, 888 and lastly 1723 but I then lose the ability to see it on my local network and outside world. Here is the code.


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

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

IPAddress ip(192,168,1,20);
IPAddress gateway(192,168,1,254);
IPAddress subnet(255, 255, 255, 0);
EthernetServer server(80);
int led = 5;

void setup() { pinMode(led, OUTPUT);
Ethernet.begin(mac, ip);
server.begin();
Serial.begin(9600);
Serial.println("Server address:");
}

void loop() {
EthernetClient client = server.available();
if (client){
Serial.println("Got a client");
boolean currentLineIsBlank = true;
String buffer = "";
while (client.connected()){
if (client.available()) {
char c = client.read();
buffer+=c;
if (c == '\n' && currentLineIsBlank) {
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
client.print("

Led Control

"); client.print("

"); client.print("

"); client.print(""); break; } if (c == '\n') { currentLineIsBlank = true; buffer=""; } else if (c == '\r') { if(buffer.indexOf("GET /?status=Turn+ON")>=0) digitalWrite(led, HIGH); if(buffer.indexOf("GET /?status=Turn+OFF")>=0) digitalWrite(led, LOW); } else { currentLineIsBlank = false; } } } client.stop(); } } ***************************************************

Thanks for the help.

31...***/80

The correct way to browse a web address on a specific port is for example 31...***:8888, colon not slash. You don't need to enter the port number if you are using port 80, all web pages use port 80 by default. Try entering your external ip address only.

Hi

Thank you for the help, managed to get it working, when i started this exercise I was using :80 but some reason switched to /80. Changed the port to 8080 and used the correct method (:8080) and it works internally and externally. I need to gain a better understanding of networks and ports.

Thanks again