# madwifi problems

## Butts

I had wireless working bu did not have wireless extensions enabled in my kernel so I couldn't use WEP. I enabled the extensions and now my wireless doesn't work.

I followed the outline in Wireless the Gentoo Way, but now I have problems.

I have no /etc/conf.d/wireless file.

When the machine boots, it attempts to connect to my essid, but says it could not associate with it.

My net.ath0 is linked to net.eth0 and my /etc/conf.d/net is standard dhcp for both interfaces.

Please help.

----------

## Butts

Part of my problem is that I can not emerge baselayout-1.11.0.

```

bash-2.05b# cat /etc/portage/package.unmask 

=media-plugins/rmxmms

=media-plugins/realvideo-codecs

=media-video/realplayer

=sys-apps/baselayout-1.11.0

```

```

bash-2.05b# cat /etc/portage/package.keywords 

=sys-apps/baselayout-1.11.0 ~x86

```

Then I get:

```

bash-2.05b# emerge -av sys-apps/baselayout-1.11.0

These are the packages that I would merge, in order:

Calculating dependencies   

!!! Problem in sys-apps/baselayout-1.11.0 dependencies.

!!! "Specific key requires an operator (sys-apps/baselayout-1.11.0) (try adding an '=')" exceptions

```

Need more help....

----------

## iverson0881

The latest package in portge for baselayout is  sys-apps/baselayout-1.11.3

----------

## Butts

So now I have the current baselayout now, but I still cannot associate with the access points.

During the startup script, I get:

```

Connecting to "any" (WEP disabled).......[!!]

Trying to force preferred in case they are hidden

Connecting to "SMC" (WEP disabled)......[!!]

Connecting to "CAEN Wireless" (WEP disabled).........[!!]

Failed to associate

...

```

So it appears as if my card is not scanning at startup, and even then it doesn't connect to the preferred AP's. I know for a fact that CAEN Wireless is a reliable, strong connection. What else should I try?

----------

## UberLord

 *Butts wrote:*   

> 
> 
> So it appears as if my card is not scanning at startup, and even then it doesn't connect to the preferred AP's. I know for a fact that CAEN Wireless is a reliable, strong connection. What else should I try?

 

Don't set the ESSID

That should get scanning working.

For the connection problem, your driver may not be resetting the AP MAC address properly - play around with the associate_test_ath0 variable which is documented in /etc/conf.d/wireless.example

----------

## Butts

When it scans at startup, should it say which ap's it finds? Because I commented out, setting the ESSID, and now it says it is scanning, but never finds the ap. I alos notice that my wireless led is on when it gets to starting ath0, but then turns off right before scanning.

Hmmm....

----------

## Butts

OK, now I have it scanning and associating properly, but I had to use the trick mentioned in the other thread.

```

iwpriv_ath0=( "mode 2" )

```

And now I get a connection, but when I run iwcofig, my connection rate is only 11Mbps as opposed to the 54Mbps that my card and ap are capable of.

Is there any way to correct this? I found that mode 3 gave me 36Mbps, but I would like the full 54.

Thanks for the help. And I love these scripts. Very clean and easy to use.

----------

## smerkal

having trouble getting the iwpriv_ath0 variable to work. /etc/conf.d/wireless is:

```

essid_ath0=( "HomeNet" )

key_HomeNet=( "s:xxxxxxxxxxxxx" )

iwpriv_ath0=( "mode 2" )

ifconfig_HomeNet=( "dhcp" )

```

running /etc/init.d/net.ath0 results in:

```

 * Starting ath0

 *    Configuring wireless network for ath0

 *      Connecting to "HomeNet" (WEP enabled) ...                         [ !! ]

 *    Failed to configure wireless for ath0

```

If I enter "iwpriv ath0 mode 2" at the command line and then run the script all is well. Any sugggestions?[/code]

----------

## Butts

Did you add the preup function as well?

For some odd reason iwpriv must be run twice.

```

preup()  {

         if  [ $1 == "ath0" ] ; then

                       iwpriv $1 mode 2

         fi

         return 0

}

```

----------

## smerkal

Thanks, Butts. Didn't know about that, but it solves the problem. Hotplug works now too  :Smile: 

----------

