Hey there,

to cut long things short:
I'm having bad trouble to get my Alfa AWUS036H (USB-wlan-interface with rtl 8187) to work with the aircrack-ng when Backtrack 4 R2 is hosted as a virtual machine in VM-Player. That's sad since I bought the Alfa-interface about two years or something ago especially to use it with Backtrack 3 (and it did a wonderful job).

But now, on Backtrack 4 R2, I'm feeling like I'm having to hack my own wireless device instead of keeping on learning to compromise the designated pentesting-devices.

After some hours of research I figured that on the start of every VM-Player session I have to use

Code:
rmmod rtl8187
#unplug the Alfa in the VM-Player
modprobe rtl8187
#plug the Alfa in via VM-Player and wait like 5 secs
ifconfig wlan0 up
to get Wicd to find some connections and use Firefox, Metasploit, and so on.

But when I try to run

airmon-ng start wlan0 (for example), I get

Found 2 processes that could cause trouble...
After some long and annoying sessions of trial and error I made it with

rmmod rtl8187
#unplug via VM-Player*
modprobe rtl8187
#plug in via VM-Player and wait about 5 secs
ifconfig wlan0 up
ifconfig wlan0 down #yep, I had to put it up and then down
iwconfig wlan0 mode monitor
ifconfig wlan0 up

followed by airmon-ng start wlan0 and so on and it worked including working injection and recieving my handshake. But it only worked once and seems like I have just been lucky. Since then I allways get

SIOCSIFFLAGS: Unknown error 132
on "ifconfig wlan0 up" or

Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Device or resource busy.
The fact, that it workes sometimes and sometimes doesn't is really kind of driving me crazy, esp. since I copied any command in the shell that made it work - it never worked twice (regardless of reconnection, reboot, and stuff).

Does anybody know a solution for this problem (since I've seen that many Alfa-users got those difficulties)? Or do I finally have to buy another usb-wlan-device?

Thanks in advance and best wishes,

Carnivore

PS: While I'm writing this I didn't get a working wlan-connection even after trying this

Code:
rmmod rtl8187
#unplug the Alfa in the VM-Player
modprobe rtl8187
#plug the Alfa in via VM-Player and wait like 5 secs
ifconfig wlan0 up
thing for about 15 times, while it worked after 1 - 5 tries until now