Show Posts
Pages: 1 ... 166 167 [168] 169 170 ... 403
2506  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield + arduino as a CLIENT, please help! on: June 15, 2013, 12:29:53 pm
I see it now. That is a virtual hosting server, so you will need to send the Host parameter with the GET request. See reply #9.

edit: If you want to know how I can tell if it is a virtual server or not, here is how.
Quote
C:\Documents and Settings\user>nslookup www.valerioantonangeli.it
Server:  ip68-105-28-16.at.at.cox.net
Address:  68.105.28.16

Non-authoritative answer:
Name:    valerioantonangeli.it
Address:  46.4.96.70
Aliases:  www.valerioantonangeli.it
Then go to your web browser and try to load http://46.4.96.70 . It will not be your web site. Instead it is normally your virtual hosting company's website.
2507  Using Arduino / Networking, Protocols, and Devices / Re: Arduino.cc Wifi Shield Connection Refused on: June 15, 2013, 06:14:07 am
I don't agree with this. That isn't bad at all.
Quote
The signal level  at -65dbm is not great.

I do agree with this.
Quote
The error message indicates the connection attempt is being refused (actively), rather than timing out.
Are you sure there is not another device responding to the pings? That "connection refused" is a firewall response, and the w5100 has no firewall, (edit:) and I presume the wifi shield has no firewall either. Disconnect the Arduino from your localnet and try the ping again.

BTW, my routers do a similar check when assigning localnet ips with dhcp. They do a ping to the ip about to be assigned to a new client, and if a device responds within a half second, it marks that ip lease as "busy", and gets another free ip from the ip pool.

edit: I use PuTTY in RAW mode to test http connections.
2508  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield + arduino as a CLIENT, please help! on: June 15, 2013, 05:44:07 am
I don't think it has anything to do with your files uploaded. I can't reach your site with a web browser. I used nslookup to determine the status of your domain name, and I get no dns resolution for your domain.
2509  Using Arduino / Networking, Protocols, and Devices / Re: Serial Monitor Print From Outside Server on: June 15, 2013, 01:17:58 am
You omitted part of the request.
Code:
  // replace this
   client.println("GET /guardmon_report.php");
   // with this.
   client.println("GET /guardmon_report.php HTTP/1.0");
The rest of your code is "perfect world" programming. It will work as long as nothing goes wrong. Here is where it will fail if the connection breaks. It will never exit these loops
Code:
 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
  }
The code on this page has a timeout that prevents the lockup in that loop.
http://playground.arduino.cc/Code/WebClient
Maybe you can include that part in your sketch.
2510  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield + arduino as a CLIENT, please help! on: June 14, 2013, 01:32:35 pm
If it is a virtual hosting server, then it requires a more complex request. Try loading your website home page. I couldn't load that url in your first post (the Host below).
Code:
client.println(F("GET / HTTP/1.1"));
client.println(F("Host: www.valerioantonangeli.it"));
client.println(F("Connection: close\r\n"));
2511  Using Arduino / Programming Questions / Re: Arduino Uno R3 being used as a web server periodically failing on: June 14, 2013, 01:24:16 pm
Does that mean it ran almost 2 hours and it still hasn't failed? Or it ran almost 2 hours and then failed.

I use this. It works well.
http://playground.arduino.cc/Code/WebServerST
2512  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield + arduino as a CLIENT, please help! on: June 14, 2013, 08:39:46 am
I am fortunate enough to have static public ips. If you have a static public ip available, then you can test it using your public ip. If not, you will probably be stuck with my code above. It should get you an ip address, etc.

Or you could set your router localnet ports "static" by disabling the dhcp server on that interface. It will be a private ip localnet, but the theory is the same. Once you have a working ip, all else is pretty much the same, with the exception that a static ip does not need to call Ethernet.maintain() to renew your ip.
2513  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield + arduino as a CLIENT, please help! on: June 14, 2013, 08:09:23 am
If the school does not have a dhcp server, then you can assign a static ip if the Ethernet.begin(mac) call fails. Something like this.
Code:
if(!Ethernet.begin(mac)) {
  Serial.println(F("DHCP failed. Setting static ip."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
}
Serial.println(Ethernet.localIP());
2514  Using Arduino / Networking, Protocols, and Devices / Re: Serial Monitor Print From Outside Server on: June 14, 2013, 05:52:41 am
Quote
But when I substitute the: char serverName[] = "web.comporium.net";    which is used in the example code for my: IPAddress server(XX,XX,XX,XX);      code, and make the necessary changes in my GET line to pull the information I want from the website, it almost always hangs up.
Hangs up where? What is the last thing you see on the serial monitor when it hangs up?
2515  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield + arduino as a CLIENT, please help! on: June 14, 2013, 05:31:00 am
This works for me. Sends a request and reads the server response every 30 seconds.
http://playground.arduino.cc/Code/WebClient
2516  Using Arduino / Networking, Protocols, and Devices / Re: Connect() fails using Ethernet Board + Ethernet Library on: June 13, 2013, 03:04:39 pm
Did you allow tcp port 14531 through your Windows firewall?
2517  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet lockups/freezes/non responsive on: June 12, 2013, 06:02:43 am
@Artie: Good suggestion normally, but it is probably not a memory problem.
Quote
The hardware is an Arduino Mega 2560 with an R3 ethernet shield.
More than likely it is a freeze in the while(client.connected()) loop. If the server code does not receive the double cr/lf (blank line) from the client, which some port scanners do not send, the code locks up without the timeout code.

edit: If the connection breaks (fails) during the request send, that will have the same effect. If the server code does not receive the blank line or the close, it freezes there.
2518  Using Arduino / Programming Questions / Re: Ethernet Connection with Arduino on: June 12, 2013, 05:55:33 am
Part of your problem may be the format of your request. The request must end with a blank line. Also, is the file in a directory named /localhost/xampp?
Code:
if(client.connect(server, 80))
{
    Serial.println("Connected");
    client.println("GET /localhost/xampp/rec.php?name=Mahmoud HTTP/1.1");
    // send blank line after Connection: close
    client.println("Connection: close\r\n");
}
Here is my client code.
http://playground.arduino.cc/Code/WebClient
2519  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet lockups/freezes/non responsive on: June 12, 2013, 05:25:10 am
Hope it works for you. If it doesn't, try to find out where in the code it is failing and let me know. The last line that appears on the serial monitor before the crash usually helps troubleshoot it.
2520  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet lockups/freezes/non responsive on: June 11, 2013, 04:51:47 am
Try this web server code. It has a few error checking routines that help prevent the server from locking up.
http://playground.arduino.cc/Code/WebServerST
Pages: 1 ... 166 167 [168] 169 170 ... 403