Go Down

Topic: Updating Firmware on Arduino WiFi shield (Read 4425 times) previous topic - next topic

Hi,

I would like to update the firmware in my Arduino WiFi shield, because it has some issues with the original firmware and updates for it are available at:
https://github.com/arduino/wifishield/commit/241730e88599485367a8f3d1e0d7b11bd163cad5

But I could not find any tutorial explaining on how to update the firmware on the device.
So far I have managed to install the drivers for the AT32UC3A chip which is on the shield and I have installed Flip 3.4.7., but now I am stuck.

Thanks For your help.

jensa

#1
Nov 02, 2012, 01:34 am Last Edit: Nov 02, 2012, 08:42 am by jensa Reason: 1
Spent most of this eve at Bitraf trying to make the official Arduino Wifi Shield to behave properly. One of the Bitraf members has a cool project that involves remote control of servos. He planned to use the Wifi Shield, but it keeps loosing it's connection at random intervals - no pattern to it. I have the same shield that I want to use, so I tried to figure out how to download and install the new firmware from GitHub. I couldn't find any goo description on hwo to do it, so here's how we did it on OSX. It'll be quite similar on Windows and Linux.

1st Download the files from GitHub
Go to https://github.com/arduino/wifishield and either download the ZIP, or use GIT if you're familiar with that

Open terminal and navigate to the folder you want the repository in. Here's how I did it:
mkdir wifishield
cd wifishield/
git init
git remote add wifishield https://github.com/arduino/wifishield.git
git pull wifishield
git checkout master

The installer expects the files to be inside the Arduino-app folder. Copy wifiHD.hex, wifiHD.elf and the other files from the wifishield/firmware/binary folder into /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/firmwares/wifi-shield/ (or where you have your Arduino app).

2nd Grab the Device Firmware Updater
Next is getting the software we'll be using since AVRDUDE does not work with the 32UC3-chip in the wifi-shield. Check out this page http://arduino.cc/en/Hacking/DFUProgramming8U2 for details on installing this on your specific platform. For OSX, it should have been easy like this:

sudo port install dfu-programmer

However, instead we got this:

Error: The installed version of Xcode (2.0orlower) is too old to use on the installed OS version. Version 4.1 or later is recommended on Mac OS X 10.8.

Apparently Apple menat that minutes after releasing XCode 4.6 was a great time for maintenance. https://twitter.com/jenschr/status/264107391434502145 Yay... Some hours later the download commenced and we got it installed. Next we had to install the XCode command line tools http://guide.macports.org/chunked/installing.xcode.html#installing.xcode.lion.43 we were finally ready to go:

sudo port install dfu-programmer

3rd Set the jumper
To program the shield, you'll need to enable the J3 jumper. This isn't marked at all on the shield, but it's also the only jumper there is. (It should have been disabled by the factory.) Just place it across the two pins and you're ready to update the firmware.

4th Upload!
Note that the shield should not be connected to an Arduino. Just plug the correct USB-cable into the Wifi Shield itself without anything else.

You'll use a script from the GitHub download to do the actual uploading: https://github.com/arduino/wifishield/blob/master/firmware/scripts/ArduinoWifiShield_upgrade_mac.sh

cd /Fra PC/arduino/wifishield/firmware/scripts/ArduinoWifiShield_upgrade.sh
sudo sh ArduinoWifiShield_upgrade_mac.sh -a /Applications/Arduino.app/Contents/Resources/Java/ -f shield

5th Remove the jumper
Once the upgrade when through, remove the jumper and set it on just a single pin.


Useful links found while researching this:
http://mitchtech.net/arduino-usb-hid-keyboard/ (good info on the DFU programmer)
http://arduino.cc/en/Hacking/DFUProgramming8U2 (Official page on installing DFU for other platforms)

jensa

Got it cleaned up here:
http://flashgamer.com/arduino/comments/how-to-update-the-official-arduino-wifi-shield

J

Hi,
I am trying to do this on Windows. And all it says on all the guides
Quote
Windows: use flip to upload the hex file to your board


But the problem I have is that I can't find the chip on the list of devices to be able to do that.
Here is the list I get on FLIP:

AT89C5115       AT89C51AC2       AT89C51ED2     AT89C51RD2       AT89S58         AT90USB1286    AT90USB82
AT89C5130       AT89C51AC3       AT89C51IC2      AT89C51RE2       AT89S64         AT90USB1287    ATmega16M1
AT89C5131       AT89C51CC01     AT89C51ID2      AT89C51SND1     AT90CAN128    AT90USB162     ATmega16U2
AT89C5132       AT89C51CC02     AT89C51RB2     AT89C51SND2     AT90CAN32      AT90USB646     ATmega16U4
                      AT89C51CC02     AT89C51RC2     AT89D54            AT60CAN64     AT90USB647      ATmega32C1

ATmega32M1    ATmega64M1        ATxmega128B3      ATxmega256A3BU    ATxmega384C3      ATxmega64B3
ATmega32U2    ATxmega128A1U   ATxmega128C3      ATxmega256A3U      ATxmega64A1U     ATxmega64C3
ATmega32U4    ATxmega128A3U   ATxmega16A4U      ATxmega256C3       ATxmega64A3U     
ATmega32U6    ATxmega128A4U   ATxmega16C4        ATxmega32A4U       ATxmega64A4U
ATmega64C1    ATxmega128B1     ATxmega192A3U     ATxmega32C4         ATxmega64B1


Which one should I choose I tried most of them and when I try to connect it says : "Could not open USB device".



Hi,
I am trying to do this on Windows. And all it says on all the guides
Quote
Windows: use flip to upload the hex file to your board


But the problem I have is that I can't find the chip on the list of devices to be able to do that.
Here is the list I get on FLIP:

AT89C5115       AT89C51AC2       AT89C51ED2     AT89C51RD2       AT89S58         AT90USB1286    AT90USB82
AT89C5130       AT89C51AC3       AT89C51IC2      AT89C51RE2       AT89S64         AT90USB1287    ATmega16M1
AT89C5131       AT89C51CC01     AT89C51ID2      AT89C51SND1     AT90CAN128    AT90USB162     ATmega16U2
AT89C5132       AT89C51CC02     AT89C51RB2     AT89C51SND2     AT90CAN32      AT90USB646     ATmega16U4
                      AT89C51CC02     AT89C51RC2     AT89D54            AT60CAN64     AT90USB647      ATmega32C1

ATmega32M1    ATmega64M1        ATxmega128B3      ATxmega256A3BU    ATxmega384C3      ATxmega64B3
ATmega32U2    ATxmega128A1U   ATxmega128C3      ATxmega256A3U      ATxmega64A1U     ATxmega64C3
ATmega32U4    ATxmega128A3U   ATxmega16A4U      ATxmega256C3       ATxmega64A3U     
ATmega32U6    ATxmega128A4U   ATxmega16C4        ATxmega32A4U       ATxmega64A4U
ATmega64C1    ATxmega128B1     ATxmega192A3U     ATxmega32C4         ATxmega64B1

Which one should I choose I tried most of them and when I try to connect it says : "Could not open USB device".



I just wrote a simple step by step tutorial for how to upgrade Arduino WIFI shield on windows by using AVR32 studio. Here's the link.
http://www.dfrobot.com/community/2012/11/how-to-upgrade-arduino-wifi-shield-firmware-on-windows/
Hope it's helpful!

arkkitekktura

I followed the steps but I am getting this error, any ideas?

       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****

Error opening the file.
Something went wrong with creating the memory image.

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

arkkitekktura

Sorry, I actually manage to do the update by modifying the location of the files not found previously, shield is working as expected now.

Go Up