My new desktop don’t has an integrated wireless card, but has 10 USB ports, so I’ve decided to use an external USB/Wireless adapter to connect it to the WI-Fi at my home, using a cable is not an option, I’ve the router in another room, and it would be a mess to bring it to the desktop, so without doing any research on the net for linux-friendly adapter (and i really suggest you to do this if you want to buy one) I’ve bought a D-LINK N 150 aka DWA-125 on the local mall, basically I’ve bought the cheapest adapter with a name i know.
And setting this up it’s been the hardest part of all the new installation, if you have the “luck” to have this hardware this small guide can perhaps help you too, I’ve done it on a Mint 13, but this should work flawlessly on Ubuntu and Debian as well, and probably on most distributions.
Verify your device
As first thing verify that you have the same adapter I’m using, to check this connect it to an usb port and, open a terminal and run the command
lsusb, you should have an output like this one
linuxaria@mint-desktop ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 04e8:61b6 Samsung Electronics Co., Ltd
Bus 001 Device 004: ID 058f:6364 Alcor Micro Corp. Hi-Speed 7-in-1 Flash Card Reader/Writer [Sabrent]
Bus 002 Device 003: ID 2001:3c19 D-Link Corp.
Bus 002 Device 004: ID 0424:2524 Standard Microsystems Corp. USB MultiSwitch Hub
Bus 002 Device 005: ID 050d:0102 Belkin Components Flip KVM
Bus 002 Device 006: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard
Bus 002 Device 007: ID 046d:c01d Logitech, Inc. MX510 Optical Mouse
Bus 001 Device 005: ID 0951:1643 Kingston Technology DataTraveler G3 4GB
In my case it’s the device 003, the important numbers to identify the usb hardware are 2001:3c19 these 2 numbers indicates the Vendor:Product, you can also use a more verbose output with
lsusb -v :
linuxaria@mint-desktop ~ $ lsusb -v -d 2001:3c19
Bus 002 Device 003: ID 2001:3c19 D-Link Corp.
Couldn't open device, some information will be missing
bDeviceClass 0 (Defined at Interface level)
idVendor 0x2001 D-Link Corp.
So if you have that couple of numbers, you have the same device I’m using and so you can continue to follow this how-to, if your numbers are different, sorry this will not probably help you.
Add the correct Module to the Kernel
I’m using the kernel: 3.2.0-23-generic at 64 bit, and for what I’ve found (but i could be wrong of course) there is not module included for the D-Link DWA-125 so we must download the correct driver source, compile it and insert the module into the kernel..but don’t worry it’s not so hard.
1) Download from the page: http://www.ralinktech.com/en/04_support/support.php?sn=501 the file “RT8070 /RT3070 /RT3370 /RT5370 /RT5372 USB” with date 03/28/2012 and version 126.96.36.199 or a newer one if you find it.
2) Now open a terminal and extract the driver and do a cd in the new directory
tar -Jxvf 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V188.8.131.52_DPO.bz2
3) Now we have to enable WPA for the driver, so edit the file: 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V184.108.40.206_DPO/os/linux/config.mk and change these 2 parameters that otherwise are set to N:
4) Now in the terminal run the command:
And you can safely ignore this error: cp: cannot create regular file `/tftpboot’: Permission denied
5) Now we have the module, we have to copy it in the correct position and load it:
sudo cp ./os/linux/rt5370sta.ko /lib/modules/`uname -r`/kernel/drivers/net/usb/
sudo depmod -a
and then copy the default configuration file:
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat
sudo modprobe rt5370sta
6) Now you should be able to use network-manager or any other tools such as wicd or command line to configure the wifi.
7) If everything works, load automatically this module adding it to the file /etc/modules, as last line add:
You have to re-do this for any new major release of the kernel, unless it will be included in the new one…we’ll see, for the moment is working and it’s stable.
Thanks to: Pclinuxos Forum
- Linux game: Garry’s Mod
- Check how much do you type with WhatPulse on Linux
- Linux Terminal: Reptyr attach a running process to a new terminal
- Zorin OS Contest Results
- Linux Terminal: speedtest_cli checks your real bandwidth speed.
Find me on Google+