Skip to contentSkip to conversation

AR9285: Possible intermittent connection drop-outs

ath9k-devel Torquil Macdonald Sørensen 5 participants 11 messages Aug 17, 2010 – Sep 8, 2010 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi guys!

Essential, I'd like recommendations as to which ath9k debugging options I would want to use to effectively diagnose the following problem:

I'm having some problems with my AR9285 based wireless card on an Asus X5DID laptop, using Linux 2.6.35.2 on Debian Sid. I'm connecting to a D-Link DIR-615 wireless router with the newest firmware.

The problem is: sometimes, even though Network Manager displays a good connection strength, I loose communication with the router and therefore also the internet. In this state, which is temporary, I cannot ping the router.

Typical scenario:

While I am browsing, suddenly Firefox is no longer able to receive web pages. I typically try to ping the router at 192.168.0.1, but get no reply or very slow replies and many lost pings.

I have a sneaking suspicion that my pinging efforts are able to "wake" the connection up to some degree, since often times web pages are able to load just after I start to ping.

The problem fixes itself, usually after a few minutes. But the problem will come and go quite randomly. Network Manager never notices any of this. It happily displays a good connection all the time.

Most of the time everything works fine. I'm quite certain that wireless in the Windows 7 OS on the same laptop works flawlessly, so its not a hardware or router problem. The other guy here uses Windows XP with a USB wireless card and never has similar problems.

I have recompiled Linux to get some debugging going, but there are lots of debug options and some of them result in a massive amount of information being logged. So I'd like to get some recommendation as to which debugging option I should try first, out of these:

http://wireless.kernel.org/en/users/Drivers/ath9k/debug

The settings on the router are:

Enable auto channel selection: on
Transmission rate: Best (auto)
WMM Enable: on (wireless QoS)

Security mode: WPA/WPA2 Wireless Security (enhanced)
Cipher type: AUTO (TKIP/AES)
PSK/EAP: PSK
Network Key: ******** (hidden)

Beacon interval: 100ms
RTS threshold: 2346
Fragmentation: 2346
DTIM interval: 1
Preamble type: Short
CTS mode: Auto
Wireless mode: 802.11 Mixed (g/b)

From 'lspci':

04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

#1 lore raw
Quoted 2 lines · Torquil Macdonald S?rensen

I'd like recommendations as to which ath9k debugging options I would want to use to effectively diagnose the following problem:

Don't hold your breath. It seems there are no resources for this kind of debugging. Hopefully the driver will improve further over time. (It has already improved a lot!)

//Peter

#2 lore raw
In reply to Torquil Macdonald Sørensen
Quoted 3 lines · Torquil Macdonald S?rensen

I'm having some problems with my AR9285 based wireless card on an Asus X5DID laptop, using Linux 2.6.35.2 on Debian Sid. I'm connecting to a D-Link DIR-615 wireless router with the newest firmware.

If you browse the mailing list archive you will see that me and others have already reported this problem a long time ago, yet everything remains the same.

I just got tired of waiting and exchanged the Atheros card with an Intel 5100 and everything works fine now.
The Intel 5100 costs 10$ on ebay, and Intel's drivers for Linux work just fine.

#3 lore raw
Quoted 3 lines · Alan

I just got tired of waiting and exchanged the Atheros card with an Intel 5100 and everything works fine now.
The Intel 5100 costs 10$ on ebay, and Intel's drivers for Linux work just fine.

Same situation here. Switched to a Intel 5300 and things are hunky dory now.

- Ben

#4 lore raw
In reply to Alan
Quoted 2 lines · Alan

The Intel 5100 costs 10$ on ebay, and Intel's drivers for Linux work just fine.

Seems there's little choice but ath9k for plain minipci cards though. :\

//Peter

#5 lore raw
In reply to Alan

So there's plenty of things you can vary given the current setup to try and eliminate things.

* Can you buy one of those dlink units for testing? (ie, so your testing doesn't interfere with others)
* Is it 11a, 11b, 11bg, 11n? 2.4 or 5ghz? It may be linked to the underlying media you're using
* The OP is using WPA2. It may be related to crypto key management
* It may be related to other people using the unit, and/or spectrum
* It may be related to the channel you're using (eg, the AR5416 I have here goes into a "stuck beacon" loop in hostap mode if I run it on channel 11, but channels 1 and 6 are fine.)
* It may be occuring when the unit/client changes channel (if you're roaming about, and/or the AP dynamically changes channel.)

Some of these overlap (eg if you change channel, you are changing how the radio is setup but you're also changing how your AP behaves and possibly changing the RF environment - what other clients/APs/RF noise are on those channels.) So make up a diagram of the above, figure out what internal/external factors you think can contribute, and then look at varying one at a time.

As a developer (and as one who has debugged a few of these wireless issues lately!) the worst thing you can be told is "it doesn't work right." It may take some time, but narrowing down a specific, controllable instance showing the deviation in behaviour is going to help the ath9k developers get a potential clue where to look and what debugging to turn on.

2c,

Adrian

Quoted 18 lines · Alan
Quoted 3 lines · Torquil Macdonald S?rensen

I'm having some problems with my AR9285 based wireless card on an Asus X5DID laptop, using Linux 2.6.35.2 on Debian Sid. I'm connecting to a D-Link DIR-615 wireless router with the newest firmware.

If you browse the mailing list archive you will see that me and others have already reported this problem a long time ago, yet everything remains the same.

I just got tired of waiting and exchanged the Atheros card with an Intel 5100 and everything works fine now.
The Intel 5100 costs 10$ on ebay, and Intel's drivers for Linux work just fine.
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

#6 lore raw
Quoted 29 lines · Adrian Chadd

So there's plenty of things you can vary given the current setup to try and eliminate things.

* Can you buy one of those dlink units for testing? (ie, so your testing doesn't interfere with others)
* Is it 11a, 11b, 11bg, 11n? 2.4 or 5ghz? It may be linked to the underlying media you're using
* The OP is using WPA2. It may be related to crypto key management
* It may be related to other people using the unit, and/or spectrum
* It may be related to the channel you're using (eg, the AR5416 I have here goes into a "stuck beacon" loop in hostap mode if I run it on channel 11, but channels 1 and 6 are fine.)
* It may be occuring when the unit/client changes channel (if you're roaming about, and/or the AP dynamically changes channel.)

Some of these overlap (eg if you change channel, you are changing how the radio is setup but you're also changing how your AP behaves and possibly changing the RF environment - what other clients/APs/RF noise are on those channels.) So make up a diagram of the above, figure out what internal/external factors you think can contribute, and then look at varying one at a time.

As a developer (and as one who has debugged a few of these wireless issues lately!) the worst thing you can be told is "it doesn't work right." It may take some time, but narrowing down a specific, controllable instance showing the deviation in behaviour is going to help the ath9k developers get a potential clue where to look and what debugging to turn on.

Quoted 3 lines

2c,

Adrian

Thanks Adrian! This is very useful information, I'll make sure to study it in detail. It is 2.432GHz. I have chosen "11b/g" on the router, intensionally disabling 11n since there are other bottlenecks in the system. I'm pretty sure that I'm using 11g.

I don't seem to have experienced the problem (at least not as noticeable) in the last couple of days. Lately I have started to compile my own kernels, and in the process turned off a lot of unecessary kernel compile options.

Btw, I know that there are no kernel log messages when the problems occurs. That's partly why i have been compiling my own kernels, in order to activate the ath9k debugging.

Torquil

#7 lore raw

Good work!

Make sure you test the old kernels which exhibited the issue. See if the problem returns. If it does, it's likely something in the recompiling (version, compiler, options, etc - not in that order!) has something to do with it. If it doesn't, it may be environmental.

Adrian

Quoted 51 lines · Torquil Macdonald S?rensen
Quoted 30 lines · Adrian Chadd

So there's plenty of things you can vary given the current setup to try and eliminate things.

* Can you buy one of those dlink units for testing? (ie, so your testing doesn't interfere with others)
* Is it 11a, 11b, 11bg, 11n? 2.4 or 5ghz? It may be linked to the underlying media you're using
* The OP is using WPA2. It may be related to crypto key management
* It may be related to other people using the unit, and/or spectrum
* It may be related to the channel you're using (eg, the AR5416 I have here goes into a "stuck beacon" loop in hostap mode if I run it on channel 11, but channels 1 and 6 are fine.)
* It may be occuring when the unit/client changes channel (if you're roaming about, and/or the AP dynamically changes channel.)

Some of these overlap (eg if you change channel, you are changing how the radio is setup but you're also changing how your AP behaves and possibly changing the RF environment - what other clients/APs/RF noise are on those channels.) So make up a diagram of the above, figure out what internal/external factors you think can contribute, and then look at varying one at a time.

As a developer (and as one who has debugged a few of these wireless issues lately!) the worst thing you can be told is "it doesn't work right." It may take some time, but narrowing down a specific, controllable instance showing the deviation in behaviour is going to help the ath9k developers get a potential clue where to look and what debugging to turn on.

Quoted 3 lines

2c,

Adrian

Thanks Adrian! This is very useful information, I'll make sure to study it in detail. It is 2.432GHz. I have chosen "11b/g" on the router, intensionally disabling 11n since there are other bottlenecks in the system. I'm pretty sure that I'm using 11g.

I don't seem to have experienced the problem (at least not as noticeable) in the last couple of days. Lately I have started to compile my own kernels, and in the process turned off a lot of unecessary kernel compile options.

Btw, I know that there are no kernel log messages when the problems occurs. That's partly why i have been compiling my own kernels, in order to activate the ath9k debugging.

Torquil

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw
Quoted 7 lines · Mohammed Shafi

Hi Alan ,

Can you please provide the dmesg and kern.log when
the driver hits the issue.

with thanks,
shafi

Hi Shafi (and others)!

Sorry if everybody/somebody gets this twice. The network problems I'm trying to debug are occurring at this very moment :-)

I have some more information now before I try newer drivers. I have looked at the "ATH_DBG_ANI" debugging of the ath9k driver. I.e. I have enabled debugging by running:

echo "0x00000040" > /sys/kernel/debug/ath9k/phy0/debug

Now, I noticed some error messages that start to occur at the same time as my connection problems.

You'll be able to see log extracts below, but first I'll mention here the following recurring error messages:

"ath: invalid cmd 2"

and

"ath: cycleCount=-1593549770, ofdmPhyErrCount=3, cckPhyErrCount=60"

I.e. the last one shows that some kind of error has occured 60 times at that point in the log. I have no idea what it means, only that these seem like errors. So I just need you ath9k gurus to interpret them for me. Also, it seems a bit strange to me that what seems like a "counting variable" is negative (cycleCount), but I really know nothing about this.

When the connection gets back into a healthy state, the "invalid cmd: 2" no longer occurs, cycleCount is positive again, and the PhyErrCount goes back to 0.

Here is some log extracts showing more details when the problem occurs:

.
.
.

Aug 21 14:02:53 asus kernel: ath: ANI parameters:
Aug 21 14:02:53 asus kernel: ath: noiseImmunityLevel=0, spurImmunityLevel=0, 
ofdmWeakSigDetectOff=1
Aug 21 14:02:53 asus kernel: ath: cckWeakSigThreshold=0, firstepLevel=1, 
listenTime=183
Aug 21 14:02:53 asus kernel: ath: cycleCount=-1602349766, ofdmPhyErrCount=1, 
cckPhyErrCount=62
Aug 21 14:02:53 asus kernel:
Aug 21 14:02:53 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:53 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:02:53 asus kernel: ath: invalid cmd 2
Aug 21 14:02:53 asus kernel: ath: ANI parameters:
Aug 21 14:02:53 asus kernel: ath: noiseImmunityLevel=0, spurImmunityLevel=0, 
ofdmWeakSigDetectOff=1
Aug 21 14:02:53 asus kernel: ath: cckWeakSigThreshold=0, firstepLevel=2, 
listenTime=188
Aug 21 14:02:53 asus kernel: ath: cycleCount=-1593549770, ofdmPhyErrCount=3, 

cckPhyErrCount=60
.
.
.

and

.
.
.

Aug 21 14:02:53 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:54 asus kernel: ath: invalid cmd 2
Aug 21 14:02:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:54 asus kernel: ath: invalid cmd 2
Aug 21 14:02:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:54 asus kernel: ath: invalid cmd 2
Aug 21 14:02:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:54 asus kernel: ath: shortcal @4299689952
Aug 21 14:02:54 asus kernel: ath: invalid cmd 2
Aug 21 14:02:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:54 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:02:54 asus kernel: ath: invalid cmd 2
Aug 21 14:02:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:55 asus kernel: ath: invalid cmd 2
Aug 21 14:02:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:55 asus kernel: ath: invalid cmd 2
Aug 21 14:02:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:55 asus kernel: ath: invalid cmd 2
Aug 21 14:02:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:55 asus kernel: ath: shortcal @4299690952
Aug 21 14:02:55 asus kernel: ath: invalid cmd 2
Aug 21 14:02:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:02:55 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:02:55 asus kernel: ath: invalid cmd 2
Aug 21 14:02:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712

.
.
.

Anything interesting here?

I'll now compile linux 2.6.35.3 and use that instead. Or perhaps I would need to go to 2.6.36-rc1 or 2.6.36-rc1-git3 to get a more up-to-date ath9k driver? I'm just looking at what is available for download at the moment on www.kernel.org

On the other hand, when the connection is back to normal I seem to only get this stuff:

.
.
.

Aug 21 14:34:50 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:51 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:51 asus kernel: ath: shortcal @4301606655
Aug 21 14:34:51 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:51 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:52 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:52 asus kernel: ath: shortcal @4301607655
Aug 21 14:34:52 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:52 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:53 asus kernel: ath: shortcal @4301608655
Aug 21 14:34:53 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:53 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:54 asus kernel: ath: shortcal @4301609655
Aug 21 14:34:54 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:54 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:55 asus kernel: ath: shortcal @4301610655
Aug 21 14:34:55 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:55 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:56 asus kernel: ath: shortcal @4301611655
Aug 21 14:34:56 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:56 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:57 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:57 asus kernel: ath: shortcal @4301612655
Aug 21 14:34:57 asus kernel: ath:  calibrate chan 2432/c0 nf: -117
Aug 21 14:34:57 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712
Aug 21 14:34:58 asus kernel: ath: Writing ofdmbase=12582412   cckbase=12582712

.
.

without any "invalid cmd 2" messages.

Thanks!
Torquil S?rensen

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw
Quoted 49 lines · Mohammed Shafi

Hi Torquil,

Thanks for your ath9k debug messages .I tested the
ath9k driver in 2.6.35.2

with D-LINK DIR655 router in ubunt 10.04 , but could not reproduce
the issue .I got all

of your similar debugging messages(invalid cmd 2 several times
,cycle count

,ofdm,cck etc under healthy connection( which you had suspected for
the connection loss ).

I think those were mainly (modulation schemes ofdm ,cck ).

while cmd is related to ANI information (enum ath9k_ani_cmd in ani.h).

I had got these things under healthy connection ,

6464.669170] ath: Writing ofdmbase=12582412 cckbase=12582712

[ 6464.728750] ath: invalid cmd 2
  Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264144] ath: ANI parameters:

1994 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264149] ath:
noiseImmunityLevel=0, spurImmunityLevel=7, ofdmWeakSigDetectOff=0 1995 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264156] ath:
cckWeakSigThreshold=0, firstepLevel=2, listenTime=78 1996 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264163] ath:
cycleCount=1452171193, ofdmPhyErrCount=436, cckPhyErrCount=14 1997 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264169] 1998 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264176] ath: ANI parameters:
1999 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264181] ath:
noiseImmunityLevel=0, spurImmunityLevel=7, ofdmWeakSigDetectOff=0 2000 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264188] ath:
cckWeakSigThreshold=0, firstepLevel=2, listenTime=78 2001 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264195] ath:
cycleCount=1452171193, ofdmPhyErrCount=436, cckPhyErrCount=14

I hope that enabling ATH_DBG_FATAL will give us
some some clear idea.

If you obtain the ath9k debug messages with ATH_DBG_FATAL please do send as soon

Quoted 6 lines

as you get it.

with thanks and regards,

shafi

Thanks for your effort! Your results are interesting. I will check the FATAL DBG option too see if it gives me some more interesting info.

I will also determine for sure if the error messages I mentioned earlier only appear when I have connection problems. I'll probably make a simple script that will parse the ath9k log and pick out only those messages so I can see exactly when they occur.

I will get back to you when I have more info.

Thanks again for your help,
Torquil S?rensen

#13 lore raw
In reply to a message not in the archive
Quoted 43 lines · Mohammed Shafi

Hi Torquil,

Thanks for your ath9k debug messages .I tested the
ath9k driver in 2.6.35.2

with D-LINK DIR655 router in ubunt 10.04 , but could not reproduce
the issue .I got all

of your similar debugging messages(invalid cmd 2 several times
,cycle count

,ofdm,cck etc under healthy connection( which you had suspected for
the connection loss ).

I think those were mainly (modulation schemes ofdm ,cck ).

while cmd is related to ANI information (enum ath9k_ani_cmd in ani.h).

I had got these things under healthy connection ,

6464.669170] ath: Writing ofdmbase=12582412 cckbase=12582712

[ 6464.728750] ath: invalid cmd 2
  Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264144] ath: ANI parameters:

1994 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264149] ath:
noiseImmunityLevel=0, spurImmunityLevel=7, ofdmWeakSigDetectOff=0 1995 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264156] ath:
cckWeakSigThreshold=0, firstepLevel=2, listenTime=78 1996 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264163] ath:
cycleCount=1452171193, ofdmPhyErrCount=436, cckPhyErrCount=14 1997 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264169] 1998 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264176] ath: ANI parameters:
1999 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264181] ath:
noiseImmunityLevel=0, spurImmunityLevel=7, ofdmWeakSigDetectOff=0 2000 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264188] ath:
cckWeakSigThreshold=0, firstepLevel=2, listenTime=78 2001 Aug 23 16:35:51 atheros-laptop kernel: [ 6345.264195] ath:
cycleCount=1452171193, ofdmPhyErrCount=436, cckPhyErrCount=14

Quoted 7 lines

I hope that enabling ATH_DBG_FATAL will give us
some some clear idea.

If you obtain the ath9k debug messages with ATH_DBG_FATAL please do send as soon

as you get it.

Unfortunately, I get no debug output from the FATAL debugging when the problems come and go. I also discovered that the same problem persists even when using no encryption/authentication on the network.

In addition, this is an area with little to no other wireless networks, and problems persists even when I am the only user of the network.

Using Linux 2.6.35.4 at the moment.

Sometimes I get:

ath: tx hung, resetting the chip
ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x00000020

but I suspect that it is not related to my problems.

Best regards
Torquil S?rensen