Arduino WIFI shield

Hello I have a problem with an Arduino Shield. This worked i.e. I was able to send data, but now it is not working i.e. the client.connect(server, 80)fails. I use the router WIFI built in Android Samsung Galactic and the Internet connection is active. I have forgotten something or my (new) wifi shield is broken?

Thanks

John Rossati

hello

The shield is now working, but I do not know why, the only thing I have done is to restart my PC.

John Rossati

I had the same error with the latest version 1.0.5. But it is ok when I use version 1.0.1. Try again!
Good luck, bro!

Thanks htd5

Now is working, therefore I would prefer to use the latest IDE version; unfortunately, after this problem solved, I fell into another (maybe) malfunction e.g. I am unable to receive the site answer after a successful connection.

This fragment works:

...
 while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:    
    status = WiFi.begin(ssid, pass);
    // wait 10 seconds for connection:
    Serial.println(status);
    if (status != WL_CONNECTED) delay(10000);
  }
  Serial.println("Connected to wifi");
  printWifiStatus();
  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  Serial.println(String(server)+ String(" "));
  if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /daarduino.php?arduino=Cumiana&event=Read&value=2.7 HTTP/1.1");
    client.println("Host: arduino.xyz.org"); 
    client.println("Connection: close");
    client.println();
  }
void loop() {
  Serial.println(getFromWEB(client));
  while(true);
}

Instead this is not working:

...
int i =  sendWebRequest(client,"arduino.xyz.org","daarduino.php",String("arduino=Cumiana") + String("&") + String("event=Start") + String("&") + String("value=0"));

}
void loop() {
  Serial.println(getFromWEB(client));
  while(true);
}
int sendWebRequest(WiFiClient client,char address[],char script[],String data) {
    Serial.println("\nStarting connection to server...");
    if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /"+String(script)+"?"+data+" HTTP/1.1");
    client.println("Host: "+String(address));  
    client.println("Connection: close");
    client.println();
  }
  return 0;
}

The problem seems to be due to the connection performed in a function.

John Rossati