Wifi shield: does it (really) work?

Dear Gurus, I know this have been addressed before but after struggling for weeks to have a STABLE wifi connection (with no success at all) I decided to raise the point again and see if somebody can help me.
So here is the full story:

Setup:
Official Arduino Uno R3 (recently bought)
Official Arduino Wifi Shield (recently bought so should be up to date...)
Powered with a 5V 1A Power Supply
Connected to a Windoes XP PC, through the USB port, running Hyperterminal (to see what's happening)
Good and Stable Wifi signal

Sketch:
Original Wifi Example WiFiWebClientRepeating (by Tom Igoe) with a minor modification in order to count how many times I was really able to communicate with the server (code attached).

Problem:
It isn't stable, sometimes it run till Counter > 5000 (several hours) and sometimes it stops after no more than 10 interactions.
Since my project (weather station) involves leaving the setup running unattended (powered by solar panels) in a difficult to access place, resetting is not an option.

Questions:
1 - Is there any way to make it work for ever as it should? What am I missing?
2 - As an option, is there a way to code something to start all over again once I detect the connection has failed several times?
3 - is there an easy way to get which Wifi firmware version I'm running?

Many thanks in advance for your (for sure) valuable help

Regards from Brasil !!!

WifiWebClientRepeatingModifiedBySS.ino (3.92 KB)

My first question is almost always the same. Do you have a SD card in the shield's slot?

I have a repeating WebClient sketch in the playground for the ethernet shield, but once the connection is established, the protocol should be the same. Maybe you can get some ideas from it.
http://playground.arduino.cc/Code/WebClient

edit: You may need to add a reconnect function for the Wifi shield. The ethernet shield will reconnect on its own if the physical connection is interrupted (pulling out the CAT5 from the ethernet shield jack). That generates a "Timeout" message on the serial monitor.

Hi Tim, thank you very much for your prompt response.

Answer to your question, no, i don't have an SD card on the shield.

Will anything change if I would?

Cheers!

simon_schvartzman:
Hi Tim, thank you very much for your prompt response.

Answer to your question, no, i don't have an SD card on the shield.

Will anything change if I would?

Cheers!

Only a minor change in the setup() function. I disable the network device SPI before calling SD.begin(4). I always start the SD first because, in many of my sketches, the setup data for the network is on the SD.

edit: You should be able to modify my ethernet shield example easily. Change the Ethernet.begin() to your wifi startup function call, and it should work fine.

Do not be afraid to torture it while testing. Do the stuff you would expect to happen in the real world, like the access point failing and rebooting while the wifi shield is connected. You will probably need to run the wifi connection routine in that case.

Hello
my wifi shield doesn't work
i want to update the firmware
how to update the firmware of my arduino wifi shield ?

Maybe its not what you need but why instead of using expensive wifi shields etc just don't buy something like asus eee pc for 30$ from ebay.
It has wifi,bluetooth,enough space,battery.
Connect your arduino with the usb cable and just send the data form arduino to the pc.
Then you can send this data to everywhere,store,process etc..
For my robot I decided to use eee pc+arduino for communication because it was 10x cheaper and 10xbetter then buying 3G shield,wi-fi shield,sd card etc...
And it is very reliable solution