authentication timeouts with ath(4) in hostap mode

Petar Bogdanovic petar at smokva.net
Sat May 3 15:00:14 UTC 2008


On Fri, May 02, 2008 at 05:25:09PM -0700, Sam Leffler wrote:
> Petar Bogdanovic wrote:
>> Hi,
>>
>> I'm using an alix2c0 board with two winstron CM9 ath(4)-cards and
>> FreeBSD 7:
>>
>> 	ifconfig ath0 (...) mediaopt hostap mode 11a channel 36 ssid sn.a -bgscan
>> 	ifconfig ath1 (...) mediaopt hostap mode 11g channel 11 ssid sn.g -bgscan
>>
>>
>> When I try to raise the traffic (i.e. dd | ssh AP dd) my Linux
>> wpa_supplicant drops the connection and has to reassociate. This however
>> does not work immediately; The supplicant fails a few times before
>> reconnecting:
>>
>> 	<2>CTRL-EVENT-CONNECTED - Connection to 00:0b:0b:06:0d:09 completed (reauth) [id=0 id_str=]
>> 	<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Authentication with 00:0b:0b:06:0d:09 timed out.
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Authentication with 00:0b:0b:06:0d:09 timed out.
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Authentication with 00:0b:0b:06:0d:09 timed out.
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Authentication with 00:0b:0b:06:0d:09 timed out.
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Authentication with 00:0b:0b:06:0d:09 timed out.
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Authentication with 00:0b:0b:06:0d:09 timed out.
>> 	<2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz)
>> 	<2>Associated with 00:0b:0b:06:0d:09
>> 	<2>WPA: Key negotiation completed with 00:0b:0b:06:0d:09 [PTK=CCMP GTK=CCMP]
>> 	<2>CTRL-EVENT-CONNECTED - Connection to 00:0b:0b:06:0d:09 completed (reauth) [id=0 id_str=]
>>
>>
>> This happens more on the 11a than on the 11g network. When I'm next to
>> the AP, the timeouts are almost gone but they still happen. (My laptop
>> is just one room away from the AP). Here is the athstats-output of ath0
>> (11a):
>>
>> 	# ./athstats -i ath0
>> 	481546 data frames received
>> 	330669 data frames transmit
>> 	13395 tx frames with an alternate rate
>> 	78558 long on-chip tx retries
>> 	1431 tx failed 'cuz too many retries
>> 	36M current transmit rate
>> 	78 tx management frames
>> 	3 tx frames discarded prior to association
>> 	45 tx frames with no ack marked
>> 	2894 rx failed 'cuz of bad CRC
>> 	2 rx failed 'cuz decryption
>> 	92711 rx failed 'cuz of PHY err
>> 	    92708 OFDM timing
>> 	    3 OFDM restart
>> 	318332 beacons transmitted
>> 	1111 periodic calibrations
>> 	2 rfgain value change
>> 	22 rssi of last ack
>> 	23 avg recv rssi
>> 	-96 rx noise floor
>> 	2530 switched default/rx antenna
>> 	Antenna profile:
>> 	[1] tx   173364 rx   123068
>> 	[2] tx   155874 rx   358671
>
> So the obvious question is whether your system config has enough isolation 
> of the radios for them not to impact each other?

Do you mean the isolation between the four (2x11a/2x11g) pigtail cables
inside the box? Well, when I take a look at the product sheet:

	http://pcengines.ch/pigsma.htm

it looks that the cables aren't shielded at all. Is this question based
on the high PHY error rate? This value is steadily growing on both
interfaces -- here are the stats of ath1 (11g):

	# ./athstats -i ath1
	938627 data frames received
	1727374 data frames transmit
	7883 tx frames with an alternate rate
	93209 long on-chip tx retries
	2871 tx failed 'cuz too many retries
	11M current transmit rate
	7127 tx management frames
	3 tx frames discarded prior to association
	1998 tx frames with no ack marked
	1718962 tx frames with short preamble
	4363254 rx failed 'cuz of bad CRC
	5115659 rx failed 'cuz of PHY err
	    23579 OFDM timing
	    5092074 CCK timing
	    6 CCK restart
	713605 beacons transmitted
	2460 periodic calibrations
	2 rfgain value change
	18 rssi of last ack
	21 avg recv rssi
	-96 rx noise floor
	102 cabq frames transmitted
	26685 switched default/rx antenna
	Antenna profile:
	[1] tx  1416324 rx  1017871
	[2] tx   308291 rx     2758

I assume this one is related to the high AP-density -- there are about
13-15 11g networks available in our living room.

Yesterday I tried the same tests with a freesbie client (FreeBSD 6.2)
and a Windows client. The link of the former was totally stable. No
disconnects on 11a and transfer rates around 2.7MB/s. 11g was stable
and fast (3.3MB/s) too but the ALIX board suddenly rebooted. (this seems
to be an other issue)

The Windows client was stable and fast (3MB/s) on 11a but slow and lossy
due disconnects on 11g.

After all I also booted an old Debian based live-cd with an old kernel,
old madwifi drivers and wpa_supplicant 4.9. It started to disconnect
again (both modes).


> Does turning off one radio give you stable operation?

I just did a `ifconfig ath1 txpower 0' but no luck. Is there a ifconfig
way to completely turn off the radio or do I have to unplug ath1 to be
sure?


> Have you verified the packets are present in the air?  Have you traced
> packets and/or phy errors around the time of the problem?

How do I do that?


> Have you tried different channels?

Yes. On 11a it makes no difference (I tried 36 and 64). On 11g I get the
best result on channel 11. This makes sense, since a lot of the other
networks operate on channel 1 or 6.


> you tried different boards?

Unfortunately, I only have one ALIX board. But maybe I'll try a generic
PC just for the sake of certainty.


Sorry for the lack of information in my first mail and thanks for your
answer,

Petar


More information about the freebsd-net mailing list