Wifi board - no connection to google

Hi all,

As a complete beginner to this, I wonder if someone could point me in the right direction to get me started with my( official) Arduino wifi shield board.

I've loaded the standard WiFiWebClient sketch, and put my SSID and password into the sketch. When I run the Serial monitor I get :

Attempting to connect to SSID: BTHub3-6SS4
Connected to wifi
SSID: BTHub3-6SS4
IP Address: 192.168.1.69
signal strength (RSSI):-38 dBm

Starting connection to server...

disconnecting from server.

Why do I get a connection to wifi but nothing from google as per the sketch? I know I'm missing something simple here, so a pointer from someone familiar with the arduino wifi shield (and a BT home hub?) would be much appreciated!

Thank you for reading

What IDE version are you using?

The IDE version is 1.0.5-r2.

Have you upgraded the wifi shield firmware? Add these lines to your setup.

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

If it doesn't report v1.1.0, you need to upgrade the firmware.

Finally got the WiFi shield to work! - a big thanks to SurferTim for giving me the clue I needed.

Summary for other novices (like me) who struggle with the same problem -

The version of shield firmware is (as SurferTim points out) critical. V1.0.0 will not work with IDE 1.0.5.
Much of the information available online (including the Arduino WiFi tutorial) is at best misleading, out of date or just wrong.

The best way I found to carry out the necessary firmware update is this thread:
WiFi Shield and firmware version - Networking, Protocols, and Devices - Arduino Forum - titled WiFi shield firmware.

Arduino WiFi - Not for the faint hearted !

You're welcome. Good to hear it is working now.

The reason it didn't work is the firmware return values for the client.connect() function have changed with the firmware version 1.1.0. It actually does connect, but the return value is different, so the IDE thinks the connection failed.The IDE v1.0.4 and later have the newer return value evaluation.

If you do not want to upgrade the firmware, you must use an IDE prior to v1.0.4.
IDE v1.0.3 and earlier require firmware v1.0.0.
IDE v1.0.4 and later require firmware v1.1.0.

Just a warning: Once you upgrade the firmware, the earlier versions of the IDE will not work with the new wifi firmware due to the return value difference.

And you are right. The wifi shield is not for the technologically weak of heart.