This method has only been tested under Ubuntu 10.04 (Lucid Lynx), but should work for any previous version of Ubuntu. Additionally, the driver compile instructions referenced should work for any modern Linux distribution (2.6+ kernel). YMMV.
The default driver for the D‑Link DWA-125 wireless 150 USB adapter currently available as part of the Ubuntu Linux distribution has errors. This article offers a method for fixing this issue.
You will need a default Ubuntu install (ideally), a D‑Link DWA-125 wireless USB adapter and access to an account on the machine in question that has superuser capabilities.
Firstly, plug the device into a USB port and identify it using the following command:
lsusb | grep D-Link
This should return the following text as output:
Bus 001 Device 003: ID 07d1:3c0d D-Link System
If the USB device ID is 07d1:3c0d, then continue to the next step. If not, then the device is not the D‑Link we are looking for and is out of scope.
The issue can be confirmed by checking the system output using one of the following commands:
The next step is to grab the most current Linux driver from D‑Link, compile it and install it. The GNU make program is needed for this step, but it should already be installed as part of a base Ubuntu installation. Run the following commands to download the current driver source, extract it, compile it and finally install it for use:
wget --quiet ftp://www.dlinkla.com/pub/drivers/DWA-125/*LINUX*DWA-125*.tar.gz --directory-prefix=/tmp ;
tar -xzf /tmp/*LINUX*DWA-125*.tar.gz ;
cd /tmp/*RT3070*Linux* ;
make && sudo make install ;
echo "blacklist rt2800usb" | sudo tee --append /etc/modprobe.d/blacklist.conf
If the commands above complete successfully, the new driver has been installed and the incorrect driver has been prevented from automatically loading. Restart the computer and the device will be available for use.