1. Check Hardware

First thing is to check that your key is the right one.

You can check it by two ways :

  • package barcode showing H/W Ver.:B1 F/W Ver.:2.00
  • USB Vendor ID 2001 and Device ID 330d

dlink-dwa131-barcode

# lsusb

Bus 002 Device 020: ID 2001:330d D-Link Corp.

2. Install firmware

Before going further, you have to make sure that you get the firmware file /lib/firmware/rtlwifi/rtl8192cufw.bin needed by the USB key at cold boot.

This firmware is provided by one of these two packages :

# sudo apt-get install linux-firmware linux-firmware-nonfree

3. Install Latest Kernel 3.8

You need latest 3.8 kernel to be able to handle the USB key.

At the time of this article, latest version is 3.8.10, available from kernel.ubuntu.com.

Download the following packages :

  • linux-headers-3.8.10-030810_3.8.10-030810.201304291235_all.deb
  • linux-headers-3.8.10-030810-generic_3.8.10-030810.201304291235_arch.deb
  • linux-image-3.8.10-030810-generic_3.8.10-030810.201304291235_arch.deb

where arch corresponds to your architecture (i386 or amd64).

Then, install them :

# sudo dpkg -i linux-*-3.8.0-*.deb
# sudo update-grub

Reboot your computer. It will be running latest kernel 3.8.10.

4. Manual Setup

The DWA-131 chipset is handled by rtl8192cu module. This module is not auto-loaded, it has to be loaded manually.

To avoid any problem, it’s better to load the module while disabling the hardware encoder with option swenc=1.

# sudo modprobe rtl8192cu swenc=1

As the USB Vendor ID & Device ID are not known to the module, we need to declare it live as a new ID.

# echo “2001 330D” | sudo tee /sys/bus/usb/drivers/rtl8192cu/new_id

You can now connect your D-Link DWA-131 rev B1 key.

The blue light should switch on. The key has been loaded with the firmware file /lib/firmware/rtlwifi/rtl8192cufw.bin

It can now be used from Network Manager.

5. Automatic Setup

Now that the DWA-131 rev B1 key works, all previous steps need to be done automatically at every boot.

You can load rtl8192cu module at every boot by adding it into /etc/modules :

# sudo gedit /etc/modules

/etc/modules


# DWA-131 rev B1
rtl8192cu

You have to declare rtl8192cu module options to be used when loading :

# sudo gedit /etc/modprobe.d/net-rtl8192cu.conf

/etc/modprobe.d/net-rtl8192cu.conf

options rtl8192cu swenc=1

Finally, declare USB vendor and Device ID of DWA-131 dynamic declaration at the end of /etc/rc.local :

# sudo gedit /etc/rc.local

/etc/rc.local


# Declare DWA-131 USB ID to rtl8192cu module
echo “2001 330D” | tee /sys/bus/usb/drivers/rtl8192cu/new_id

exit 0

Ubuntu 12.04 – Install D-Link DWA-131 rev. B1 wifi adapter

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.