this post is to document the alfa AWUS050NH 802.11a/b/g/n 500mW USB adapter's compatibility with the rt2x00 (specifically rt2800usb) linux driver from compat-wireless-2.6 in backtrack 4beta
[[ that was a mouthful ]]

be advised that the AWUS050NH adapter will work just fine with the rt2870sta driver
the BT4beta rt2870sta HOWTO resides here ::

I started all over, fresh install of backtrack 4beta using a mixture of pureh@te's hard drive install tutorial + Virchanza's tutorial for Hard Disk Install : Just 1 Partition

-ok, ready to go-'s documentation explains everything, really...

  1. grab the latest compat-wireless-2.6 from Index of /kernel/compat-wireless-2.6 -- it turned out to be exactly ::

    (( I hear you can also just grab which is supposed to be the LATEST compat-wireless-2.6 "bleeding edge compat-wireless" ))
  2. you need the rt2870 USB FIRMWARE from Ralink corp. | Linux
    direct link to with rt2870 USB firmware included =
    ** we will download+extract the rt2870.bin firmware file, and move it /lib/firmware **
  3. root@bt:~# cd
    root@bt:~# unzip
    (( I got some strange warnings here - mismatching "local" filename - nothing that was fatal tho ))
    root@bt:~# mv RT2870_Firmware_V8/rt2870.bin /lib/firmware
    root@bt:~# ls -al /lib/firmware/rt2870.bin
    -rw-r--r-- 1 root root 4096 2008-04-25 18:38 /lib/firmware/rt2870.bin
    root@bt:~# tar jxvf compat-wireless-2009-06-11.tar.bz2
    root@bt:~# cd compat-wireless-2009-06-11
    root@bt:~# make clean
    root@bt:~# make
    root@bt:~# make install
    root@bt:~# make unload
    root@bt:~# modprobe rt2800usb

  1. I grabbed the newest version of the tool "iw" straight from the iw git repository
    once you get to the iw git page, near the top in the "shortlog" category, I clicked the first "snapshot" link, which downloads the latest tarball of the iw git repository!
    **you can also grab the latest stable release of iw as well, from this page**
  2. root@bt:~/downloads# tar vxzf iw-aea5dbd2fe8f70be333b008e64788c4b8410cbfa.tar.gz
    root@bt:~/downloads# cd iw
    root@bt:~/downloads/iw# mv /usr/bin/iw /usr/sbin/OLDiw--OGbt4beta <<-- allows you to backup yr old version of iw
    root@bt:~/downloads/iw# make
    root@bt:~/downloads/iw# make install
    root@bt:~/downloads/iw# cp -p iw /usr/sbin

it t`was quite simple really ... here is some info about the driver, etc ::

root@bt:~# modinfo rt2800usb
filename: /lib/modules/
license: GPL
firmware: rt2870.bin
description: Ralink RT2800 USB Wireless LAN driver.
version: 2.3.0
srcversion: CFCA4A312BA1DF73A0822CC
alias: usb:v0586p341Ad*dc*dsc*dp*ic*isc*ip*
***MANY alias: usb:* here*** (soo many that i got the "too many characters to post" error)
alias: usb:v07B8p2870d*dc*dsc*dp*ic*isc*ip*
depends: rt2x00lib,rt2x00usb
vermagic: SMP mod_unload 486
parm: nohwcrypt:Disable hardware encryption. (bool)
this adapter supports multiple virtual interfaces (with some restrictions) from the rt2x00 forum
[once your card is connected via USB] ... there should already be a single interface, say "wlan0". Now you can create a new interface with the iw tool (replace "wlan1" with a name, you like):
# iw dev wmaster0 interface add wlan1 type managed
You should now be able to see the interface with "iwconfig".
Configuration and association works just like with any other interface, but be aware, that the hardware currently does not support connection to different APs or mixed AP/Client mode. Multiple interfaces are thus only helpful for "monitor" interfaces and sniffing tools.
Allowed interface combinations:
1 Managed + x Monitor
1 Adhoc + x Monitor
y Master + x Monitor

Where y depends on the hardware:
rt61pci/rt73usb support up to 4 virtual AP interfaces
rt2800pci/rt2800usb support up to 8 virtual AP interfaces
-= systems tested/tester =-

::: overview of test results :::
  • packet injection :: using the aircrack-ng tools suite, injection works out-of-the box *NO PATCH REQUIRED* with recent compat-wireless-2.6 (rt2x00/rt2800usb) linux drivers.
  • mac address changing :: you can change your MAC address successfully using "macchanger".
  • monitor mode :: "airmon-ng start wlan0" -OR- "iw phy phy0 interface add mon0 type monitor"
  • scanning APs :: "iw dev wlan0 scan [passive]" -OR- "iwlist wlan0 scan"

***************BT4 pre final + rt2x00/rt2800usb driver info***************
turns out BT4 pre final ships with rt2870sta by default for the Alfa AWUS050NH adapter, which DOES WORK! but if you want to use the rt2x00/rt2800usb drivers documented here (which imho work a little better for me), you will need to make small amount of changes.
  1. rmmod rt2870sta <<-- unloads the rt2870sta driver from memory
  2. echo "blacklist rt2870sta" >> /etc/modprobe.d/blacklist
  3. follow the document from the very top and you should have operational rt2800usb drivers in no time flat!

IF you want to go BACK to the rt2870sta drivers while still in BT4 pre final ::
  1. comment out "blacklist rt2870sta" by adding a # to the front of the line in /etc/modprobe.d/blacklist
    sed -i 's|blacklist rt2870sta|#blacklist rt2870sta|g' /etc/modprobe.d/blacklist
  2. then blacklist the rt2x00/rt2800usb drivers in /etc/modprobe.d/blacklist like so ::
    echo "blacklist rt2800usb
    blacklist rt2x00usb
    blacklist rt2x00lib
    blacklist mac80211
    blacklist cfg80211
    blacklist rfkill_backport
    blacklist input_polldev
    blacklist led_class" >> /etc/modprobe.d/blacklist
  3. then remove the rt2x00/rt2800usb drivers from memory ::
    rmmod rt2800usb rt2x00usb rt2x00lib mac80211 cfg80211 rfkill_backport input_polldev led_class
  4. lastly, call rt2870sta driver ::
    modprobe rt2870sta