July 31, 2005 – 5:04 pm
I had the the Microsoft MN-520 Wireless PCMCIA Card for some time but have never yet used a router with WPA support. With the move and a new wireless setup, I decided to use WPA-PSK for better security over plain WEP. Much to my suprise Linux did not support WPA out of the box (unlike Windows XP SP2) but after some fiddling, I got it to work. I am going to summarize the steps that I took in this post in hopes that it would be helpful for someone else.
NOTE: I am running Redhat Fedora Core 3 and am providing instructions for that OS only.
To start off, the default wireless driver used for this card (orinoco_cs) does not support WPA. In order to use WPA with this card, you will need to install a different driver plus a special software piece called a “supplicant” which takes care of the authentication (I happen to use “wpa_supplicant”). Here are the steps you should follows.
1. Download the latest stable hostap-driver, wpa_supplicant and hostap-utils source from http://hostap.epitest.fi/.
2. Extract the hostap-driver and hostap-utils source into two directories, switch to root (su) and run make in each directory (if you are running kernel v2.6.12, you will need to fiddle with the source of the kernel until hostap compiles properly).
NOTE: Before running make on hostap-driver, you will need to enable the NVRAM download. Look for a file called “hostap_config.h” in “/driver/modules” directory of the extracted source. In it, find the line “#define PRISM2_NON_VOLATILE_DOWNLOAD” and make sure it is NOT commented out.
3. Run the “make install” command in the hostap-driver directory to install the driver.
4. Find the “/etc/pcmcia/config” file. In it you will find the entry for the Microsoft MN-520 card. You need to comment out the entry with “#”.
5. Restart the pcmcia services by running “/etc/init.d/pcmcia restart” in order to reload the configuration file.
6. In the system log you should see something along the lines of the following when you insert the PCMCIA card (you can use “tail /var/log/messages -f” to monitor it):
Jul 31 17:16:46 localhost kernel: hostap_cs: 0.3.7 - 2005-02-12 (Jouni Malinen)
Jul 31 17:16:47 localhost kernel: hostap_cs: Registered netdevice wifi0
Jul 31 17:16:47 localhost kernel: hostap_cs: index 0×01: Vcc 5.0, irq 3, io 0×0100-0×013f
Jul 31 17:16:47 localhost kernel: wifi0: NIC: id=0×800c v1.0.0
Jul 31 17:16:47 localhost kernel: wifi0: PRI: id=0×15 v1.1.0
Jul 31 17:16:47 localhost kernel: wifi0: STA: id=0×1f v1.4.97. Now at this point, the driver should be functional. HOWEVER, the second piece of the puzzle - the wpa_supplicant WILL NOT work until the firmware on the actual card is upgraded. Before doing that, go into the hostap-utils directory, and run the following command: “./hostap_diag wlan0″. You should see something along the lines of:
NICID: id=0×800c v1.0.0 (PRISM II (2.5) PCMCIA (SST parallel flash))
PRIID: id=0×0015 v1.1.0
STAID: id=0×001f v1.4.9 (station firmware)
The three version numbers in the syslog and provided by hostap_diag are the version numbers of the firmware. In order for wpa_supplicant to work, they need to be upgraded to v1.70 (the latest is 1.84). Jun Sun has a webpage devoted to the discussion on the gory details.
NOTE: Flashing firmware on your card may render is unusable and is not covered by warranty. Additionally, depending on the country you are in and the manufacturor of the card, this may even be illegal. I take no responsibility for anything that may happen to you or your card. Remember: you are on your own here
8. Download the latest Prism firmware from Pavel Roski’s site. In that file you will find several directories. In the primary directory look for a file called “pk*something”, in the secondary look for a file called “sf*something”. These are the right firmware revisions for the MN-520 card. Make sure that the “sf” file is numbered at least above 01070.
9. Put the two files into the hostap-util directory and run “./prism2_srec pk**** sk*****”. You NEED to include both files. If everything is fine, the program will end off with an “OK” message. This just a check to make sure the files are compatible.
10. If you are to update the card, run “./prism2_srec -v -f pk**** sk*****” to actually update the card. Following that, plug it out and plug it back in, and you should have the following in your syslog indicating the higher version numbers:
kernel: wifi0: NIC: id=0×800c v1.0.0
kernel: wifi0: PRI: id=0×15 v1.1.1
kernel: wifi0: STA: id=0×1f v1.8.4
11. After this is done, you can actually replace the hostap drivers with RPMs from atRPMs since the firmware update ability will no longer be needed.
12. After this is all finished, install wpa_supplicant (either via a precompiled RPMs or straight compiled). After installation, change the “/etc/wpa_suplicant.conf” file with your network data and run it as follows:
/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
If everything is fine, the WPA support should go up and work.
Feel free to leave comments on this post.
Posted in Linux | No Comments »