Monday, June 1, 2015

Upgrading Arduino WiFi Shield Firmware

I have a couple of new wifi projects I'm working on, and was getting the message to upgrade my firmware on the WiFi shield, as well as the browser was not able to load the web page on the Arduino. I've tried upgrading firmware before, with unhappy results, as the firmware files on Github (where most of the instructionals send you) were defective and bricked my shield. I just finished upgrading 3 shields, including the one that was bricked, so I'm confident these instructions work.

How do you know if you have a problem?

The following code in the example wifi webserver sketch will send a message to the Serial Monitor that it's time for a firmware upgrade:

  String fv = WiFi.firmwareVersion();
  if ( fv != "1.1.0" )
    Serial.println("Please upgrade the firmware");

If it is out of date, you'll need a couple of things:

  • USB cable with mini-B plug (Playstation3) not micro-B (Kindle).
  • Atmel Flip Software
  • wifi firmware files (\libraries\WiFi\extras\binary - no need to download) 

Find the jumper on your wifi shield (should be disabled) and enable it (before plugging in the cable).

Plug the mini-USB cable into the wifi shield. I recommend having the WiFi shield plugged into a unpowered Arduino to prevent static issues. Plug the other end of the mini-USB into your computer.

Set your path to include the directory where batchisp.exe (from the Flip install) is located. Mine happened to be C:\Program Files (x86)\Atmel\Flip 3.4.7\bin

To do this, just open a command line windows and type:

path=%path%;C:\Program Files (x86)\Atmel\Flip 3.4.7\bin

the cd to the folder where your wifi firmware files are located.

cd yourarduinofolder\libraries\WiFi\extras\binary

in the command line window, enter:

batchisp.exe -device AT32UC3A1256 -hardware usb -operation erase f memory flash blankcheck loadbuffer wifi_dnld.elf program verify start reset 0

you should see the following:

Shield responds with solid Blue LED.
Press the shield reset button.  Blue LED extinguishes.
Unplug the mini-USB cable and plug it back in again.

Now type the following in the command line window:

batchisp.exe -device AT32UC3A1256 -hardware usb -operation erase f memory flash blankcheck loadbuffer wifiHD.elf program verify start reset 0

you should see the following:

Press the Shield reset button.
Remove the short from J3
Unplug the micro-USB cable

Now when you upload the wifi server example, you will no longer get the out of date firmware message, and your web browser will be able to connect to the arduino ip address shown in the serial monitor.

Thanks to the instructions at which helped greatly.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...