VIVAHATE

April 2011

Ralink RT2870/RT3070 in Debian 6 (Squeeze)

About a year ago, I got this cheap-o USB 802.1n wireless adapter for $15. lsusb reports the device as: Bus 002 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter. In theory, this adapter should be supported out of the box using the rt2870sta module. Of course, just working would be too easy.

To get the wireless adapter to work, we first have to blacklist a few kernel modules.

NOTE: While these instructions are for Debian 6, they should apply to most Debian-based distributions.

Create the following files in /etc/modprobe.d:

$ cd /etc/modprobe.d
$ touch rt2800lib.conf rt2800pci.conf rt2800usb.conf rt2x00lib.conf rt2x00pci.conf rt2x00usb.conf rt61pci.conf

Next, add the following to each file. replacing the name of the module you want to blacklist as necessary (the pattern here should be obvious):

$ cat rt2800lib.conf
blacklist rt2800lib

Next, we need a couple packages. First, install wireless-tools. This should be available on your install media.

$ sudo apt-get install wireless-tools

Next, install the firmware-ralink package. Assuming you don’t yet have an internet connection, you probably won’t find this on your install media as it’s in non-free. I downloaded the package on another computer, transfered it over on a flash drive, and installed it manually.

Reboot. Cross your fingers.

Connecting

# aptitude install wpasupplicant
# iwlist wlan0 scan
# nano /etc/network/interfaces

Add the following:

auto wlan0
iface wlan0 inet dhcp
        wpa-ssid ESSID
        wpa-psk PASSPHRASE

Bring up the interface.

# ifup wlan0