I just bought a D-Link DWA-160 revision B2. Little did I know that this revision comes with a Ralink chipset. The main reason why I got DWA-160 is because I already have one and I'm pretty happy with it. I mainly use it on a Windows computer, but I know that it works in Ubuntu 12.04 LTS for example, and it works out of the box. But my old DWA-160 is revision A2 and it uses an Atheros chipset.

  • DWA-160, rev A2 - my old one - works well with Linux
  • DWA-160, rev B2 - the new one - doesn't appear to have support on Linux

Maybe it's not that it's impossible to get it to work on Linux, as much as it is a difficult task for me. I am new to Linux and I am really trying to embrace Linux, but problems like these are giving me hard time.

I found this guide, and this appears to be the only guide on the whole holy web that has any viable information about this particular issue. But just looking at those commands makes my brain cook. So can someone please help me follow this guide by providing more digestible and understandable instructions? Also, this user explains how to do this on a Ubuntu Linux, can I still follow that guide point by point even on Debian Linux? I'm thinking that available dependencies and packages on each distro might be different.

According to Debian Wiki article, the carl9170 driver supports DWA-160 rev. A1 and A2 (these are Atheros). It does not say anything about B1 or B2 (these are Ralink). This driver is provided with Debian 7.2.1 (Wheezy) which is what I have. I tried plugging in my DWA-160 in a USB port anyway, it didn't even blink. So what now?... just blindly follow the instructions given by that French guy and hope for the best?

  • Theoretically, I could take the A2 versions I have on my Windows computer, and use it on Linux. And then install the B2 on my Windows computer. That should work... theoretically. But I don't really want to move it (e.g. I have its MAC address locked), and I want to make the B2 work on Linux and hopefully learn something in the process. – Samir Sep 30 '13 at 21:57
  • Please login as root and run "lspci -k". Then post the part of the output for your wireless card. It should look like this: [code]06:00.0 Network controller: Ralink corp. RT3062 Wireless 802.11n 2T/2R Subsystem: Ralink corp. RT3062 Wireless 802.11n 2T/2R Kernel driver in use: rt2800pci[/code] – Tim Oct 2 '13 at 0:57
  • @Tim Looks to me like you are using the lspci -k command to accomplish pretty much the same thing as with the lsusb -v command. The LS stands for "list" and PCI is the interface. So you are telling it to list PCI devices. While my device is a USB device. So that doesn't seem right in this case. Use lsusb instead, as in "list USB". PS: You can't use [code] tags in comments, this is not a forum. If you want to do in-line code markup you have to use the grave accent character (backticks). – Samir Oct 2 '13 at 14:51

This device requires the rt2800usb kernel driver to be present on the system. To find out if this module is loaded you can use the lsmod command. It will shows which loadable kernel modules (LKM) are currently loaded. If it's not loaded then you probably need to apt-get it.

Plug in the device into a USB port, and then use the lsusb command to locate the VID (vendor id) and PID (product id) of this device. The lsusb command alone will only list USB devices. You will need to use the verbose switch to see more details. If your device is listed as device ID 002 you can use lsusb -v -s 002 to see full details about that device, or only lsusb -v to see full details about all devices. If you have many USB devices then this is not recommended as it would overwhelm you with information, and you need to find the VID and PID for your particular wireless device.

Once you have the VID and PID, you can head over to Linux Wireless and see if your VID and PID is listed as supported. Pick D-Link as Vendor, and then try to locate a matching USB Vendor and USB Product from the other columns. Here's an example of what the VID and PID might look like.

VID: 0x07d1
PID: 0x3c11

These are from a DWA-160 B1 revision. In my case, with B2 revision, this is what the VID and PID values were like.

VID: 0x2001
PID: 0x3c1a

As you can see (if you see the list above) the 3c11 is the closest thing to 3c1a. It's not an exact match but this list is not 100% accurate as the driver is being constantly developed. If your VID and PID is not listed, then head over to www.google.com and do a search for your VID and PID on cateee.net. Enter your query like in the example below.

2001 3c1a site:cateee.net/lkddb/

I got only three hits qith this query. If you get no hits, then the device is probably not supported. If you do get a hit, then open the first search result and see what driver is used for this device. This allows you to learn the name of the driver. In my case, this query confirms that I need the rt2800usb driver. See Wireless Linux FAQ for more information.

There is some information on rt2800usb on the Debian wiki-page. I'm not very good with Linux. In fact, I am only starting to use Linux. So it's probably possible to get this driver as a file download and then copy it to the Debian Linux computer and install it manually, especially if you have no Internet connection on that computer. How could you have Internet connection when you're working at enabling the wireless adapter to allow you to connect?! But fortunate for me I had an Ethernet port on the computer, so I connected with network cable. I then used the apt-get command to get a different Linux image and the firmware/driver I needed. Something called kernel backport?... I'm new to Linux, but as I understand it, these are like... the latest and greatest versions of the kernel.

I first started Root Terminal and I used this command.

gedit /etc/apt/sources.list

This opens sources.list in gedit. I then added the following lines to it.

deb http://http.debian.net/debian/ wheezy main contrib non-free
deb-src http://http.debian.net/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

deb http://http.debian.net/debian/ wheezy-updates main contrib non-free
deb-src http://http.debian.net/debian/ wheezy-updates main contrib non-free

deb http://http.debian.net/debian/ wheezy-backports main contrib non-free
deb-src http://http.debian.net/debian/ wheezy-backports main contrib non-free

I then saved the changed to the file, and closed the window. Back in Root Terminal, I issued following command.

apt-get -t wheezy-backports install linux-image-3.10-0.bpo.2-686-pae firmware-linux-nonfree firmware-ralink

My kernel version at that moment was 3.2.0-4-686-pae. I now have 3.10-0.bpo.2-686-pae. Fore reference, here is the output of this command. I was prompted to insert a CD/DVD because I installed Debian Linux from a DVD disc and I have it listed in the sources.list file. If you remove it from there, you might not be asked to do the same.

root@tosh:/home/sam# apt-get -t wheezy-backports install linux-image-3.10-0.bpo.2-686-pae firmware-linux-nonfree firmware-ralink
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  firmware-linux-free initramfs-tools
Suggested packages:
  linux-doc-3.10 debian-kernel-handbook
The following NEW packages will be installed:
  firmware-linux-free firmware-linux-nonfree firmware-ralink
The following packages will be upgraded:
1 upgraded, 4 newly installed, 0 to remove and 87 not upgraded.
Need to get 25.2 MB/25.2 MB of archives.
After this operation, 87.9 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://http.debian.net/debian/ wheezy-backports/main initramfs-tools all 0.113~bpo70+1 [92.0 kB]
Media change: please insert the disc labeled                    
 'Debian GNU/Linux 7.1.0 _Wheezy_ - Official i386 DVD Binary-1 20130615-21:54'
in the drive '/media/cdrom/' and press enter

Get:2 http://http.debian.net/debian/ wheezy-backports/main linux-image-3.10-0.bpo.2-686-pae i386 3.10.5-1~bpo70+1 [24.2 MB]
Get:3 http://http.debian.net/debian/ wheezy-backports/non-free firmware-linux-nonfree all 0.39~bpo70+1 [851 kB]
Get:4 http://http.debian.net/debian/ wheezy-backports/non-free firmware-ralink all 0.39~bpo70+1 [20.9 kB]
Fetched 25.2 MB in 2min 30s (167 kB/s)                                         
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 129893 files and directories currently installed.)
Preparing to replace initramfs-tools 0.109.1 (using .../initramfs-tools_0.113~bpo70+1_all.deb) ...
Unpacking replacement initramfs-tools ...
Selecting previously unselected package linux-image-3.10-0.bpo.2-686-pae.
Unpacking linux-image-3.10-0.bpo.2-686-pae (from .../linux-image-3.10-0.bpo.2-686-pae_3.10.5-1~bpo70+1_i386.deb) ...
Selecting previously unselected package firmware-linux-free.
Unpacking firmware-linux-free (from .../firmware-linux-free_3.2_all.deb) ...
Selecting previously unselected package firmware-linux-nonfree.
Unpacking firmware-linux-nonfree (from .../firmware-linux-nonfree_0.39~bpo70+1_all.deb) ...
Selecting previously unselected package firmware-ralink.
Unpacking firmware-ralink (from .../firmware-ralink_0.39~bpo70+1_all.deb) ...
Processing triggers for man-db ...
Setting up initramfs-tools (0.113~bpo70+1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-3.10-0.bpo.2-686-pae (3.10.5-1~bpo70+1) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.10-0.bpo.2-686-pae /boot/vmlinuz-3.10-0.bpo.2-686-pae
update-initramfs: Generating /boot/initrd.img-3.10-0.bpo.2-686-pae
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.10-0.bpo.2-686-pae /boot/vmlinuz-3.10-0.bpo.2-686-pae
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.10-0.bpo.2-686-pae /boot/vmlinuz-3.10-0.bpo.2-686-pae
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.10-0.bpo.2-686-pae
Found initrd image: /boot/initrd.img-3.10-0.bpo.2-686-pae
Found linux image: /boot/vmlinuz-3.2.0-4-686-pae
Found initrd image: /boot/initrd.img-3.2.0-4-686-pae
Setting up firmware-linux-free (3.2) ...
update-initramfs: deferring update (trigger activated)
Setting up firmware-linux-nonfree (0.39~bpo70+1) ...
update-initramfs: deferring update (trigger activated)
Setting up firmware-ralink (0.39~bpo70+1) ...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.10-0.bpo.2-686-pae

I now have two options on the Grub boot menu. I can either start with 3.2.0 or with 3.10. I have to start with 3.10 in order for the wireless adapter to work. You might be able to remove that second option from the menu if you would like to, but I prefer to have it stay there just in case the other one stops working.

Like I said, I'm new to Linux, but I think I managed this quite nicely. I did get help from the Linux Wireless community and the Debian community. Thank you guy! I am leaving this answer as a future reference for myself and for others who have the same problem with B2 revision of DWA-160 wireless adapter.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.