# AR5212 Random connectivity issues. [Re-opened]

## dohtem

I have a Lenovo (IBM) Thinkpad R61 with an atheros wifi card in it. I have been fighting with getting wifi to work with it for a long time, having tried several distro's with no luck I have decided to fight it out with Gentoo since it is my favorite, and if all else fails, I will have to go with an XP install just for wifi to work (the laptop is useless to me without wireless net).

In any case, I have crawled up and down google for months and tried so many things i don't quite know where to begin, so here's the basic info.

lspci calls my card:

Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)

however...dmesg says:

ath5k_pci etc etc etc...

ath5k phy0: Atheros AR5424 chip found

My kernel is compiled with ath5k built in (not a module).

ifconfig shows wlan0

iwconfig shows and controls wlan0

and here is where i start to run into problems...

dhcpcd wlan0 will either stall after "waiting for carrier" and time out, or will successfully get an IP address. It's about 50/50 chance either way.

If I do get an IP, about 50% of the time I can get network activity, the other 50% of the time, all dns lookups fail and I cannot even ping my router.

In ALL cases, the connection never lasts more than a minute, and i loose connection to my router. The biggest problem is, dmesg shows no errors, ifconfig and iwconfig both show all settings are fine and that i still have a connection, and dhcpcd continues to run until i close it. According to my computer, at least everywhere I know to look, my wifi works fine, but I can never get anything across it.

I will provide whatever other details I can by request. Oh, and of course, my kernel info...2.6.27-gentoo-r10 (Portage uses only stable packages so far on this distro)Last edited by dohtem on Mon May 18, 2009 8:56 pm; edited 2 times in total

----------

## Tekeli Li

1. Try madwifi

2. Use ndiswrapper if all else fails, with an XP driver

EDIT: Just checked ath9k list of supported chipsets, see if that one works first:

http://linuxwireless.org/en/users/Drivers/ath9k#supportedchipsets

ath9k driver is in kernel, Device Drivers -> Network -> Wireless LAN somewhere.

----------

## mgrela

Hi,

First, try the *newest* kernel (ATM vanilla-sources-2.6.29.1 kernel or even the 2.6.30_rc1). Don't install madwifi for now, try to enable the ath5k and ath9k drivers. Enable debugging for them. See if it works.

----------

## dohtem

Recompiling now with ath9k in the current kernel. I had tried kernel-2.6.29-gentoo-r1 and that didnt do any different, so I hadn't bothered with vanilla sources since it's the same version number, but I guess I should go ahead and give that a shot too. we'll see how it goes after this rebuild.

----------

## poly_poly-man

compile these as modules, not in-kernel. Some wireless card drivers need that.

Worst-case scenario (you probably won't need this) - use ndiswrapper.

----------

## d2_racing

Can you post this files :

```

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## dohtem

/etc/conf.d/net is empty, i let it default to dhcp (via dhcpcd) but i do everything manually for wifi anyways. only my eth0 tries to start at boot, and i test with it unplugged

i don't have wpa_supplicant installed yet, my router at home is just an open system (i live in the back of a large property and if someone is stealing my wireless they are trespassing and face greater dangers than a wpa key)

i recompiled with ath9k instead of ath5k and my wireless card was not recognized, i'm going to try again with ath5k as a module and see what happens.

----------

## dohtem

just as a quick update, i recompiled with ath5k as a module, I am getting "slightly" better results. I am emerging (via cabled net) X windows to do some more in depth testing of my wifi that way. pings and dns lookups were MUCH more reliable so far, but we will see how it works in the long term. I do not have great expectations so far since I have been able to get net to work in the past and then it seems to just *STOP* randomly without errors later on.

Thanks to all for the help so far. I will follow up with my results after X windows is fully emerged.

----------

## Tekeli Li

 *dohtem wrote:*   

> 
> 
> i recompiled with ath9k instead of ath5k and my wireless card was not recognized, i'm going to try again with ath5k as a module and see what happens.

 

At which point I'd suggest madwifi, if ath9k is not for your card, and ath5k is flaky. I had that issue with my AR2413 until kernel 2.6.27 which fixed something and I could use ath5k. Until then I used madwifi perfectly. In fact, even now it works slightly better than ath5k (has higher throughput for me).

----------

## mgrela

 *dohtem wrote:*   

> just as a quick update, i recompiled with ath5k as a module, I am getting "slightly" better results. I am emerging (via cabled net) X windows to do some more in depth testing of my wifi that way. pings and dns lookups were MUCH more reliable so far, but we will see how it works in the long term. I do not have great expectations so far since I have been able to get net to work in the past and then it seems to just *STOP* randomly without errors later on.
> 
> Thanks to all for the help so far. I will follow up with my results after X windows is fully emerged.

 

Please test the stuff a bit more and be sure to enable the driver debugging feature. It can be of great help in case of further problems. If you still experience disconnects consider filing a report on the kernel bugzilla. IMHO madwifi should be used only as a workaround.

Best regards,

Maciej Grela

----------

## dohtem

With ath5k built as a module, i seem to be getting better results. I've only just now gotten a GUI installed (had some issues with circular dependencies) and am working on testing a bit this evening. Thanks to all who have contributed so far!

----------

## kmare

well.. i can only add that i've been having the same problems on my laptop (tried ubuntu and fedora). I solved them by manually installing the drivers found on http://linuxwireless.org/en/users/Download. Dont know how well they'll work on gentoo, but can give it a shot.

ps: it's an atheros chip using the ath5k module.

----------

## dohtem

well it's working pretty well, i am showing very low signal strengths, even when i'm in the same room as the router, but other than a few delays here and there, wireless is working better than ever. It still seems odd to me that webpages will load halfway almost instantly, then stall for up to a minute sometimes, before they finish loading pictures. Is this normal, or just normal for ath5k?

----------

## dohtem

first off, sorry for *another* double post....

so i fooled around with my wifi and it was working perfectly, i did a bunch of emerges, updated some software, got my laptop all setup to be put to actual use. i was able to watch video streams without ANY stuttering, and pages loaded like lightning.

i came home from work today, and wanted to check up on the news, and suddenly, i could not get connected, or if i did get connected, i could only get spotty connectivity. a ping to google.com would stall for a second then hit once or twice with slow response times. and pages were not loading.

after screwing with it for a nice bit longer, i realized that for some reason, NetworkManager doesnt seem to be setting the channel properly. My router runs on channel 1 (2.412GHz) Some reason even manually setting the channel and frequency with iwconfig, i could not get my card onto the same channel. Finally, i used ifconfig, took wlan0 down, then back up, and got it onto channel 1 and my internet is lightning fast again.

So.....

Why is NetworkManager not doing this, and is it normal to have to set the channel?! Everything I have read says pick the essid, and latch a dhcp client onto it. I want my wife to be able to use this laptop, and she is not about to fight with a terminal just to get on the internet for email etc. Any ideas on why this is happening?

EDIT:::::

This is still not solving the problem...I guess my main concern at this point is finding a way to diagnose this issue. I can fiddle around with it and get it to associate and authenticate, but the connections are not lasting long. I get no helpful output on dmesg, other than the card associating. Not even a connection failure output.

----------

## pvantoorn

I have a similar problems both with my atheros 5413 wireless chip  as well as my sitecom usb (zd1211rw driver)

see my posting about dhcpcd and kernel 2.6.28

However, I encounter the problem only with the 2.6.28 kernel, and not with the older ones.

https://forums.gentoo.org/viewtopic-t-760085.html

Peter van Toorn

----------

## dohtem

my kernel is the 2.6.29-gentoo-r1 currently, perhaps i need to go back to an older one

i was also advised to try the newer kernels, even vanilla-sources

honestly, i was hoping someone would offer a tool to diagnose the problems i am experiencing, according to all output, the connection is fully functional.

----------

## mgrela

Have you tried to enable debug output for the ath5k driver in the kernel ? If so, please do that and see what's showing up in dmesg.

----------

## dohtem

debug output is enabled, i still only get very basic messages, associating, associating failed. I can post exact output once I get back to my laptop, but it's all very simple working, failed type output, not even a reason for the failure.

i have had better luck doing the following (in order):

ifconfig wlan0 down

ifconfig wlan0 up

iwconfig wlan0 essid linksys

iwconfig wlan0 ap ##:mac-address:##

dhcpcd wlan0

most of the time it will suceed if i do things in that order, but i cant use gnome's nm-applet for ease of use, i guess i'm gonna have to try getting the modular networking set up for my wifi and hope that it works well enough  :Smile: 

i still have not tried madwifi however, and will probably give that a shot as well, but as i had read in the past, most of the development from that group has moved onto the ath5k driver instead of madwifi. is that not the case? what is the module name from the madwifi package?

----------

## yetanothern00b

yea they say dont bother with madwifi anymore...

----------

## mgrela

Hi,

How about a different approach. Have you tried using a different AP ? Sometimes the firmware in them has issues (like my WRT54GC). Maybe search for a software update for it ? It could also be very useful to post a bugreport on bugzilla.kernel.org

----------

## dohtem

i have tried other APs and the problem still persists. i also use other wifi devices in (and outside of) my house without any issue. :/

----------

## Tekeli Li

I don't understand why you didn't try madwifi yet. They're not exclusive, you can blacklist ath5k and use madwifi, and vice versa. But you can have both in the system as modules.

----------

## dohtem

as a recap, i have tried madwifi, i have not tried it recently on the current gentoo kernel, but i tried it on ubuntu and it was an epic fail. i am getting flawless results when i follow the exact directions i listed earlier, but when i use network manager i am getting varied results. Is there any reason that i would need to ifconfig wlan0 down, before setting up the connection each time, and why madwifi would not require this each time? I will give it a try as well and see what happens, but the main problem at this point is that nm-applet is unable to handle connectivity for me.

----------

## mgrela

Have you tried asking for advice on the networkmanager mailing list ?

----------

## LoSeR_5150

I dont care who says madwifi should only be used as a workaround...  if ath5k isn't working try madwifi.  I still cant get ath5k to work um reliably with my atheros card.  It gets faster transfer rates and better latency, if it connects and if it doesnt hard lock my computer.  however madwifi still works reliably as ever, no hard locks, no issues, just a tainted kernel oh well.  just my humble opinion.

----------

## dohtem

never got a response earlier, what is the madwifi module name?

----------

## Simba7

I had to use the MadWifi driver to get my card to work in Master Mode.

Just make sure you use the latest, and I mean madwifi-ng-9999.

----------

## dohtem

working on installing madwifi at the moment, as soon as i figure out how to patch ebuilds i should have it completed. unfortunately, there is a problem with madwifi-ng-0.9.4-r1 compiling on Kernel 2.6.29 because of some changed symbols. we'll see how that goes.

on a side note, thanks again to all who have contributed

----------

## Simba7

 *dohtem wrote:*   

> working on installing madwifi at the moment, as soon as i figure out how to patch ebuilds i should have it completed. unfortunately, there is a problem with madwifi-ng-0.9.4-r1 compiling on Kernel 2.6.29 because of some changed symbols. we'll see how that goes.

 

Look at my post again..

Here's some help to get the ebuild: https://bugs.gentoo.org/193549

----------

## overkll

@dohtem,

I've got an ath9k (AR9280 a/b/g/n) which also displayed weak signal strength.  I've used some ath5k cards in the past as well - also with weak signal strength.  I always thought is was an chip design issue until I installed a 2.6.29 series kernel.  My signal strength doubled from 49/100 to 100/100!  That was for the ath9k.  Don't know if it would be the same drastic jump on the ath5k.  I'm currently using gentoo-sources-2.6.29-r4 (2.6.29.3 kernel).  This kernel fixed a broadcast packet issue that affected cups.  Now no more cups issue.  Atheros development continues in the kernel, so I'd expect improvements that the madwifi drivers won't get.

A gui is nice, but I'd steer clear of NetworkMangler.  Have you tried wpa-supplicant's gui?  It requires the qt(3|4) USE flag.

Over the past few years using wireless on gentoo, I've come to the conclusion that baselayout-1* has some issues activating wireless on boot, especially for WPA/WPA2 connections.  I've been successfully using the following configurations that disables the iwconfig module and relys on wpa_supplicant exclusively for bringing up the interface on machines with rt2500, ath5k and ath9k, whether encrypted or open.  I'm using kernel modules, baselayout-1.2.11.1 and wpa_supplicant-0.6.4 with the gui.

/etc/conf.net

```
modules_wlan0=( "!iwconfig" "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"
```

Note the "bang" before iwconfig.  That disables the iwconfig module from bringing up the interface.

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=users

update_config=1

# WPA/WPA2 encrypted AP (Tomato Firmware)

network={

   ssid="wpa2example"

   scan_ssid=1

   psk="mysupersecretpassphrase"

   key_mgmt=WPA-PSK

   priority=5

}

# Open/Public WIFI example

network={

   ssid="MYTURF FREE"

   key_mgmt=NONE

   priority=2

}

# WEP encryped AP example

network={

   ssid="WiFi Jones"

   key_mgmt=NONE

   wep_key0=559084b9e2

        priority 5

}
```

What's nice about this setup is the wireless will be active by the time you get to the desktop.  NetworkMangler only starts AFTER the desktop is available.  You can also use the wpa_supplicant gui to add more wireless networks, and scan/switch networks - easy enough for your girlfriend to use.

I also use sys-apps/netplug for my wired connection and bring up eth0 at boot.  This way, I can be connected to a wireless network and as soon as I plug in a live ethernet cable, eth0 comes to life and becomes the default route automatically, eventhough I'm still connected to the wireless ap.  Disconnect the cable, and it's back to wireless.  I don't think NetworkMangler performs in the same manner.  Wireless would be brought down for eth0 to come up.  A setup like this should eliminate your manual start AND give you a working gui.

You should periodically check the changelogs on the current stable kernel at http://kernel.org to see if there have been any improvements for ath5k.  If there are either install vanilla-sources or wait for the gentoo-sources version to become available.

One more thing, make sure you update the pciids for lspci (update-pciids at the command line) and double check your wireless chipset.  I've come across several atheros cards that have a budget chip that is misidentified.  They showed up as an AR5006 or even AR52xx when they were really AR5007g's.  The AR5007g needs special attention and love to get it working - at least they did.  Maybe they work with the ath5k now.

Good luck.

EDIT: FYI, kernel 2.6.29.3 (gentoo-sources-2.6.29-r4) contains the following fix for ath5k:

```
commit f8c890f0bc401fd581a27062fcb989ef19893318

Author: Bob Copeland <me@bobcopeland.com>

Date:   Mon Apr 27 22:12:43 2009 -0400

    ath5k: fix buffer overrun in rate debug code

    

    commit b7fcb5c4a4c27da2f6d86cb03d18687e537442cf upstream.

    

    char bname[5] is too small for the string "X GHz" when the null

    terminator is taken into account.  Thus, turning on rate debugging

    can crash unless we have lucky stack alignment.

    

    Cc: stable@kernel.org

    Reported-by: Paride Legovini <legovini@spiro.fisica.unipd.it>

    Signed-off-by: Bob Copeland <me@bobcopeland.com>

    Signed-off-by: John W. Linville <linville@tuxdriver.com>

    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

```

----------

## dohtem

Ooooooooooooooooooooooooookay...

Thanks again to all who took the time to give input. I did not get a chance to try all the suggested configurations, madwifi would not compile for me on the 2.6.29 kernel, even after trying to patch the ebuild with the info i had found (and was also posted in this link) from bugs.gentoo.org. However...I DID get it to finally work. MUCH thanks to Overkll for the final help with getting it to work.

I had been using 2.6.29-gentoo-r1 kernel, and it was semi functional with wireless-tools, although it was randomly very sluggish, and sometimes unresponsive altogether.

What finally worked was kernel 2.6.29-gentoo-r4 with wpa_supplicant and ath5k (built as a module, I have not tried it built in yet since one major improvement i had with 2.6.29-gentoo-r1 was in switching from built in to modular ath5k)

I am now using the wpa_gui from gnome to control the wifi, and reading over the man pages it seems i can even control my wired connection from it, although i had planned on trying ifplugd or as was also suggested, netplug. I will experiment and see what works best for me.

The only remaining problem now is that the wpa_gui tray icon is invisible, there is a small block of empty space there where the icon should show, but does not. I did find a patch to fix the actual launcher icon, but so far nothing on how to get the tray icon up. However, given the circumstances, it is an issue i will gladly deal with.  :Wink: 

Thanks again to the entire Gentoo community for a great distro, and to all those who gave input, I have been struggling with this, literally, for over a year.

dohtem

----------

## overkll

 *dohtem wrote:*   

>  MUCH thanks to Overkll for the final help with getting it to work.

 

You're welcome.

 *Quote:*   

> What finally worked was kernel 2.6.29-gentoo-r4 with wpa_supplicant and ath5k (built as a module, I have not tried it built in yet since one major improvement i had with 2.6.29-gentoo-r1 was in switching from built in to modular ath5k)

 

Just leave it as a module.  If it ain't broke, don't fix it.   :Laughing: 

 *Quote:*   

> I am now using the wpa_gui from gnome to control the wifi, and reading over the man pages it seems i can even control my wired connection from it, although i had planned on trying ifplugd or as was also suggested, netplug. I will experiment and see what works best for me.

 

One can use wpa_supplicant for ethernet, but it's more geared to encryption and authentication of the ethernet devices at an enterprise level.

Netplug requires no configuration, it just works.  You may want to try that first.

 *Quote:*   

> The only remaining problem now is that the wpa_gui tray icon is invisible, there is a small block of empty space there where the icon should show, but does not. I did find a patch to fix the actual launcher icon, but so far nothing on how to get the tray icon up. However, given the circumstances, it is an issue i will gladly deal with. 
> 
> 

 

LOL, I didn't even know there was a tray icon for wpa_supplicant.  I just use the gnome-applet "network monitor" on the panel and change the name to wlan0.  It's sufficient to let you know if it's associated or not.

I added my own icon for the launcher - /usr/share/pixmaps/gnome-laptop.png.

 *Quote:*   

> Thanks again to the entire Gentoo community for a great distro, and to all those who gave input, I have been struggling with this, literally, for over a year.

 

You should have spoke up earlier.   :Wink: 

----------

## dohtem

I am using Netplug now and it works great. wpa_supplicant's control of wired connections was...odd...and not very effective for normal use. As you said, netplug allows me to just connect the cable and not think about it anymore.

However...

I seem to be getting the random errors connecting again. I cannot figure out what the problem is. When I am near the router, say within a 10 meter radius, I cannot connect at all. Occasionally at a further distance wpa_gui just spams me with bubbles from the tray saying "disconnected from network".

This is what has made this problem so hard to figure out. For more than a day it was working flawlessly. Connection was almost instant, and speeds were insanely fast. Now 2 days later, I cannot use wifi at my desk where the router sits, and from the living room, wifi works great for a bit then disconnects and will not reconnect.

Here's 'dmesg' (I hid my router's mac address)

Note, that from the time it authenticated to the time it lost response from direct probe i was sitting in the same spot. It booted from there, connected, worked for a moment, then disconnected and went mental.

```
[   20.911371] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[   21.059656] wlan0: authenticated

[   21.059659] wlan0: associate with AP 12:34:56:AB:CD:EF

[   21.259022] wlan0: associate with AP 12:34:56:AB:CD:EF

[   21.459032] wlan0: associate with AP 12:34:56:AB:CD:EF

[   21.573532] wlan0: RX AssocResp from 12:34:56:AB:CD:EF (capab=0x401 status=0 aid=1)

[   21.573536] wlan0: associated

[   21.574365] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

[   32.019025] wlan0: no IPv6 routers present

[  437.595051] wlan0: No ProbeResp from current AP 12:34:56:AB:CD:EF - assume out of range

[  442.148880] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  442.148947] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  442.148964] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  442.348053] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 2

[  442.548042] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 3

[  442.748043] wlan0: direct probe to AP 12:34:56:AB:CD:EF timed out

[  447.316242] wlan0 direct probe responded

[  447.316246] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  447.516042] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  447.716042] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  447.916037] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  456.578111] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  456.578150] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  456.578167] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  456.778043] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  456.978049] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  457.178048] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  527.405123] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  527.405158] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  527.405175] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  527.605033] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  527.706493] wlan0: authenticated

[  527.706496] wlan0: associate with AP 12:34:56:AB:CD:EF

[  527.906050] wlan0: associate with AP 12:34:56:AB:CD:EF

[  528.106046] wlan0: associate with AP 12:34:56:AB:CD:EF

[  528.306045] wlan0: association with AP 12:34:56:AB:CD:EF timed out

[  541.843056] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  541.843091] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  541.843108] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  542.043048] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  542.243051] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  542.443052] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  556.293619] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  556.293652] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  556.293669] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  556.493051] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 2

[  556.693054] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 3

[  556.760139] wlan0 direct probe responded

[  556.760143] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  556.960053] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  557.160034] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  557.360041] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  580.121609] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  580.121649] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  580.121666] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 1

[  580.321046] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 2

[  580.521040] wlan0: direct probe to AP 12:34:56:AB:CD:EF try 3

[  580.721041] wlan0: direct probe to AP 12:34:56:AB:CD:EF timed out

[  588.321810] wlan0 direct probe responded

[  588.321815] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  588.521036] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  588.721053] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  588.921051] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  594.564870] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  594.564924] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  594.564941] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  594.764037] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  594.964046] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  595.164049] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  618.401937] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  618.401986] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  618.402247] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  618.602051] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  618.802050] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  619.002036] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

[  661.056015] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  661.056049] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  661.056065] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  661.256053] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  661.456053] wlan0: authenticate with AP 12:34:56:AB:CD:EF

[  661.656057] wlan0: authentication with AP 12:34:56:AB:CD:EF timed out

```

----------

## overkll

Check the signal strength.  You can use the "scan" button on the wpa_supplicant gui.  There you can also see the frequency and signal strength of other AP's in your vicinity.  This is why I use the gnome "network monitor" desktop applet - it gives me a graphical and auto updating signal strength bar graph for my connection.

Most AP's/Wireless Routers default to channel 6.  If there is more than one router in the vicinity using the same channel it can cause problems, especially if it's close to you and has a strong signal.  I think channel 6 equates to 2.437 Ghz.  Pick a different channel on your AP/wireless router.  I usually use channel 11 (2.462 Ghz).  Only Apple Airports use this as a default.  If 11 is busy too (apple airports in the area), try channel 1.  Channels 1,6 and 11 should work the best.

Don't know what else to say.  Maybe the signal strength issue hasn't/can't be worked out on the ath5k driver.

EDIT: You may want to check your router/access point logs to see if there are any issues.

Forgot to mention, 2.4 Ghz cordless telephones can interfere with your wireless connectivity if you have a 54mb 802.11g router.  If you have one, do yourself a favor get a phone that doen't use 2.4 Ghz.  Panasonic has a good line of 5.8 Ghz phones.

----------

## dohtem

Signal strength reads as 100% almost all the time. Even when it disconnects. (I also use the gnome network monitor as well as checking with wireless-tools.)

I am on an 8 acre property and my router is the only one in the area so I don't have any interference from neighbors.

I don't have a home phone so there's no cordless phones around either.

My router is a Linksys WRT300N and the issues I'm having had persisted even when I was visiting other places. My wife's computer is in the other room and has absolutely no problems connecting and maintining a functional link.

On a side note, I had not originally added the '!iwconfig' section to my conf.d/net file, so I put that in there, and when I booted up, the wlan0 was down. wpa_supplicant was registering it as up but it was not turned on. I did an 'ifconfig wlan0 up' and it turned on and was functional but again had problems staying connected.

I may try to get madwifi working again, perhaps they have patched it in portage for 2.6.29.

----------

## overkll

Curious, which version of wpa_supplicant are you using?

----------

## dohtem

wpa_supplicant-0.6.9-r1

----------

## overkll

Sometimes when I use the wireless button on my laptop to turn off the radio, then turn it back on later, my laptop has problems re-associating with the AP.  When this happens, I just issue "/etc/init.d/wlan0" as root and it works again.

What rate does iwconfig show for your connection?

You may also want to try jacking up the power to see if that helps:

/etc/conf.d/net

```
preup () {

       iwconfig wlan0 txpower 27

}
```

or whichever txpower applies to your card.

As far as wpa_supplicant version goes, I haven't tried anything newer than 0.6.4 (current gentoo stable).

----------

## dohtem

well I got madwifi compiled, it took some tinkering, but it finally installed.

thinks are working so-so right now. i have not had any absolute signal drops yet, but there have been some serious lag times.

my signal strength is giving actual readings now. although 'iwconfig' reports lower signals than the gnome network tray icon. the oddest thing, is that instead of being out of 100, i get signals such as 58/70. is that normal?

will test it out some more tonight and see what happens.

----------

## overkll

 *dohtem wrote:*   

> my signal strength is giving actual readings now. although 'iwconfig' reports lower signals than the gnome network tray icon. the oddest thing, is that instead of being out of 100, i get signals such as 58/70. is that normal?

 

Yes, the madwifi drivers use the odd 0-70 scale. I don't know why.

Gnome's network monitor does report slightly elevated readings as well.  For example, iwconfig reports 97/100 and network monitor shows 100%.

----------

## dohtem

well things are working better, i have been on the road this weekend and had great luck with associating with a router with a WPA-PSK and the connection has stayed active and fully functional. hopefully it will continue when i return home.  :Smile: 

----------

## overkll

madwifi or ath5k?

----------

## dohtem

currently madwifi, but i still have the same issues once I return to my router at the house. I cannot get a signal when I am within 10-20 feet of the router, after that it seems to work fine. Other people do not have this problem with my router, and I do not have this problem with other people's routers, but I am going to check the firmware on my Linksys (its a WRT300N) and see if I can do an update.

----------

## overkll

Thanks for the update.  I've heard that the WRT300N isn't that great and that the new style linksys' (no external antennas) aren't that great either.  I don't have any experience with either.

I still buy and recommend 54g routers.  My personal favorite is the WRT54GL with tomato firmware.  They just work!  If I need to extend the range, I just get another WRT54GL and put the second in AP mode and use WDS on both routers.

----------

## dohtem

Well I updated my firmware for my router, and it made no difference whatsoever on my connections. I have wanted to swap to a WRT54G for a while, and as soon as i have the spare cash I probably will. I dug around with some settings in my BIOS and disabled something to do with setting the signal for the wireless card. I will have to go back and get the full description. The first time I messed around with it, the way it read I thought it was a BIOS on/off switch for the radio. But I turned it off and I seem to be able to use my wireless fine now. Again, only time will tell, but so far I can use it in places it didn't ever work before, and I can leave if sitting for hours and come back to a still fully functional connection. Hopefully this will solve my problem once and for all, but with the rough history I've had with this card, I'm not going to get my hopes up.

----------

