# (Possible Solution) "Set Mode" (8B06) error

## Colourpoint

First of all sorry for my bad english.

After a system update my wireless card is not working anymore.

```

 * Starting ath0

 *   Configuring wireless network for ath0

 *     ath0 configured as ESSID "Skynet"

 *     in master mode on channel 6 (WEP enabled - restricted)

 *   Bringing up ath0

 *     dhcp

 *       Running dhcpcd ...

Error, ath0: timed out                                                    [ ok ]

 *       ath0 received address 169.254.240.198/16

```

After the update I run the etc-update as usual.

These are the packets I emerged (from /var/log/portage/elog)

```

www-client:mozilla-firefox-2.0.0.7:20070930-205115.log

media-video:mplayer-1.0_rc1_p20070927-r1:20070930-182406.log

gnome-extra:gcalctool-5.9.14:20070930-180344.log

gnome-extra:gcalctool-5.9.14-r1:20070930-180321.log

mail-client:evolution-2.10.2:20070930-175858.log

mail-client:evolution-2.10.3:20070930-175819.log

app-text:poppler-bindings-0.6:20070930-161912.log

dev-python:pygtk-2.10.6:20070930-160936.log

dev-python:pygtk-2.12.0:20070930-160924.log

x11-libs:gtk+-2.12.0-r2:20070930-160239.log

app-portage:gentoolkit-0.2.4_pre6:20070930-152541.log

app-portage:gentoolkit-0.2.4_pre7:20070930-152538.log

net-misc:openssh-4.7_p1-r2:20070930-152516.log

net-misc:rsync-2.6.9-r4:20070930-151940.log

dev-python:pygobject-2.12.3:20070930-151722.log

dev-python:pygobject-2.14.0:20070930-151711.log

x11-libs:qt-4.3.1-r1:20070930-151446.log

dev-libs:atk-1.18.0:20070930-115013.log

dev-libs:atk-1.20.0:20070930-114924.log

x11-libs:pango-1.16.5:20070930-114545.log

x11-libs:pango-1.18.2:20070930-114438.log

net-fs:nfs-utils-1.1.0-r1:20070930-113641.log

sys-kernel:gentoo-sources-2.6.22-r8:20070930-113330.log

sys-apps:baselayout-1.12.10-r5:20070930-112708.log

sys-apps:busybox-1.7.1:20070930-112629.log

x11-libs:qt-3.3.8-r4:20070930-111254.log

x11-libs:libICE-1.0.4:20070930-094236.log

sys-apps:debianutils-2.25:20070930-094056.log

sys-apps:acl-2.2.45:20070930-094025.log

dev-libs:openssl-0.9.8e-r3:20070930-093731.log

dev-libs:glib-2.14.1:20070930-092432.log

net-mail:libpst-0.5.2:20070930-091457.log

app-arch:bzip2-1.0.4-r1:20070930-091327.log

sys-apps:portage-2.1.3.11:20070930-090642.log

```

After a review of all these logs I noticed in baselayout this:

```

WARNING: You have older net.* files in /etc/init.d/

They need to be converted to symlinks to net.lo.  If you haven't

made personal changes to those files, you can update with the

following command:

 /bin/ls /etc/init.d/net.* | grep -v '/net.lo$' | xargs -n1 ln -sfvn net.lo

```

Already done without solving my problem.

My /etc/conf.d/net (without comments)

```

modules=( "dhcpcd" )

config_ath0=( "dhcp" )

essid_ath0="Skynet"

mode_ath0="master"

channel_ath0="6"

key_Skynet="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx"

```

In fact, before the update I had this line

#mode_ath0="managed"

And it worked fine with /etc/modules.d/ath_pci 

options ath_pci autocreate=ap

After the update I had this first error:

```

* Starting ath0

 *   Configuring wireless network for ath0

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

    SET failed on device ath0 ; Invalid argument.

 *   ath0 does not support setting the mode to "managed"

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

    SET failed on device ath0 ; Invalid argument.

 *   ath0 does not support setting the mode to "managed"

 *   Failed to configure wireless for ath0                                [ !! ]

```

I think I solved this error replacing the commented line with this one

mode_ath0=master

But with this one I have the dhcpcd error.

After this I tried everything I found in gentoo forums, sure I forgot something:

USE="vram" emerge dhcpcd

emerged dhcpcd versions 2.0.5-r1, 3.0.16-r1 and the actual 3.1.5

emerged madwifi-ng and madwifi-ng-tools

I disabled wep and macs in my router and tried all again, without any luck, same error

dhcpcd -t 60, and -t 180, did not work too.

I tried with several changes in my net config as for example:

dhcp_ath0="release nodns nontp nonis"

dhcpcd_ath0="-I ''"

Nothing worked, always the dhcpcd error.

dhcpcd -d ath0 return this:

```

Info, ath0: dhcpcd 3.1.5 starting

Info, ath0: hardware address = 00:80:5a:22:2e:41

Info, ath0: broadcasting for a lease

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Debug, ath0: waiting on select for 20 seconds

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Debug, ath0: sending DHCP_DISCOVER with xid 0x2a7c6580

Error, ath0: timed out

Info, ath0: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-ath0.info'

Info, ath0: checking 169.254.240.198 is available on attached networks

Debug, ath0: sending ARP probe #1

Debug, ath0: sending ARP probe #2

Debug, ath0: sending ARP probe #3

Debug, ath0: sending ARP claim #1

Debug, ath0: sending ARP claim #2

Info, ath0: adding IP address 169.254.240.198/16

Debug, ath0: no dns information to write

Debug, ath0: forking to background

```

As a newbie I don't know what udev is for, but that's my /udev/rules.d/70-persistent-net.rules

```

# PCI device 0x10b7:0x6055 (3c59x)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:01:03:8a:08:73", NAME="eth0"

# PCI device 0x168c:0x0013 (ath_pci)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:80:5a:22:2e:41", ATTR{type}=

="1", NAME="ath0"

```

I don't really know what else I can try, please help.

Thanks!

ColourpointLast edited by Colourpoint on Wed Oct 10, 2007 8:38 pm; edited 2 times in total

----------

## tobr

 *Colourpoint wrote:*   

> 
> 
> ```
> 
>  * Starting ath0
> ...

 

Well but now you have made your computer an access point which I guess you didn't want to.

 *Quote:*   

> 
> 
> After the update I had this first error:
> 
> ```
> ...

 

No, you didn't solve your problem, you set your wireless card into access point mode which you don't want. It is only natural that dhcpcd times out with this setting because you have no connection to your real access point with this. You must set your device to managed mode. This doesn't work which is your real problem. Which version of madwifi are you using?

----------

## Colourpoint

Thanks tobr for your help.

 *Quote:*   

> No, you didn't solve your problem, you set your wireless card into access point mode which you don't want. It is only natural that dhcpcd times out with this setting because you have no connection to your real access point with this. You must set your device to managed mode. This doesn't work which is your real problem. Which version of madwifi are you using?
> 
> 

 

madwifi-ng 0.9.3.2

Thanks to your answer I tried several things and now my wireless connection is working again, but I don't know why, and the most important thing, what was the cause.

I tried this:

I disabled eth0

rc-update del eth0 default

and commented out the eth0 line in the /udev/70-persistent-net.rules

Edited a bit my /etc/conf.d/net file:

```
modules=( "iwconfig" )

config_ath0=( "dhcp" )

essid_ath0="Skynet"

mode_ath0="managed"

channel_ath0="6"

key_Skynet="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx"

```

I changed only the first line, iwconfig for dhcpcd

And finally I commented out the autocreate line in /etc/modules.d/ath_pci

#options ath_pci autocreate=ap

With this changes everything is fine again.

Then I reviewed all things after a reboot and I found that the udev recreates the eth0 line in 70-persistent-net.rules and that no matters if the autocreate option is on or off, in both cases I have no problems.

So, what have I done to solve the problem? I don't know, and what was the cause if all worked perfectly before emerging some packets.

I changed nothing in the kernel, I'm still using 2.6.18-r1 and no madwifi packet nor dhcpcd was emerged in the update.

I will wait to add (SOLVED) in the topic looking for more info in what I did, but I should change the topic, it is not a dhcp error...  :Embarassed: 

----------

## tobr

Hmm, driver support for wifi is a bit flaky sometimes. Perhaps you did reboot in between and it just works now. I get set mode errors on my laptop all the time (ralink beta driver though) and it has no visible effect. Sometimes linux wlan is just like using windows, reboot and it works   :Very Happy: 

----------

## Colourpoint

Finally everything is working again, I'm not sure but seems that removing the eth0 was the solution.

Thanks!

Colourpoint

----------

## pilo

I just wanted to clear up that the solution is the "autocreate" parameter to ath_pci, not the removal of any scripts.

By commenting that out, madwifi reverts to the standard parameter, "sta", which is about the same as the "managed" mode.

This is important, since newer madwifi drivers will not allow you to change the mode after the device has been created, thus making it essential that the created mode and the mode assigned by iwconfig matches.

Just stumbled onto this information myself, so I thought it might be best to leave it somewhere safe.  :Smile: 

----------

## Bialy

Hi I have this same problem but:

ath0 is client

ath1 is AP

If I add to /etc/modules.d/ath_pci

```
options ath_pci autocreate=ap
```

then I can't set ath0 to Managed mode and ath1 to Master mode (my computer isn't responding).

How I must to do, if I wish have on ath0 Managed mode and on ath1 Master mode?

----------

