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.
You must redirect the public ip to your ethernet shield localnet ip.
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.
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 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?
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
}