I had been following hostap linux driver development, and often got frustrated by the broken pieces information about upgrading flash firmware. I decided to document what I had found out here in this page.
I stopped following the development of hostap since 2004. However it appears many people are still visiting this page. I decide to maintain this page as long as the interest is there. If there is anything you like me to pay attention, please send me a private email. I may skip reading postings on hostap mailing list.
Intersil Prism chipsets have been widely used by many vendors in many models. Examples include Dlink DWL-520, Netgear MA311, Linksys WPC11, etc. A good source to find out Intersil prism based products is to perhaps browse through all the success (or failure) stories collected by me.
This page only covers firmware upgrade on flash. It is possible to download firmware to the RAM after system boots up with so-called RAM firmware downloading. That is not covered here.
There are four possible ways to update flash firmware:
- Window-based upgrade with WinUpdate.exe program
- Linux-based upgrade with prism2_srec program that is part of hostap utils.
- Linux-based upgrade with prism2dl program, (which was part of linux-wlan project?)
- DOS-based upgrade.
This page only covers 1) and 2).
Raffaele Raf described DOS-based flashing experience in his "success story" series. (Thanks to Elias Tsigoyannis, you can read the file in pdf format) Here you can also find the original, my hand-edited raw text version.
Wim Osterhold forwarded an email to me that describes some DOS-based flashing experience. It looks cryptic to me, but may be useful to desparate souls.
Thanks to Chengqi Zhu, I now have a local copy of the FLASH.EXE.
Pat Crawford describes in detail how to use DOS-based tool to resurrect dead cards. You may find it useful. Look for the section "Resurrection of dead cards".
Here is the link to an old binary for prism2dl on Linux/i386 machines. Pavel Roskin put slightly improved version of prism2dl at http://www.red-bean.com/~proski/prism2dl/. According to him, "It should be easier to use, but it's not _safer_ to use than the original version. In particular, it still allows flashing firmware intended for RAM download."
Earl has put up a note that describes using a bootable openap-ct floppy to do 2)-style upgrade. See the page at here. I have not tried it, but it sounds like a very attractive idea. [HINT: If anybody points to me a bootable CD distro that I can hack, I will be happy to make a Intersil prism upgrade CD util!]
Note that this page only talks about upgrading primary firmware and station firmware. Station firmware is also known as secondary firmware. Both terms are used freely to mean the same thing in the rest of this document.
Use hostap_diag wlan0NICID: id=0x8013 v1.0.0 (PRISM II (2.5) Mini-PCI (SST parallel flash)) PRIID: id=0x0015 v1.1.0 STAID: id=0x001f v1.4.9 (station firmware)
Or check with dmesg:wlan0: NIC: id=0x8013 v1.0.0 wlan0: PRI: id=0x15 v1.1.0 wlan0: STA: id=0x1f v1.4.9
I don't have a good answer, but here are some popular versions of station firmware seen in the mailing list.
- 1.4.9 - Earlier version (1.4.2?) has some problems with PCI-based cards. The symptom is corrupted packets. If you have PCI cards, upgrade to this one. Victor report connection problems with this version. [MORE CONFIRMATION PLEASE]
- 1.5.6 - This version and later ones enable hostap driver to use standard 4-address packet format for WDS packets.
- 1.7.4 - No negative reports about this version so far. I have received several reports that 1.7.4 supports hiding ESSID and WPA.
- v1.8.2 - WPA works with this version.
- v1.8.4 - It seems to be latest flashable station firmware version. (Thanks to Wlfgan Krivanek and Michale Schwab). But there are reports of packet loss with this version. Drew reported large percent packet loss over long distance link (1 to 5 miles) with 1.8.4, but not with 1.8.2. See his story here. I have got many reports about issues with 1.8.4, especially with older cards (mostly packet loss). So the current advice is to stay away from this version. [Anyone has good things to say about this version?]
The latest primary firmware version is v0.3.0 for NICID 0x8002 to 0x8008, and is v1.1.1 for most other chip revisions. [CONFIRMATION PLEASE.] Post (firstname.lastname@example.org) reported that this driver (local copy) "probably add WPA support to Win XP".
Firmware files are S-record files with .hex (or .HEX) suffix. S-record is a format to denote binary files, including their memory locations, in ascii format.
The base name of the file follows a certain convention. You can find more details in this document. Specifically pay attention to page 3-3, the release ID table. Zdenek Pokluda has kindly converted the table to HTML format for much easier reference.
A image file looks like the following:
- type can be I (Initial), P (Primary), S (Secondary), or T (Tertiary). Additionally, it can be A (RAM-download primary) or R (RAM-downloadable secondary). Only use files started with 'p' or 's'. Otherwise you may toast your cards!
- platform is a 1-character platform ID, which has to do with your NICID. Refer to the release ID table.
- Version_Major/Minor consists of a 2-character major version and 2-character minor version
- Version_Variant is a 2-character version variant.
- Primary firmware v1.0.4 for NICID 800C, 8013, 8017, 801B.
- Station firmware v1.4.9 for NICID 800B, 800C, 800D, 8012, 8013, 8014, 8016, 8017, 8018, 801A, 801B, 801C.
- Station firmware v1.4.9 for NICID 8003, 8008.
I collected some of the firmware files. Here are a list of more firmware sources.
- http://www.demarctech.com/products/reliawave-rwz/reliawave-rwz-200mw-prism2-5-pcmcia-card.html - It also has some drivers and utility programs.
If you are concerned about the firmware compatibility, please read the tips on safe flashing with prism2_srec.
Let us say you do want to upgrade. Here are the steps by using windows.
- Download winupdate program. The latest version seems to be 0.7.0. It should run on most Windows versions.
- Install windows driver for the card. It seems winupdate won't find the card otherwise. [Pavel Roskin] Winupdate can be picky about the version of drivers installed. The driver for Linksys WPC11 v2.5 should OK.
- Start winupdate. If you have only one prism card running, it will detect it. If you have more than one, it allows you to select one to upgrade.
- Pick the right primary and station firmware files. It is safest if you upgrade the companion versions of them together. Some times it is OK to just upgrade station firmware. According to Pavel Roskin, "Upgrading primary firmware without secondary firmware make the card non-functional. That card acts as if it only has primary firmware". So NEVER NEVER flash primary firmware alone!!!!
- Click "continue". It reports current chip information, including current firmware versions, and gives you a chance to cancel. Double-confirm. If it says platform mismatches, most likely you picked the wrong hex files.
- Click "upgrade". That is it.
Jouni Malinen made a few bug fixes and improvement to prism2_srec around Aug 2/3, 2003. Now prism2_srec can flash both primary firmware and station firmware.
- Download hostap package from CVS or a release that is dated after Aug 3, 2003. Release 0.1.0 or later have this feature as well.
- Enable PRISM2_DOWNLOAD_SUPPORT and PRISM2_NON_VOLATILE_DOWNLOAD in driver/modules/hostap_config.h. You simply just uncomment those two define's.
- Compile the driver and install them to the kernel using your favorite method.
- cd utils and make prism2_srec program.
- Download the firmware files that you want to upgrade to.
- NOTE THAT YOU HAVE TO RUN prism2_srec AS ROOT. Do a test run withprism2_srec -v wlan0 <primary firmware> <station firmware>Note if you only need to flash station firmware, simply omit the "primary firmware" argument. However, NEVER NEVER flash primary firmware alone!!!
- Check for any imcompatiable warnings in the previous test run. If things look OK, keep your finger crossed and runprism2_srec -v -f wlan0 <primary firmware> <station firmware>or simply if you only update station firmwareprism2_srec -v -f wlan0 <station firmware>
I have successfully upgraded the station firmware on a 0x8002 card from v1.4.9 to v1.5.6. I have also successfully upgraded a 0x8013 card from pri v1.1.0/sta v1.4.9 to pri v1.1.1/sta v1.7.4.
Apparently prism2_srec can do more than that. It can be used to RAM-based downloading. Jouni also mentioned one way to download primary firmware alone in Genesis mode.Date: Sat, 2 Aug 2003 23:01:26 -0700 From: Jouni Malinen
.... And the new magic prism2_srec commands: # Download primary firmware into RAM using Genesis mode ./prism2_srec -g wlan0 ak010100.hex # card is now in PRI-only mode with very limited functionality # download station firmware into RAM ./prism2_srec -r wlan0 rf010409.hex # card is now in normal mode
Pavel Roskin gave some tips on safe flashing and checking compatibility:Users don't seem to realize that prism2_srec will check firmware compatibility. I can send you the exact patch for your page, but I think you can write the answers yourself based on the following excerpts from my replies. prism2_srec is very careful not to break the card. It won't allow you to flash incompatible firmware (unless you use the "-i" option). So you can do your own research and see what firmware is compatible with your card. To play really safe, use prism2_srec without any switches, such as "-r", "-f" or "-g". In this case, prism2_srec will simply check if the firmware is compatible with your card. If prism2_srec finds that the firmware is incompatible, it won't flash it. It will give the reason. Usually either the NICID is incompatible or the primary firmware needs upgrading. It's very important to note that prism2dl should not be used for experimenting with firmware if you don't know what your are doing. It doesn't have the compatibility checks prism2_srec has. It should be safe to use prism2dl once you know what firmware you need.
Jan gave the following comments about potential PDA problem.Maybe it's worth to put a reference to the -O parameter on your page. prism2_srec kept complaining "Could not read wlan PDA. This requires PRISM2_DOWNLOAD_SUPPORT definition in driver/module/hostap_config.h." even though I built a kernel with the correct options. Calling prism2_srec with "-O /proc/net/hostap/wlan0/pda" made it work.
Some people may encounter the following error message while trying to upgrade:"Error Programming Block. Continue anyway?"
Jay Zhang pointed out the following web page, which instruct you turning off RAM downloading. Apparently it does not work with Winupdate.exe. If you can't find the above page, you can find a local copy I saved at here.
Pavel Roskin pointed out that "installing drivers for Linksys WPC11 2.5 helps on Windows 2000".
This how-to does not cover linux-based prism2dl flash upgrading. However, I found this piece of information from Pavel Roskin on July 17, 2003 is rather relavent.linux-wlan-ng has a special state for firmware download, in which it doesn't try to initialize the card. I have successfully used prism2dl to upgrade both primary and secondary firmware. I have just released the new unofficial version of prism2dl. It has some additional sanity checks that should prevent flashing firmware meant for RAM download. However, hardware compatibility is still not checked, so it's still possible to kill a Prism 2 card by flashing firmware for Prism 2.5. The necessary checks are quite complex. It may be easier to fix primary firmware download in prism2_srec. Download prism2dl here: http://www.red-bean.com/~proski/prism2dl/
Pat Crawford has written a wonderful article to explain how to resurrect dead cards with corrupted PDA and CIS. You can find his article at here and related tools.
If you find this document useful, please help make it better. Send me your feedbacks, corrections and stories of success and failures. When you report your case, please include a)card type (PCI or PCMCIA), b) brand/model, c) NICID, d) old versions, e) the new versions, and f)firmware files used. By default your story will be shard in my story page. However, you can ask me 1) not to publish, or 2) scrible your email address, or 3) remove your name/email completely but leave the content.
If you feel I should include certain firmware hex files along with page, please let me know too.
Here is a list of stories I have heard so far.
Thanks to the help of following people - direct or indiect - this document becomes possible.
- Pavel Roskin <proski at gnu.org>
- Jouni Malinen <jkmaline at cc.hut.fi>
- Raffaele Raf <raffaele1963 at yahoo.it>
- Jason Boxman <jasonb at edseek.com>
- Zdenek Pokluda <pokludaz at seznam.cz>
- "Hoang Q. Tran" <hoang at muine.org>
- Tolunay Orkun (DrTCP) <drtcp at dslreports.com>
- Peter <peter at peter.dyndns.info>
- Alex <sud at latinsud.com>
- Andrew Maier <andrew at maier.name>
- Michael Schwab <exim20 at gmail.com>
- Victor Grau Serrat <victor at e-club.info>
- Pat Crawford