Impossible to use wifiClient

Hi, here my code

#include <SPI.h>
#include <WiFi.h>
#include <WiFiClient.h>

char ssid[] = "NUMERICABLE-9B49";
char pass[] = "*******";    // your network password

int status = WL_IDLE_STATUS;
char servername[]="google.com";  // remote server we will connect to

WiFiClient client;

void setup() {
  Serial.begin(9600);
  Serial.println("Attempting to connect to WPA network...");
  Serial.print("SSID: ");
  Serial.println(ssid);

  status = WiFi.begin(ssid, pass);
  if ( status != WL_CONNECTED) { 
    Serial.println("Couldn't get a wifi connection");
    // don't do anything else:
    while(true);
  } 
  else {
    Serial.println("Connected to wifi");
    Serial.println("\nStarting connection...");
    // if you get a connection, report back via serial:
    if (client.connect(servername, 80)) {
      Serial.println("connected");
      // Make a HTTP request:
      client.println("GET /search?q=arduino HTTP/1.0");
      client.println();
    }
    else Serial.println("not connected");
  }
}

void loop() {

}

And there the output :

Attempting to connect to WPA network...
SSID: NUMERICABLE-9B49
Connected to wifi

Starting connection...
not connected

I can’t get the final “connected” output … I don’t understand why arduino can’t connect to google (i try’d with severals servers)
If anyone know how to fix this !

Thanks.

Have you upgraded the firmware? Check with this code after Serial.begin() in your setup. If upgraded, it should show version 1.1.0.

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present"); 
    // don't continue:
    while(true);
  } 

  // check firmware version
  Serial.print(F("Firmware version: "));
  Serial.println(WiFi.firmwareVersion());

Works after upgrading the wifishield. Thx !