Yesterday I bought a SMC EzConnect 54g Wireless CardBus adapter for my Linux laptop. There are, at least, two different and incompatible versions of this card. The SMC 2835W V2 uses the Intersil 3890 Prism54 chipset, which is supported natively by Linux Prism54 driver. The SMC 2835W V3, which is the one I bought, isn’t. Fortunately, ndiswrapper fully supports this card by wrapping native Windows NDIS drivers around a linux kernel driver. Also, the same happens with the EzConnect 54g Wireless PCI adapter I bought for my Pentium IV machine, which sports the SMC 2802W V2 chipset. The Prism54 Linux driver doesn’t support this card yet.
The SMC 2802W card I bought looks like this:
The SMC 2835W V3 CardBus NIC I bought looks like this:
In order to use these cards, I downloaded the latest tarball for ndiswrapper from the ndiswrapper site which, at this time, was version 1.1. The tarball comes with a Red Hat .spec file that requires no tweaking, except updating the version tag to 1.1.
rpmbuild -ba ndiswrapper.spec
This will compile the ndiswrapper userspace tools and kernel module against the current kernel source tree which must be available under “/lib/modules/`uname -r`/kernel” (for Fedora Core 4 and later, there exists a kernel-devel package which contains all kernel source files needed to compile out-of-tree kernel modules).
Once compiled, I installed the resulting ndiswrapper and kernel-module-ndiswrapper RPM packages. Next, I copied the Windows XP NDIS driver directly from the CD-ROM supplied with the card itself to the hard disk. The driver is fully contained within the Utility folder inside the CD-ROM:
cp -Rdp /media/cdrom/Utility .
ndiswrapper -i SMC2835W.INF
These steps are required to pick the Windows NDIS driver and firmware and make them available to the ndiswrapper kernel module. In fact, the driver files will get copied into “/etc/ndiswrapper/” where equals “2802w” for the SMC 2802W PCI NIC or “2835w” for the SMC 2835W CardBus NIC.
The last step consists in removing the prism54 module that gets autoloaded by udev/hotplug when the card is plugged into any CardBus slot, then modprobing the ndiswrapper kernel module:
modprobe -r prism54
If everything is ok, something like this should get logged to the kernel dmesg ring:
ndiswrapper version 1.1 loaded (preempt=no, smp=no)
ndiswrapper: driver smc2835w (SMC,04/29/2004, 184.108.40.206) loaded
ndiswrapper: using irq 10
wlan0: ndiswrapper ethernet device 00:04:xx:xx:xx:xx using driver smc2835w, configuration file 1260:3890.5.conf
wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP
Also, it’s possible to use the following command to check the driver loaded:
Once everything is working, the last steps try to find a wireless network, associate with it and configure the network stack:
iwlist wlan0 scan | grep ESSID
We should choose among the listed ESSIDs or, if the ESSID broadcasting is disabled, an specific, known ESSID.
iwconfig wlan0 essid ifconfig wlan0 up dhclient
To make the changes permanent, the following command should be used:
This last command usually appends the following line to “/etc/modprobe.conf”:
alias wlan0 ndiswrapper
This tells the initscripts to modprobe for the ndiswrapper module when trying to bring the wlan0 interface up. Usually, the initscripts do a modprobe during boot, where equals the kernel’s interface name, like eth0, eth1 or wlan0. The previous alias line makes “modprobe wlan0” to become “modprobe ndiswrapper”.
It’s also recommended to add prism54 to udev/hotplug’s blacklist to prevent it from loading on systems where both ndiswrapper and prism54 kernel modules are present:
echo prism54 >> /etc/hotplug/blacklist