# Atheros monitor mode issues

## dataking

I have 2 wifi cards attached/configured on my gentoo laptop.  The first is the built-in Broadcom 4306.  This is somewhat shakily configured using wpa_supplicant.  It kind of works, but I have to connect with a wired connection, then disconnect and manually bring up the interface with ifconfig.  This seems to work at home; I have yet to try to connect to a different wifi source.

That said....

I also have an Alfa Atheros AWUS036NHA card attached via USB, also managed by wpa_supplicant.  I believe I have all of the drives and firmwares installed, as I am able to sniff traffic.  However, I'd like to be able to put it in monitor mode to sniff traffic.  Whenever I use iwconfig to put it in monitor mode, it gives me an error saying that the device is busy -- enev after I've killed the wpa_supplicant process for that interface.

So:

1)  How can I find out which process is actually locking the device and preventing iwconfig from putting the USB device in monitor mode?

2)  Is the wlan0 wpa_supplicant process locking the USB device (config in the same file)?

TIA for any advice.

----------

## szatox

If you want to sniff, you probably have aircrack installed so you can use airmon to check what processes can possibly interfere.

Also, to use iwconfig you must have kernel compiled with wireless extensions support which is disabled by default (and iwconfig replaced by iw) <- i bet this is your issue

With atheros wireless you can have multiple interfaces attached to a single device, working in different modes. The only limit is that device can only work on a single frequency at any time. (and you do that with `iw`, so you don't need wireless extensions from kernel)

Also, since it's a mobile device, why won't you use some kind of network manager? You can stop it any time you want to do some tricky things, and let it keep you connected when you don't. Not like it's gonna help you with monitor mode  :Wink: 

----------

## dataking

 *szatox wrote:*   

> If you want to sniff, you probably have aircrack installed so you can use airmon to check what processes can possibly interfere.
> 
> Also, to use iwconfig you must have kernel compiled with wireless extensions support which is disabled by default (and iwconfig replaced by iw) <- i bet this is your issue
> 
> With atheros wireless you can have multiple interfaces attached to a single device, working in different modes. The only limit is that device can only work on a single frequency at any time. (and you do that with `iw`, so you don't need wireless extensions from kernel)
> ...

 

It would seem that the version of aircrack-ng I have installed doesn't have airmon.  So, I'm updating the the 1.2_beta version in portage.  I'll also check the aircrack-ng website to see if there's a newer version available there.

I do have the wireless extensions built into the kernel.  I'll look into 'iw'.

----------

