WiFi shield unresponsive after a while

Hi all, I just picked up the WiFi shield and stacked it on top of my Arduino DUE and it connects smoothly to my router. After the connection test I tried to serve a web page using the WiFiWebServer example. Unfortunately this only works sometimes (most of the time it does not). It just seems to respond at random but fails 80 percent of the time (timeout). I've seen some posts on this but not a real solution to this problem. I've updated the firmware to the latest version. Does anyone know how to resolve this?

Are you using arduino official wifi shield?

What client are you using to view the arduino web page?

Hi Liudr, thanks for your reply.

Yes I'm using the official shield as seen here:

I tried a regular browser like Chrome or IE but both come up with the same results. I also tried pinging the WiFi shield and many pings seem to fail, only a small percentage gets back.

I have a shield running on a Mega which has been up and serving a simple web page for the last three days, with a 30 second refresh in the headers.
It responds to pings reliably, even when actively serving a page.
It doesn't like concurrent requests but recovers.
I am not entirely sure what firmware version I am running.
Sadly my Uno just wasn't up to the job.

Before presuming a fault with the firmware or the shield, you should check the bases.
Use the library RSSI function to see what the signal strength is.
Check your environment for sources of (2.4Ghz) radio interference.
Signal quality is expressed as Signal to Noise but unfortunately you need a spectrum analyser to measure the noise.
Check the pins your Arduino board uses to communicate with the shield, are not being used for anything else.

There might be some compatibility issues between DUE and wifi shield. Do you have an Arduino MEGA? I am also using MEGA and my wifi shield R3 with original firmware has been working pretty well as web server except for a few quirks.

I've already checked the signal strength using other devices like mobile phone, laptop etc.. They all show a maximum signal strength so this should not be an issue.

The only additional shield I use is the SM5100B GSM module which is stacked on top of the WiFi shield. I have checked the pin usage and as far as I can see no conflicting pins are used. I rerouted pins 2 and 3 to real Serial RX/TX pins on the DUE board. Maybe I'm wrong and there are conflicts? Tonight I will remove the GSM module and see how the WiFi shield works without it.

I cannot find any posts or other users complaining about the compatibility with the DUE board, so I hope it's not that. Unfortunately I have no Mega board, just UNO's, Leonardo and DUE.

OK, what about removing the GSM shield and then test some basic sketch? The Arduino wifi shield is pretty cheap with antenna. It is a copper trace on the circuit board. If you have other boards on top, you may not get good signal, like a shielding effect, especially considering that most PCB designers will use the copper as ground.

I tried the sample code for the webserver using the DUE and only the WiFi shield and got better results but still nothing near 100 percent (60 maybe 70). Some requests are still timing out (net::ERR_EMPTY_RESPONSE). I'm running out of ideas...

Ok, that's a bit better. What is net::something? I have no idea.

liudr:
Ok, that's a bit better. What is net::something? I have no idea.

It is the message that the browser (Google Chrome) returns when the connection fails.

I see. I have no idea :slight_smile: Have you tried other browsers?

Here are the pins reserved by the shield, as noted in my header files.
You may have to adjust the numbers for your DUE

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

/* Pins Occupied by WiFi shield
WiFi
  SPI occupies UNO pins 
  10 - SS, shield select 
  11 - MOSI, Master Out Slave In 
  12 - MISO, Master In Slave Out
  13 - SCK, Serial Clock
  
SD card 
  4 - SS, Slave Select*/

I don't yet know enough about the electrical stuff to say
which pins MUST be kept clear. Keeping all of the clear
works for me, as they say.

Network protocols I do know about. I think I said elsewhere,
the example web server is not a great place to start learning.
The example code does not conform fully with the HTTP protocol
which means you are in unknown territory.

I am attempting to write a conformant web server but I am not there yet.

Yes I've also tried IE which shows the same result more or less.

Concerning the pins, I've removed the GSM shield so the DUE only uses the WiFi shield so no pin conflicts should occur. As far as I know there are no known conflicts between the GSM module and WiFi module. I agree that stacking the GSM module on top of the WiFi shield might interfere with the signal strength, but even without the GSM shield it's still not stable.

I have quite a lot Arduino stuff laying around here and except for this shield everything works as promised, but this WiFi shield is really disappointing. Also take in to account that this is one of the most expensive shields you can buy.

What arduino ide version are you using?

I'm using IDE version 1.5.2

If you have a mega I would recommend you to try it with 1.0.2 just to see if the wifi shield is defective.

Unfortunately not, but it should work with the DUE.