# Can't get madwifi into master mode

## PyroBoy101

I've been trying to get my atheros card to go into master mode but it just won't go!

I emerged the latest and greatest madwifi driver and tools from portage, 0.1420.20060201 with the onoe USE flag.  I have the newest stable wireless-tools installed, but also tested with version 27-r1.  I loaded the modules for it and get this in the dmesg:

```

ath_hal: 0.9.16.13 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413, DFS)

wlan: 0.8.4.2 (Atheros/multi-bss)

ath_rate_onoe: 1.0

ath_pci: 0.9.4.5 (Atheros/multi-bss)

ACPI: PCI Interrupt 0000:02:07.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

wifi0: H/W encryption support: WEP AES AES_CCM TKIP

wifi0: mac 7.8 phy 4.5 radio 5.6

wifi0: Use hw queue 1 for WME_AC_BE traffic

wifi0: Use hw queue 0 for WME_AC_BK traffic

wifi0: Use hw queue 2 for WME_AC_VI traffic

wifi0: Use hw queue 3 for WME_AC_VO traffic

wifi0: Use hw queue 8 for CAB traffic

wifi0: Use hw queue 9 for beacons

wifi0: Atheros 5212: mem=0xff9f0000, irq=11

```

Looks good to me, right?

ath0 and wifi0 show up in my 'ifconfig -a' listing. It connects to other APs just fine so no problem there. But then I try to make it go into master mode using the command 

```
 iwconfig ath0 mode Master 
```

 and then it starts complaining: 

```
Error for wireless request "Set Mode" (8B06) :

    SET failed on device ath0 ; Invalid argument. 
```

Looking on the madwifi wiki I saw that we can setup a master with the command 

```
 wlanconfig ath create wlandev wifi0 wlanmode ap 
```

 However now it complains by saying 

```
 wlanconfig: ioctl: Input/output error 
```

Any ideas? I've looked around quite a bit and I just can't figure out where I'm going wrong.

Thanks!

----------

## Phlogiston

I'm sorry but what is the master mode for? I'm also using madwifi driver and the logs look ok. If you tell me about the master mode I could try out here and tell you what I get.

----------

## jpl888

I haven't any experience with Wifi on Linux although I am toying with the idea, but I have read that to use a Linux box as a wireless router you need to put the card into "master mode".

That is of course assuming the wireless card supports master mode.

What model Atheros card is it?

----------

## PyroBoy101

The card definitely supports it, I had it working in Knoppix today. 

Its a D-link card, can't find the box for the life of me but lspci outputs:

```
 0000:02:07.0 Ethernet controller: Atheros Communications, Inc.: Unknown device 001a (rev 01) 
```

----------

## jpl888

Try 

```
wlanconfig ath0 destroy
```

 and run iwconfig again

----------

## Kompi

I had the same problem after upgrading to madwifi-driver 0.1420. I solved it by upgrading to the latest (unstable) baselayout (1.12.0_pre15). The bahavior of the madwifi-ng driver seems to have changed, so the net-script needs some upgrades. Looks like they are implemented in the 1.12s version of baselayout.

----------

## Phlogiston

I have antoher problem with my atheros card supported by madwifi. I can't set it to power save mode. The command taken from the gentoo power managment guide gives the following:

 *Quote:*   

> 
> 
> iwconfig ath0 power on power max period 3
> 
> Error for wireless request "Set Power Management" (8B2C) :
> ...

 

So is it just no support or does anyone have a hint?

Phlogiston

----------

## Adrien

Hi !   :Smile: 

Master mode seems to work only with this versions of madwifi-* for the moment:

```
~0.1_pre20050420-r1 ~0.1401.20060117
```

At least, other versions didn't work for me...

----------

## Paris Heng

 *PyroBoy101 wrote:*   

> I've been trying to get my atheros card to go into master mode but it just won't go!
> 
> I emerged the latest and greatest madwifi driver and tools from portage, 0.1420.20060201 with the onoe USE flag.  I have the newest stable wireless-tools installed, but also tested with version 27-r1.  I loaded the modules for it and get this in the dmesg:
> 
> ```
> ...

 

Hi Pyroboy101, do you able to set the Master mode by now in the Madwifi? Please reply.

----------

## Monkeh

*sigh*

You cannot change the mode of a madwifi device using iwconfig. http://madwifi.org/wiki/UserDocs/ChangingMode

----------

