My kid has an HP computer that connects to the family's wireless gateway with a D-Link DWA-125 Wireless 150 USB Adapter. The wireless adapter performed flawlessly under Vista, but I got tired of having to maintain Vista. So, I installed Ubuntu on the HP, keeping Vista on a dual-boot partition in case he has to run Vista for school for some reason. Ubuntu did not recognize the D-Link DWA-125 out of the box.
In case it saves others a few hours of time, here is how I got the wireless adapter working:
1. Being lazy, I started with ndiswrapper. But, it would not run the windows driver provided by D-Link (giving an error related to MmGetSystemRoutineAddress). I compiled ndiswrapper using the most recent version... same error. Looks like a bug or an unsupported call in the driver.
2. The DWA-125 has a Ralink RT3070 chipset. I tried the latest Ralink windows xp driver for the chipset. Same problem.
3. Fortunately, Ralink provides source code for linux kernel drivers. So, I downloaded the latest linux driver for the RT3070USB from www.ralinktech.com. I extracted to my local directory. Prior to compilation, I changed several options in the [ROOT_OF_DRIVER_SOURCE/]os/linux/config.mk file (more specifically, I changed 2 wpa_supplicant lines to 'y' instead of 'n'). In the root of the driver's source directory, I ran 'sudo make', and then 'sudo make install". [EDIT: NOTE THAT YOU NEED TO INSTALL THE 'BUILD-ESSENTIAL' PACKAGE FIRST]
3. In Ubuntu 9.10 Karmic, the new kernel drivers for other Ralink cards really seem to muck things up, and I was not able to get them to work for this chipset (hopefully that is only a minor glitch). To fix (9.10 only):
a. I blacklisted the newly built in Ralink drivers by adding the following end of the /etc/modprobe.d/blacklist.conf file:
blacklist rt2x00usb
blacklist rt2x00lib
blacklist rt2800usb
b. The kernel was still not loading my Ralink driver. I found that the kernel staging directory still had the old version of the driver in it. So, I moved that to a local directory (in case I need it later) by typing -- "sudo mv /lib/modules/2.6.31-15-generic/kernel/drivers/staging/rt3070/rt3070sta.ko [DESTINATION OF LOCAL DIRECTORY]." UNFORTUNATELY, THIS NEEDS TO BE DONE AFTER EVERY KERNEL UPDATE. UGH. CAN SOMEONE ADVISE AS TO WORKAROUND?
[NOTE: My kernel at the time was 2.6.31-15-generic. If your's is different then the directories will change accordingly.]
c. Just in case, I run "sudo depmod"
4. I then installed the driver into the kernal by typing 'sudo modprobe rt3070sta'. Plug in device and watch kernel log (or run dmesg) to make sure kernel identified USB device, loaded correct module and did not throw errors.
Some people report that dmesg/kernel log throws the following error when they plug in the device at this point: "Open file "/etc/Wireless/RT2870STA/RT2870STA.dat" failed!". That is a problem, and I believe it comes from a bug in the source code. Fix by creating a sybolic link to the directory "/etc/Wireless/RT3070STA" called /etc/Wireless/RT2870STA".
Note: I as able to connect to the (temporarily unencrypted) network using iwconfig and ifconfig. However, on reboot, the new rt3070sta kernel module was not loading automatically. I found that the Wireless adapter was still causing ndiswrapper to load in place of the new rt3070sta kernel module. I found that this was caused by 'alias' commands in the file '/etc/modprobe.d/ndiswrapper' interfering with things. Since I did not need ndiswrapper any longer, I uninstalled it and deleted '/etc/modprobe.d/ndiswrapper'. After that, the driver loaded flawlessly and automatically after reboot and/or re-plugging the usb device.
5. To get network-manager to work, change [ifupdown] managed=false to true in /etc/NetworkManager/nm-system-settings.conf. Then, reboot or run the following:
sudo /etc/init.d/networking restart
sudo restart network-manager
I hope this helps.
Bookmarks