Hi
Just go through this procedures.
There are a number of ways to get 54 Mbps 802.11g/n cards to work with Fedora, but most open source references focus on the Prism54 and NdisWrapper projects.
Though it works, the Prism54.org software suite has a number of limitations. It requires you to apply kernel patches and then recompile the kernel. It is also only compatible with a limited number of wireless cards. This can be a daunting process even for experienced Linux users.
What is ndiswrapper?
Windows uses the Network Driver Interface Specification (NDIS) as a standardized method for the operating system to communicate with the NIC driver software from various manufacturers. The Linux ndiswrapper software suite, available from ndiswrapper.sourceforge.net, allows you to run your Windows NIC card's drivers under Linux by creating a software wrapper around the Windows driver to trick it into thinking that it is communicating with Windows and not Linux. The compatibility range is therefore much wider and in cases where you need to recompile your kernel, the project's website has links to RPM packages of standard kernels with ndiswrapper support. Installation instructions on the project's web site are reasonably clear and a proficient Linux user should be able to get their NIC card working within an hour or two on their first try.
ndiswrapper has some limitations too. It only works on hardware architectures supported by Windows, the very useful iwspy command (discussed later) isn't supported and the wrappers add a layer of software complexity that would not exist normally. There is a commercial competitor to ndiswrapper called DriverLoader created by the Linuxant corporation which you may also want to consider.
Confirm Whether Your Kernel Supports ndiswrapper
There are some caveats with installation under Fedora which will be shown in the steps that follow. Let's begin.
1. First start by downloading the ndiswrapper tar file and extracting the contents. Don't install the NIC yet.
[root@bigboy tmp]# tar -xvzf ndiswrapper-1.16.tar.gz
2. Enter the ndiswrapper subdirectory and read the installation instructions in the INSTALL file as the steps to take may vary slightly with each new version. The version in this example, ndiswrapper-1.16, requires the make uninstall, make and make install commands to complete the installation process. Each of the make commands will give a lot of output to the screen, look carefully and make sure there are no errors.
[root@bigboy tmp]# cd ndiswrapper-1.16
[root@bigboy ndiswrapper-1.16]# make uninstall
[root@bigboy ndiswrapper-1.16]# make
...
...
*** WARNING: Kernel seems to have 4K size stack option (CONFIG_4KSTACKS) removed; many Windows drivers will need at least 8K size stacks. You should read wiki about 4K size stack issue. Don't complain about crashes until you resolve this.
...
...
[root@bigboy ndiswrapper-1.16]#
Note: The CONFIG_4KSTACKS error seen here is common with default Fedora installations, and ndiswrapper may work perfectly with this limitation. If you had no CONFIG_4KSTACKS type errors or are willing to test ndiswrapper even though they exist, then proceed to the next section, "Installing and Configuring ndiswrapper".
3. The ndiswrapper website lists websites at the following URL from which you can download kernels with larger 16K stacks. This will be faster than creating your own.
http://ndiswrapper.sourceforge.net/mediawiki/index.php/Fedora
Remember to download a kernel that matches your system architecture and kernel version. This can be ascertained using the uname -a command. Here our system is running Fedora Core 5 kernel version 2.6.16-1.2122 on an i686 platform.
[root@bigboy linux]# uname -rp
2.6.16-1.2122_FC5 i686
[root@bigboy linux]#
If you choose to download the purpose built kernel then do so. Install the RPM, reboot and then continue to the next section, "Installing and Configuring ndiswrapper".
If you decide to create your own kernel, then follow the next steps.
4. You have reached this step because you have decided to recompile your kernel. It is not a difficult process, there are only a few steps, but the compilation time can be lengthy. The first step is to install the kernel source files. This is covered in Chapter 33, "Modifying the Kernel to Improve Performance".
5. After installing the sources, you'll have to prepare for compiling a new kernel customized for use with ndiswrapper. The first step is to clean up any temporary files that may have existed from any previous compilations you may have done by using the make mrproper command. You'll then need to use the make oldconfig command to create a default version of the .config file Linux will use in compiling your new customized kernel.
[root@bigboy tmp]# cd /usr/src/linux
[root@bigboy linux]# make mrproper
[root@bigboy linux]# make oldconfig
6. Edit the .config file and set the CONFIG_4KSTACKS variable to "n".
[root@bigboy linux]# vi .config
#
# File: /usr/src/linux/.config
#
#CONFIG_4KSTACKS=y
CONFIG_4KSTACKS=n
[root@bigboy linux]#
7. The kernel compilation process also reads the file Makefile to determine the new name of the kernel to be used. The EXTRAVERSION variable in this file adds a suffix to the kernel name to help you track version numbers. Edit Makefile and set the EXTRAVERSION to -ndis-stk16 so that the new kernel will be easily identifiable as a version that supports ndiswrapper.
[root@bigboy linux]# vi Makefile
#
# File: /usr/src/linux/Makefile
#
EXTRAVERSION = -ndis-stk16
[root@bigboy linux]#
8. Compile the kernel and its modules with the following series of make commands. Make sure they finish without error and remember that this can be a lengthy process.
[root@bigboy linux]# make; make modules_install; make install
9. If you installed a new version of the kernel, you'll now have to ensure that your system selects the correct kernel version when it reboots. This will require you to edit the /etc/grub.conf file as outlined in Chapter 33, "Modifying the Kernel to Improve Performance".
10. Shutdown your system, install the NIC card and boot up. The system will now load your new kernel which you can verify with the uname command.
[root@bigboy linux]# uname -r
2.6.16-ndis-stk16
[root@bigboy linux]#
If you installed a new version of the kernel and your system fails to reboot correctly, refer to the "Kernel Crash Recovery" section of Chapter 33, "Modifying the Kernel to Improve Performance" for help. When you get your system to reboot correctly, revise your installation steps and make sure you had originally installed the correct version.
With your new kernel running its time to install ndiswrapper as outlined in the section that follows.
Installing and Configuring ndiswrapper
With the kernel updated, the ndiswrapper installation process progresses rapidly. Let's begin.
1. Install your NIC. Download the ndiswrapper tar file and extract the contents. Enter the ndiswrapper directory and read the installation instructions in the version specific INSTALL file. The version in this example, ndiswrapper-1.16, requires the make uninstall, make and make install commands to complete the installation process. As we have already updated the kernel, there should be no errors.
[root@bigboy tmp]# tar -xvzf ndiswrapper-1.16.tar.gz
[root@bigboy tmp]# cd ndiswrapper-1.16
[root@bigboy ndiswrapper-1.16]# make uninstall
[root@bigboy ndiswrapper-1.16]# make
[root@bigboy ndiswrapper-1.16]# make install
2. Next we have to determine the PCI ID of our newly installed NIC card. First use lspci command to find the IRQ number of the NIC card. The IRQ will be listed in the first column. In this case the IRQ is 01:08.0.
[root@bigboy ndiswrapper-1.16]# lspci
...
...
01:08.0 Network controller: Intersil Corporation Prism 2.5 Wavelan chipset (rev 01)
...
...
[root@bigboy ndiswrapper-1.16]#
3. The lspci -n command can then be used to obtain the PCI ID which has the format xxxx:xxxx. Our NIC has the ID 1260:3873.
[root@bigboy ndiswrapper-1.16]# lspci -n
...
...
01:08.0 Class 0280: 1260:3873 (rev 01)
...
...
[root@bigboy ndiswrapper-1.16]#
4. The ndiswrapper website has a table of PCI IDs and the matching Windows drivers to be used for each at the following URL.
http://ndiswrapper.sourceforge.net/mediawiki/index.php/List.
Note: Use this information to download the correct driver for your NIC. Do not use the Windows drivers that came on your NIC's CD as it may not have been tested in the quality assurance process done by the ndiswrapper developers. The website's list provides the names of drivers that are known to work.
5. Once downloaded, extract the driver files. Under the main driver directory there will usually be subdirectories with drivers matching various versions of Windows. Enter the subdirectory of the most recent version.
[root@bigboy tmp]# unzip mzq345v25_xp_certd.zip
Archive: mzq345v25_xp_certd.zip
inflating: mzq345v25_xp_certd_no_doc/autorun.exe
inflating: mzq345v25_xp_certd_no_doc/autorun.inf
...
...
...
inflating: mzq345v25_xp_certd_no_doc/winxp/NETmzq345.INF
inflating: mzq345v25_Release_Note.TXT
[root@bigboy tmp]# cd mzq345v25_xp_certd_no_doc/winxp
[root@bigboy winxp]#
6. The main windows driver file will have a .INF extension. Install this driver using the ndiswrapper command with the -i option followed by the driver filename. Use the ndiswrapper command again with the -l option to verify that the installation was successful.
[root@bigboy winxp]# ls
mzq345n51.sys NETmzq345.INF
[root@bigboy winxp]# ndiswrapper -i NETmzq345.INF
Installing netmzq345
[root@bigboy winxp]# ndiswrapper -l
Installed drivers:
netmzq345 driver installed, hardware present
[root@bigboy winxp]#
7. Next the Linux kernel modules tables will have to be updated to include ndiswrapper in the listing. This is done with the depmod command with the -a flag.
[root@bigboy winxp]# depmod -a
[root@bigboy winxp]#
8. When ndiswrapper loads, it will need to assign a device name to your NIC card. This is done using the ndiswrapper command with the -m flag. Here we see that the new device name will be wlan0.
[root@bigboy winxp]# ndiswrapper -m
Adding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper
[root@bigboy winxp]#
9. Now its time to load the ndiswrapper kernel module with the modprobe command. You can also verify the success of this operation by searching the end of the /var/log/messages file for correct execution of the command.
[root@bigboy winxp]# modprobe ndiswrapper
[root@bigboy winxp]# tail /var/log/messages
...
...
Mar 17 23:25:21 bigboy kernel: ndiswrapper version 1.6 loaded (preempt=no,smp=no)
[root@bigboy winxp]#
The dmesg command will give status messages for the loading of both your NIC driver and the ndiswrapper module. There should be no errors. If there are, you may have used a driver not recommended by the ndiswrapper website, your NIC card may be faulty, your NIC could be Linux compatible, or your ndiswrapper or kernel installation could have been faulty. Please refer to the "Troubleshooting Your Wireless LAN" section of this chapter for more details.
[root@bigboy tmp]# dmesg
...
...
...
ndiswrapper version 1.16 loaded (preempt=no,smp=no)
ndiswrapper: driver mzq345 (Broadcom,04/21/2005, 3.100.65.1) loaded
ACPI: PCI Interrupt 0000:01:08.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
ndiswrapper: using irq 10
wlan0: vendor:
wlan0: ndiswrapper ethernet device 00:06:25:1b:b2:a9 using driver mzq345, 14E4:4301.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK, WPA2, WPA2PSK
[root@bigboy tmp]#
10. You will always need to have a ndiswrapper compatible kernel for the application to function correctly. To maintain your current kernel during yum updates, edit your /etc/yum.conf file to exclude the kernel from being kept up to date with the exclude option.
#
# File: /etc/yum.conf
#
exclude= kernel
11. Use the regular Linux wireless tools to configure your eth0 interface with an IP address, ESSID and if necessary, encryption. You can adjust the data rate up to the 802.11g 54 Mbps data rate by adding this statement to your /etc/sysconfig/network-scripts/ifcfg-eth0 file. Leave this blank if you are using 802.11b.
RATE=54Mb/s
12. Now you can use the ifup command to activate the NIC, and the iwconfig command will show the interface as connecting correctly to an access point at 54 Mbps.
[root@bigboy winxp]# ifup wlan0
[root@bigboy winxp]# iwconfig
...
...
wlan0 IEEE 802.11g ESSID:"johncr0w" Nickname:"bigboy"
Mode:Managed Frequency:2.462GHz Access Point: 00:09:5B:C9:19:22
Bit Rate=54Mb/s Tx-Power:32 dBm
RTS thr=2347 B Fragment thr=2346 B
Encryption key:98D1-26D5-AC Security mode:restricted
Power Management:off
Link Quality:88/100 Signal level:-55 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:96 Invalid misc:1157 Missed beacon:0
...
...
[root@bigboy winxp]#
My experience with ndiswrapper in the home has been very good, but like Prism54 and even Linux-WLAN, you have to reinstall the product each time you upgrade your kernel. This may not be tolerable in a mission critical business environment where maintenance related downtime needs to be kept to a minimum and where all software used needs to be 100% Linux compatible to ensure stability. When 802.11g WiFi technology becomes more mature it will indubitably be supported natively by Linux Wireless Tools without the need for additional software, but there will always be NICs that don't support Linux and knowledge of ndiswrapper will be invaluable.