Getting D-Link DWA-140 working in Ubuntu 10.4 Lucid Lynx

I had to buy a new WLAN adapter, and after a bit of searching I settled on the D-Link DWA-140 because of its seemingly good Linux support. When the package finally arrived, to my dismay it wasn’t recognized by Ubuntu at all.

I tried to install the latest Ralink drivers, but it took a lot of fighting before they even recognized the adapter, and even then I couldn’t see any networks in NetworkManager. I finally got the card working by installing the Windows drivers for the DWA-140 with ndiswrapper, but that solution wasn’t without problems either: ndiswrapper kept crashing several times a day, leaving me no choice but to reboot to get back online.

The time I spent trying to get the Ralink drivers working wasn’t completely wasted, though. I found out that the problem with the stock drivers that ship with Ubuntu was that they were missing the USB device and vendor IDs for the DWA-140; Ubuntu had a driver for the adapter, but the driver didn’t know that it supports the device I had just plugged in.

Today I stumbled across a post on the Ubuntu Forums explaining how to add the IDs to the driver. Just follow the instructions, but use 07D1 3C0A instead of 1737 0078 (the instructions are for another adapter), and, if all goes well, you’ll have your DWA-140 working in no time.