im able to use my arduino+ardu eth in my home sub net but i'm not able to find the public ip of my device(arduino ethenet shield).
I know that the ip is dynamic, but is another problem, becouse if i dont switch off my modem the ip dont change, i think, may change only the route(another problem again).
for example, in my sub net my ip is 192.168.0.xxx.
with my browser i can pilot arduino sendig comand at http:\192.168.0.xxx
BUT, if i go out of my sub net i don know what is my address.
I hope that some one can explain me how to find the public address.
im able to use my arduino+ardu eth in my home sub net but i'm not able to find the public ip of my device(arduino ethenet shield).
That's because it doesn't have one, most likely. If you have a router, the router has a public IP address. The Arduino does not. The router needs to route data for a particular port to the Arduino.
that why i have reconfigured the port 80 of my router.
but now i ask you, how can i find the ip of my router?
Because i think it is different from public ip of my pc.
And when i know the ip of my router, what I have got to do?
I'm trying to use the example "web server":
Can you say me all passages to ping the ardu server from a remote station beginning from "web server" ?
For the dynamic ip there is no problem, suppose that the program have to run just one time.
Are you asking how you can find the public IP of your router? From any computer inside your network go to http://www.whatismyip.com and it will tell you.
If you want to access your Arduino from the Internet then in your router you would add a rule to forward TCP port 80 traffic from the public interface to the IP address of your Arduino. Different routers do this different ways; if you can't figure it out let us know the model # of your router and we'll try to help.
check the site - www.no-ip.com - you can get a real hostname that maps onto your router.
Forward the router-port to your arduino -
The Arduino must have a fixed IP address in your local network (outside your DHCP range)
This are all "ideas", i need pratical advice for find my ip
Once again, which IP address are you wanting to find, the IP address assigned to the arduino ethernet shield, the LAN IP address of your router, or the WAN IP address of the router which the outside world uses to connect to your router?
To find the router WAN IP address you can 1). go to your router's setup application and see the assigned WAN IP address there, 2). write some code to parse the return info from the http://www.whatismyip.com site, or use the www.no-ip.com service to do the work for you. Study up on these options.
sketch_mar07a.cpp:10:1: error: ‘EthernetClient’ does not name a type
sketch_mar07a.cpp: In function ‘void setup()’:
sketch_mar07a.cpp:15:25: error: no matching function for call to ‘EthernetClass::begin(byte [6])’
/usr/share/arduino/libraries/Ethernet/Ethernet.h:16:8: note: candidates are: void EthernetClass::begin(uint8_t*, uint8_t*)
/usr/share/arduino/libraries/Ethernet/Ethernet.h:17:8: note: void EthernetClass::begin(uint8_t*, uint8_t*, uint8_t*)
/usr/share/arduino/libraries/Ethernet/Ethernet.h:18:8: note: void EthernetClass::begin(uint8_t*, uint8_t*, uint8_t*, uint8_t*)
sketch_mar07a.cpp:24:6: error: ‘client’ was not declared in this scope
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x04, 0x16 };
char noipServer[] = "https://dynupdate.no-ip.com";
EthernetClient client;
void setup() {
Serial.begin(9600);
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
while(true);
}
//Give time to initilize:
delay(2000);
if(client.connect(noipServer, 80)){
Serial.println("Connected to noip");
client.println("GET /nic/update?hostname=johndoe.no-ip.org HTTP/1.0");
client.println("Host: dynupdate.no-ip.com");
client.println("Authorization: john.doe@gmail.com:mypassword");
client.println("User-Agent: Johns Arduino Client/0.0 john.doe@gmail.com");
client.println();
//Wait for response
while(client.connected())
{
// stay in this loop until the server closes the connection
while(client.available())
{
// The server will not close the connection until it has sent the last packet
// and this buffer is empty
char read_char = client.read();
Serial.write(read_char);
}
}
// close your end after the server closes its end
client.stop();
}
}
void loop() {
}
sketch_mar07a.cpp:10:1: error: ‘EthernetClient’ does not name a type
sketch_mar07a.cpp: In function ‘void setup()’:
sketch_mar07a.cpp:15:25: error: no matching function for call to ‘EthernetClass::begin(byte [6])’
You need to address the issues in the order that they are listed. Which version of the IDE are you trying to compile this code on?
When I try compiling it on 1.0, the only "error" I get is:
Binary sketch size: 12984 bytes (of a 30720 byte maximum)