Can't update WiFiShield Firmware

Hey guys,

I'm new to the Arduino WiFiShield, and I really need your help. I've tried to run this script: http://arduino.cc/en/Tutorial/WiFiWebClientRepeating but I couldn't connect to google.com:

Atconnect to WPA SSID: Wlan
Attempting to connect to WPA SSID: Wlan
Connected to wifi
SSID: Cancel
IP Address: 192.168.1.61
signal strength (RSSI):-57 dBm

Starting connection to server...

disconnecting from server.

So, I've read a lot about that problem and some people meant I need to update the firmware. I followed this tutorial: http://flashgamer.com/arduino/comments/how-to-update-the-official-arduino-wifi-shield but I get some error messages in Mac Terminal I don't understand:

Airchen:apple apple$ sudo sh ArduinoWifiShield_upgrade_mac.sh -a /Applications/Arduino.app/Contents/Resources/Java/ -f shield

       Arduino WiFi Shield upgrade
=========================================
Disclaimer: to access to the USB devices correctly, the dfu-programmer needs to be used as root. Run this script as root.

./avr-objcopy: '/Applications/Arduino.app/Contents/Resources/Java//hardware/arduino/firmwares/wifi-shield/wifi_dnld.elf': No such file
./avr-objcopy: '/Applications/Arduino.app/Contents/Resources/Java//hardware/arduino/firmwares/wifi-shield/wifiHD.elf': No such file
****Upgrade WiFi Shield firmware****

ArduinoWifiShield_upgrade_mac.sh: line 33: dfu-programmer: command not found
ArduinoWifiShield_upgrade_mac.sh: line 34: dfu-programmer: command not found
ArduinoWifiShield_upgrade_mac.sh: line 35: dfu-programmer: command not found

Done. Remove the J3 jumper and press the RESET button on the shield.
Thank you!

What am I doing wrong? Thanks so much for your help.

I've read a lot and I'm now 1 step further. I can run the script to upgrade the firmware, but I still get this error in terminal:

ArduinoWifiShield_upgrade_mac.sh: line 33: dfu-programmer: command not found
ArduinoWifiShield_upgrade_mac.sh: line 34: dfu-programmer: command not found
ArduinoWifiShield_upgrade_mac.sh: line 35: dfu-programmer: command not found

I have installed MacPorts (http://www.macports.org) and followed the instruction on the official Arduino Tutorial (http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading). I'm still getting this error (above).

What can I do? Would really love to get some help. I have been trying for hours :(

Ok, i got it. I needed to install the dfu-programmer. That worked fine and I could update the WiFiShield Firmware.

But I get still the following error message:

AtD: Wlan
Attempting to connect to WPA SSID: Wlan
Connected to wifi
SSID: Cancel
IP Address: 192.168.1.61
signal strength (RSSI):-68 dBm

Starting connection to server...

disconnecting from server.

I haven’t changed anything besides the wlan name und the password. My code:

#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiServer.h>
#include <WiFiUdp.h>

/*
 
 This example connects to an unencrypted Wifi network. 
 Then it prints the  MAC address of the Wifi shield,
 the IP address obtained, and other network details.

 Circuit:
 * WiFi shield attached
 
 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe
 */
 #include <WiFi.h>

char ssid[] = "Wlan";     //  your network SSID (name) 
char pass[] = "removedPasswort";  // your network password
int status = WL_IDLE_STATUS;     // the Wifi radio's status

char server[] = "www.google.com";    // name address for Google (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server 
// that you want to connect to (port 80 is default for HTTP):
WiFiClient client;


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);
  } 
  
 // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) { 
    Serial.print("Attempting to connect to WPA SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network:    
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(3000);
  }
   
  Serial.println("Connected to wifi");
  printWifiStatus();
   
  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /search?q=arduino HTTP/1.1");
    client.println("Host: www.google.com");
    client.println("Connection: close");
    client.println();
  }

}




void loop() {
  // check the network connection once every 10 seconds:
    // if there are incoming bytes available 
  // from the server, read them and print them:
  while (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting from server.");
    client.stop();

    // do nothing forevermore:
    while(true);
  }
}


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");
}

void printWifiData() {
  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
    Serial.print("IP Address: ");
  Serial.println(ip);
  Serial.println(ip);
  
  // print your MAC address:
  byte mac[6];  
  WiFi.macAddress(mac);
  Serial.print("MAC address: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);
 
}

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

  // print the MAC address of the router you're attached to:
  byte bssid[6];
  WiFi.BSSID(bssid);    
  Serial.print("BSSID: ");
  Serial.print(bssid[5],HEX);
  Serial.print(":");
  Serial.print(bssid[4],HEX);
  Serial.print(":");
  Serial.print(bssid[3],HEX);
  Serial.print(":");
  Serial.print(bssid[2],HEX);
  Serial.print(":");
  Serial.print(bssid[1],HEX);
  Serial.print(":");
  Serial.println(bssid[0],HEX);

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

  // print the encryption type:
  byte encryption = WiFi.encryptionType();
  Serial.print("Encryption Type:");
  Serial.println(encryption,HEX);
  Serial.println();
}

I’ve downgraded to version 1.0.2 and now it’s working just fine… strange.

I am having the same issue. Can you please give more details on what the solution was?

First I've upgraded the firmware like written above. Then, I've downloaded IDE Version 1.0.2 from http://arduino.cc/en/Main/OldSoftwareReleases and installed it (on my Mac). Then it worked.

Hello everyone,

I tried to follow the instructions to update the Wifi Shield firmware.

But I keep getting this error:

update WiFi shield firmware.jpg