How to: Get your D-link N150 wireless adapter to work.
Sometimes apparently simple things turn out to be a little bit harder than expected, among those is usually the use of USB wireless adapters. Everyone in the community will always recommend you to check, when you’re about to buy new hardware, if it works out of the box with Netrunner.
While that’s undoubtedly a wise advice is clearly meant for people who already use Netrunner, newcomers don’t buy new hardware to test it (at least not the majority of them) they just install it in the current PC.
So if you have a D-Link Wireless N150 USD adapter (dwa-125) and you’re suffering because you can’t make it work you will find this article very helpful.
First, before advancing any further, we should verify that you have the same exact adapter instead of just one that looks similar. Look at the back of the adapter and it should read dwa-125 like this:
In case the sticker is missing plug it in and run the following command:
lsusb -v -d 2001:3c19
Don’t worry, you don’t need to look for anything in that list, if you get something is because you have the adapter in question. If not, well then you don’t. You can leave a comment and I can try to help you in case you’re having issues with other adapter (I’ve been using Linux for a long time, problems with network adapters are a thing that I had encounter many times).
The next step is to download the driver, actually we need the source to compile it. We need to make a few modifications to the source, to make things easier you can download the modified version right here.
Now we just extract it, you can do so by right clicking it and selecting extract archive here. Alternatively you can extract it by running the following command by replacing path with the location where you downloaded it:
tar -zxvf ~/path/dwa-125.tar.gz
In case you’re not currently using Netrunner but instead Ubuntu or another Ubuntu-based distro, you need to install a one thing first:
sudo apt-get install build-essential
Time to compile it. Again we need to get the right place, replace path with the location you extracted the source to:
Now we just run
And install it with
sudo make install
If everything went fine when you run the next command the driver should load up:
sudo modprobe rt5370sta
It should immediately pop-up in the Network Manager:
Now that you know it worked we just need to make the driver load automatically every time you turn on the computer, that’s done fairly easy by running:
sudo kate /etc/modules
And we’re done. I hope this helps some of you, and I hope you like Netrunner now even more now that you have a working wireless adapter. Cheers.