Linksys WUSB11v4 802.11b USB Wireless Adapter using ndiswrapper Installation
The WUSB11v4 is an 802.11b wireless device with a pop-up antenna that attaches to a system through a six feet long USB cable that is included with the unit.
Version 4 of the WUSB11 uses the former Acer Labs now ALi M4301 wireless chipset. There are no Linux native drivers available for this chipset at present and I assume that there will not be any forth coming.
For this example we assume that we are building the device in the user's home directory.
Note: I have only tested this using 128bit (104bit) WEP and ndiswrapper 1.28.
Reference should be make to the ndiswrapper wiki if any doubts exist:
http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation
NOTE (August 2010): All hail FrodoB for writing the definitive guide to installation of WUSB11v4. I tried this procedure on Jaunty Jackalope and can vouch that it is a complete and correct procedure and works perfectly all the way through the modprobe step, EXCEPT -- if you are using a 64-bit version of Ubuntu this exercise is pointless because the driver referenced here-in is 32-bit only (and there are no 64-bit drivers available). If you use 64-bit Ubuntu, give up ... buy another card.
Step 1 - Remove any existing copies of ndiswrapper that you may have
user@ubuntu:~$ ndiswrapper
If you get an error stating that the program is not installed then proceed to the Step 2.
Here is how to remove a copy that was installed using apt-get:
If you have an existing copy that you installed using make then change to the driver's directory and remove it using make:
user@ubuntu:~$ make uninstall
Run ndiswrapper once more to make sure that you get the not installed error message:
user@ubuntu:~$ ndiswrapper
Step 2 - Disable any Competing Drivers
For this device there is no competing driver in Ubuntu 6.06 or 6.10, but I am putting this section in as a place holder in the event that it becomes necessary.
If an existing non-functional driver exists, you need to blacklist it:
user@ubuntu:~$ gksudo gedit /etc/modprobe.d/blacklist
Save the file. The blacklisted module will not be loaded from now on.
Check the contents of the /etc/iftab file and make sure that no other device has the wlan0 driver name reserved for it:
user@ubuntu:~$ cat /etc/iftab
If there are any lines assigning the name wlan0 to a MAC identifier then either remove that line or comment it out with the "#" character.
Step 3 - Prepare the Linux build environment
NOTE: (August 2010): The binary for ndiswrapper is available via the usual Ubuntu aptitude or apt-get installation mechanisms. You will need ndiswrapper-common and ndiswrapper-utils. Then you can skip steps 3 and 4 and 5a, and move on to 5b.
You will need to install the essential build files to compile the driver:
user@ubuntu:~$ sudo apt-get update user@ubuntu:~$ sudo apt-get install build-essential
Install the correct headers for your version of Ubuntu: (don't worry if it tells you that yours are up to date.)
user@ubuntu:~$ sudo apt-get install linux-headers-`uname -r` user@ubuntu:~$ sudo ln -s /usr/src/linux-`uname -r` /lib/modules/`uname -r`/build
Step 4 - Download the latest version of the ndiswrapper driver
Download the latest version of the ndiswrapper from sourceforge:
http://sourceforge.net/projects/ndiswrapper
At the time I originally wrote this the latest version was 1.28:
http://downloads.sourceforge.net/ndiswrapper/ndiswrapper-1.28.tar.gz?modtime=1162136432&big_mirror=0
Now 1.29 is available:
http://downloads.sourceforge.net/ndiswrapper/ndiswrapper-1.29.tar.gz?modtime=1164273927&big_mirror=0
It should be noted that as the ndiswrapper is further developed it could be the case that any particular NDIS driver compatibility could become broken for awhile.
Step 5a - Make and install ndiswrapper
Using tar extract the archived driver and change directories into the build area.
user@ubuntu:~$ tar xvzf ndiswrapper-1.28.tar.gz user@ubuntu:~$ cd ndiswrapper-1.28
Make the driver with the commands "make distclean", "make", and "make install":
user@ubuntu:~/ndiswrapper-1.28$ make distclean user@ubuntu:~/ndiswrapper-1.28$ make user@ubuntu:~/ndiswrapper-1.28$ sudo make install
The make process will take several minutes to complete.
Step 5b - Use ndiswrapper to install Windows (32-bit) driver
You can now check the ndiswrapper to see that it is installed correctly. You should see something similar to:
user@ubuntu:~/ndiswrapper-1.28$ ndiswrapper -v utils version: 1.9 driver version: 1.28 vermagic: 2.6.17-10-generic SMP mod_unload 586 REGPARM gcc-4.1
Obtain the Windows NDIS drivers that you intend to use with the device. The driver that we are using can be obtained by searching the web for: WUSB11v4_08272004.exe. The 4shared.com site is one site that has this as of August of 2010.
When we get an archive file from a manufacturer, the following tools may be required to extract the archive: (you will need to make sure that the universe repository is available to get cabextract and unshield using apt-get)
cabextract unshield unzip
In this case we are going to use unzip to get to the files:
user@ubuntu::~/ndiswrapper-1.28$ cd ~ user@ubuntu:~$ user@ubuntu:~$ unzip WUSB11v4_08272004.exe
This results in a directory called WUSB11v4_08272004, here is a directory listing:
user@ubuntu:~$ ls WUSB11v4_08272004 WUSB11v4_08272004.exe
Change into the Driver directory and install the driver:
user@ubuntu:~$ cd WUSB11v4_08272004/Drivers
Now we are in the Drivers directory and we can install the driver:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ sudo ndiswrapper -i WUSB11v4.inf installing wusb11v4 ... couldn't find "Sources" in "."; make sure all driver files, including .inf, .sys (and .bin, if any) are in "." - installation may be incomplete
The warning, "couldn't find "Sources" in "."; make sure all driver files, including .inf, .sys (and .bin, if any) are in "."", does not seem to be an issue. Next we will verify that the correct files are indeed installed.
Using ndiswrapper we can list the installed driver to make sure that we have it:
user@ubuntu:~WUSB11v4_08272004/Drivers$ ndiswrapper -l installed drivers: wusb11v4 driver installed, hardware (13B1:000B) present (alternate driver: 2.6.17)
We can also look inside the directory where the drivers get stored by ndiswrapper:
user@ubuntu:~/wusb11/WUSB11v4_08272004/Drivers$ ls /etc/ndiswrapper/ wusb11v4
And the contents are:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ ls /etc/ndiswrapper/wusb11v4/ 13B1:000B.F.conf m4301a.sys mdusb.out wusb11v4.inf
Bring up the driver:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ sudo depmod -a user@ubuntu:~/WUSB11v4_08272004/Drivers$ sudo modprobe ndiswrapper
If you do not get any errors and your system does not immediately freeze the driver should now be loaded.
Step 6 - Install the device and configure the network settings
Insert your wireless device into an open USB port on your system.
You should now be able to see that the device is installed by opening a terminal window and running lsusb:
user@ubuntu:~$ lsusb
Your output should contain a line that has your device's USB ID and description, similar to this:
Bus 00X Device 00X: ID 13b1:000b Linksys WUSB11 v4.0 802.11b Adapter
Issuing an iwconfig command should reveal that your device is waiting to be configured, similar to this one:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11b ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:11 Mb/s
RTS thr:2432 B Fragment thr:2432 B
Power Management:off
Link Quality:95/100 Signal level:-35 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.Using gedit put the required record into /etc/network/interfaces file: (note that the Xs are your actual WEP key.)
user@ubuntu:~/wusb11/WUSB11v4_08272004/Drivers$ gksudo gedit /etc/network/interfaces
Create a record that looks like this: (Note normally we would use the keyword "wireless-key" but this device needs "wireless-key1".)
iface wlan0 inet dhcp wireless-essid My_Essid wireless-key1 XXXXXXXXXXXXXXXXXXXXXXXXXX auto wlan0
Save the file.
Step 7 - Testing the device
If you device was unplugged before this step, you should plug it back into a USB slot on your system.
You should now confirm that the device is still installed by opening a terminal window and running lsusb:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ lsusb
Your output should contain a line that has your device's USB ID and description, similar to this:
Bus 00X Device 00X: ID 13b1:000b Linksys WUSB11 v4.0 802.11b Adapter
Now we are going to see if everything that we have entered is correct, by bringing the network up:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ sudo ifup wlan0 There is already a pid file /var/run/dhclient.wlan0.pid with pid 134993416 Internet Systems Consortium DHCP Client V3.0.4 Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/wlan0/00:12:17:a4:87:70 Sending on LPF/wlan0/00:12:17:a4:87:70 Sending on Socket/fallback DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8 DHCPOFFER from 192.168.0.2 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 DHCPACK from 192.168.0.2 bound to 192.168.0.206 -- renewal in 36431 seconds. user@ubuntu:~/WUSB11v4_08272004/Drivers$
Now when we run iwconfig we should see that your ESSID and Access Point fields have been filled in with your access point's correct information and the Frequency field shows the correctly detected frequency:
user@ubuntu:~WUSB11v4_08272004/Drivers$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11b ESSID:"My_Essid"
Mode:Managed Frequency:2.412 GHz Access Point: 00:08:74:02:01:FC
Bit Rate:11 Mb/s
RTS thr:2432 B Fragment thr:2432 B
Power Management:off
Link Quality:95/100 Signal level:-35 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.
user@ubuntu:~/WUSB11v4_08272004/Drivers$ Run a ip route command, and you should see that the correct routing is setup:
user@ubuntu:~$ ip r 192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.206 127.0.0.0/8 dev lo scope link default via 192.168.0.2 dev wlan0
In this case 192.168.0.2 is the gateway address to an Internet router.
Step 8 - Make the device permanent before rebooting
If everything is working correctly so far, then we need to make the ndiswrapper a permanent part of the startup process. For Debian based systems we can use ndiswrapper to do this for us.
Using the ndiswrapper method:
user@ubuntu:~/WUSB11v4_08272004/Drivers$ sudo ndiswrapper -m adding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper ... couldn't add module alias: at /usr/sbin/ndiswrapper line 717. user@ubuntu:~/WUSB11v4_08272004/Drivers$
You can look at the /etc/modprobe.d/ndiswrapper to verify that this record has been added:
user@ubuntu:/etc/modprobe.d$ cat /etc/modprobe.d/ndiswrapper
Now reboot the system and verify that everything still works.
For other systems refer to the ndiswrapper wiki install page:
http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation
Step 9 - Controlling the device
You can now control the device with ifup and ifdown:
user@ubuntu:~$ sudo ifdown wlan0 user@ubuntu:~$ sudo ifup wlan0
Removing and inserting the device should remove and setup the network correctly, at least it does with this device.
If you need to restore or change your systems route to the internet you can use dhclient:
user@ubuntu:~$ sudo dhclient wlan0
Hopefully, you have arrived at the end of this procedure with a working device. Refer questions to the Networking & Wireless section of the forums.
Credits
ndiswrapper team:
Pontus Fuchs - Main developer.
Giridhar Pemmasani - Main developer.
Various - Misc minor patches.
Necessary Changes or Questions
Please contact FrodoB through a private message or through the Networking & Wireless section of the forums if you see items that need to be clarified or improved upon. Thank you very much. I would also appreciate any clarification on the "wireless-key" vs. "wireless-key1" keyword change that is required in this device's interface file. This should not be required, but it is the only thing that seems to make it work.