Automatically startingin Monitor mode?

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4768

DigitalParasite

01-05-2008 19:31:05

I have my USB WiFi card and r73 driver working fine manually with Linux 2.6.23.15 in Fedora 7. When I boot the computer with the USB adaptor plugged in or plug in the adaptor while the system is already on, it always starts in "Managed" mode. I can manually configure the device to monitor mode (ie iwconfig mode monitor) but is there any way to automatically do this when the USB device is plugged in either using a modprobe command line switch like with atheros cards (ie options ath_pci autocreate=monitor in /etc/modprobe.conf)?

The ifcfg-wlan0 options don't seem to support MODE=monitor in Fedora for whatever reason so that is why I was hoping there is a way at the driver level. Or is there something in the driver source code that sets managed mode as default that I could change and recompile the drive so monitor mode is default? Or any other suggestions on how to accomplish this?

Thanks in advance.

IvD

01-05-2008 21:17:08

You should ask Fedora people how to configure the wireless interface to go directly into monitor mode.
I am sure it is just a simple configuration option in their network configuration files.

DigitalParasite

02-05-2008 13:16:58

You should ask Fedora people how to configure the wireless interface to go directly into monitor mode.
I am sure it is just a simple configuration option in their network configuration files.[/quote36civar1]

That is why I am posting here because the Fedora people were not able to help. The network configuration system does not support Monitor mode as I mentioned in my first post and will not apply the settings when the interface comes up so it defaults back to Managed mode. So I was hoping there is some configuration option with modprobe to help or if someone knew where to start looking in the driver source to set the default to monitor mode.

Thanks.

fatah

03-05-2008 10:56:14

I think, I did it last time in Mandriva (now Ubuntu 7.04). You need to tweak both files
1. /etc/sysconfig/network-scripts/ifup-wireless and
2. /etc/sysconfig/network-scripts/ifcfg-wlan0 (if wlan0)

Try to add 'mode' function if none or refer to http//www.nabble.com/wireless-Deactiva ... 71905.html

darkxer0x

25-07-2008 09:08:59

It's simpler than that.
You have to add an interface in mode monitor. With iw is very simple
Install iw[/url3jbk0u8p]
Add the interface with iw [b3jbk0u8p]iw dev wmaster0 interface add mon0 type monitor[/b3jbk0u8p]
Read this [url=http://lists.berlios.de/pipermail/bcm43xx-dev/2008-April/007274.html3jbk0u8p]message[/url3jbk0u8p] about iw

DigitalParasite

28-08-2008 18:52:20

It's simpler than that.
You have to add an interface in mode monitor. With iw is very simple
Install iw[/url1ifkvgcz]
Add the interface with iw [b1ifkvgcz]iw dev wmaster0 interface add mon0 type monitor[/b1ifkvgcz]
Read this [url=http://lists.berlios.de/pipermail/bcm43xx-dev/2008-April/007274.html1ifkvgcz]message[/url1ifkvgcz] about iw[/quote1ifkvgcz]

Thanks. IW only seems to work with the rt2x00 driver and not the legacy rt73 driver so that won't work in this case.

When I do try iw with the rt2x00 driver, it creates the mon0 device in monitor mode, but as soon as I reboot it is gone. How would I make it stay permanently so it will start in monitor mode even after a reboot?

DP

Spy84464

29-08-2008 17:14:55

That's possible using a startup script, or your distribution relevant mechanism.
With Ubuntu, edit the file "/etc/network/interfaces", and add that stanza
"pre-up iw dev wmaster0 interface add mon0 type monitor" in the "wlan0" category.