Pavel, your syntax is not quite right. It's actually "iw dev wmaster0 interface add mon0 type monitor" (for a Radiotap interface - replace "monitor" with "managed" for a STA interface). I'll write up some documentation on it when I have time.
For the record, here is my conversation with Celejar about iw, which I accidentally didn't post to the list: ---------- Forwarded message ---------- From: Stefanik Gábor <[EMAIL PROTECTED]> Date: Tue, Apr 15, 2008 at 3:08 PM Subject: Re: mac80211 sysfs interface To: Celejar <[EMAIL PROTECTED]> The usage information given by iw itself, is pretty much nonsense. The actual syntax is this: "iw dev <master device or an existing virtual interface> interface add <the interface you want to create> type <type of virtual interface>" for adding interfaces, and "iw dev <virtual interface you want to remove> interface del" for removing them. There is also an "iw dev <master device or existing VAP> info" command for information related to the device. When adding interfaces, the first parameter can be either the master device you want your VAP to point to, or an existing VAP pointing to the same master device, but NOT the PHY device as iw's help says, that is, "wmaster0", "wlan3" and "rtap0" are correct for this parameter, but not "phy0". The second parameter is the interface you want to create. I tend to name my interfaces "wlanX" for managed mode interfaces and "rtapX" for monitor interfaces, however you can use almost any name - I once did a penetration test of my own network with a managed interface called "victim" and a monitor/radiotap interface called "hacker", to simulate the conditions of a real-world attack. I was Youtubing through "victim", while monitoring on "hacker", and managed to crack my own WEP key in 5 minutes. (That was when I switched to WPA.) The third parameter is possibly the most important one - the values you will most likely need are "managed" (to create a managed/STA device) and "monitor" (for a Radiotap monitor/promiscuous interface). So, the equivalent of "echo -n mon0 > /sys/class/ieee80211/phy0/add_iface" is "iw dev wmaster0 interface add mon0 type monitor" (not "iw dev phy0 interface add mon0 mode monitor" as the documentation suggests). The new interface will be in monitor mode immediately, so you don't need to put it into monitor mode before bringing it up. When removing interfaces, there is only one variable parameter, and that's the interface you are removing. So, the equivalent of "echo -n mon0 > /sys/class/ieee80211/phy0/remove_iface" is "iw dev mon0 interface del", and not "iw dev phy0 interface del" or "iw dev phy0 interface del mon0" as the documentation suggests. Note to the devs of iw: the syntax could be greatly simplified by removing the "dev" and "interface" (and possibly "type") strings from the command line, so "iw dev wmaster0 interface add mon0 type monitor" would become "iw wmaster0 add mon0 monitor" or "iw wmaster0 add mon0 mode monitor". Even better would be "iw -a --phy=wmaster0 --mode=monitor mon0". On Tue, Apr 15, 2008 at 5:46 AM, Celejar <[EMAIL PROTECTED]> wrote: > On Tue, 15 Apr 2008 00:14:17 +0200 > "Stefanik Gábor" <[EMAIL PROTECTED]> wrote: > > > Add_iface/remove_iface have been removed long ago, you need to use an > > nl80211 utility like iw or pynl80211 to add/remove virtual interfaces. > > Thanks much. I managed to build it, and even edited the wiki page to > reflect my experiences [0], but I'm having trouble figuring out the > usage syntax. Can you point me toward some sort of guide? > > [0] http://linuxwireless.org/en/users/Documentation/iw > > Celejar > -- > mailmin.sourceforge.net - remote access via secure (OpenPGP) email > ssuds.sourceforge.net - A Simple Sudoku Solver and Generator > > -------------------------------------------------------------------------------------------------------- On Tue, Apr 15, 2008 at 9:49 PM, Pavel Roskin <[EMAIL PROTECTED]> wrote: > On Mon, 2008-04-14 at 09:52 -0400, Celejar wrote: > > Hi, > > > > I'm playing with b43 with my BCM4318 (rev 02). It seems to be working > > fine in station and monitor modes (currently 2.6.24 self compiled from > > Debian Sid packaged source), but I'm baffled by instructions I've seen > > (e.g. in the Packetspammer docs) that discuss adding monitor mode to my > > interface via something like "echo -n mon0 > > > /sys/class/ieee80211/phy0/add_iface". That directory on my system > doesn't > > contain 'add_iface': > > > > $ ls /sys/class/ieee80211/phy0/ > > device index macaddress power subsystem uevent > > Same thing here with wireless-testing. I don't see any "add_iface" in > the kernel sources. Perhaps your documentation is obsolete. > > I guess you need iw: > git-clone http://git.sipsolutions.net/iw.git > > And then run something like this: > iw type station dev wmaster0 interface add > > Sorry, iw is undocumented, so that's what I could figure out by reading > the code. If it doesn't work, please ask in > [EMAIL PROTECTED] > > -- > Regards, > Pavel Roskin > _______________________________________________ > Bcm43xx-dev mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/bcm43xx-dev > -- Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
_______________________________________________ Bcm43xx-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
