WiFi Shield periodic communication error

Hi all!
I have a Arduino Leonardo board with WiFi Shield. I updated the WiFi Shield to the 1.1.0 firmware version (latest).

I compiled and downloaded the following sketch, lightly derived from the "WiFi UDP Send and Receive String" sketch.

/*
  WiFi UDP Send and Receive String
 
 This sketch wait an UDP packet on localPort using a WiFi shield.
 When a packet is received an Acknowledge packet is sent to the client on port remotePort
 
 Circuit:
 * WiFi shield attached
 
 created 30 December 2012
 by dlf (Metodo2 srl)

 */


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

int status = WL_IDLE_STATUS;
int keyIndex = 0;            // your network key Index number (needed only for WEP)

/* ===== My changes - BEGIN ===== */
char ssid[] = "Kraun"; //  your network SSID (name) 
char pass[] = "kraun_test";    // your network password (use for WPA, or use as key for WEP)
unsigned int localPort = 6454;      // local port to listen on
uint8_t localIp[4] 	   = {  10,   3,   2,   205};
/* ===== My changes - END ===== */

char packetBuffer[255]; //buffer to hold incoming packet
char  ReplyBuffer[] = "acknowledged";       // a string to send back

WiFiUDP Udp;

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600); 
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  
  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present"); 
    // don't continue:
    while(true);
  } 

/* ===== My changes - BEGIN ===== */
  WiFi.config(localIp);
/* ===== My changes - END ===== */
  
  // attempt to connect to Wifi network:
  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:
    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(Udp.begin(localPort));  
}

void loop() {
    
  // if there's data available, read a packet
  int packetSize = Udp.parsePacket();
  if(packetSize)
  {   
    Serial.print("Received packet of size ");
    Serial.println(packetSize);
    Serial.print("From ");
    IPAddress remoteIp = Udp.remoteIP();
    Serial.print(remoteIp);
    Serial.print(", port ");
    Serial.println(Udp.remotePort());

    // read the packet into packetBufffer
    int len = Udp.read(packetBuffer,255);
    if (len >0) packetBuffer[len]=0;
    Serial.println("Contents:");
    Serial.println(packetBuffer);
    
    // send a reply, to the IP address and port that sent us the packet we received
    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
    Udp.write(ReplyBuffer);
    Udp.endPacket();
   }
}


void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}

I'm trying to establish an UDP connection between the Arduino hardware and a PC, connected directly to an access point. Running the example, the communication is established but every about 1 minute the WiFi Shield Communication Error LED turns on for about 5 seconds; obviously during this time the communication is down. This behaviour is independent from the amount of data exchanged on the wireless network (I used a simple utility that sends "test" string every 5 seconds or 1 second).

Any help will be appreciated. Thanks.

It may be local interference or noise. Have you tried changing to a different wireless channel on your router?

Yes, I did. I used a free utility to monitor the network load (inSSIDer 3) in order to find the free wifi channel. So I'm pretty sure that the used channel is free.

The strange fact is that this behaviour seems to be periodic: one time every 1 minute, independent by the network traffic.

Another question concerns of when the WiFi Shield Error Communication Red LED is switched on. What are the causes for this signalation?

Thank you for the help.

The red LED comes on if the wifi shield loses a connection with the router. I found that while testing the wifi shield. If I disable the router's radio, the green LED goes off, and the red LED comes on. When I enable the radio again, the red LED goes off, and the green LED comes back on.

Ok, thank you. This means that this LED is switched on only during communication losses. Now the question is why the communication is lost with a 1 minute period.

Any ideas are welcome! Thank you in advance.

Do you have access to another wireless router? Maybe a friend or relative? See if it is the wifi shield or the router that is intermittent.

Do you have problems with any other device on that wireless network?

This test is not so easy: I'll try to arrange another set.

For the second question, I used my wireless card embedded in my PC where run the "inSSIDer 3" application. The signal level is always high and constant and seems that the PC never unlock the wifi network.
Moreover, I used Wireshark to monitor the UDP traffic on the PC wireless card and it seems to be continuous during the Arduino WiFi Shield communication loss.