Hi,

I wonder if anyone else has seen this problem?

I have a WHR-G54S (Buffalo) running the lastest whiterussian code, in fact the problem exists on older code too. I am using Debian and an Atheros card to act as an AP and using Hostapd to offer WPA support to clients. When I set up the WHR-G54S in STA mode and use NAS to authenticate everything works just fine, looking at the logs from hostapd I can see the 4 way handshake take place clean and reliable. See the log from hostapd below:

ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: associated
ath0: STA 00:0d:0b:83:6b:65 WPA: event 1 notification
ath0: STA 00:0d:0b:83:6b:65 WPA: start authentication
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 1/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: received EAPOL-Key frame (2/4 Pairwise)
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: received EAPOL-Key frame (4/4 Pairwise)
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: authorizing port
ath0: STA 00:0d:0b:83:6b:65 WPA: pairwise key handshake completed (RSN)


BUT:

If I take the WHR-G54S further away to a point where the received signal level is less than ~ -75dBm then the 4 way handshake starts to fail. Every time is fails at step 3. The Atheros AP sends the 3rd handshake message repeatdly and fails. The logs:

ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: associated
No WPA/RSN information element for station!?
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: disassociated
ath0: STA 00:0d:0b:83:6b:65 WPA: event 2 notification
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
Could not set station 00:0d:0b:83:6b:65 flags for kernel driver (errno=29).
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: associated
ath0: STA 00:0d:0b:83:6b:65 WPA: event 1 notification
ath0: STA 00:0d:0b:83:6b:65 WPA: start authentication
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 1/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: received EAPOL-Key frame (2/4 Pairwise)
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
Could not set station 00:0d:0b:83:6b:65 flags for kernel driver (errno=29).
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: deauthenticated due to local deauth request
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: disassociated
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: associated
ath0: STA 00:0d:0b:83:6b:65 WPA: event 1 notification
ath0: STA 00:0d:0b:83:6b:65 WPA: start authentication
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 1/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: received EAPOL-Key frame (2/4 Pairwise)
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
Could not set station 00:0d:0b:83:6b:65 flags for kernel driver (errno=29).
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: deauthenticated due to local deauth request
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: disassociated
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.11: associated
ath0: STA 00:0d:0b:83:6b:65 WPA: event 1 notification
ath0: STA 00:0d:0b:83:6b:65 WPA: start authentication
ath0: STA 00:0d:0b:83:6b:65 IEEE 802.1X: unauthorizing port
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 1/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: received EAPOL-Key frame (2/4 Pairwise)
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
ath0: STA 00:0d:0b:83:6b:65 WPA: EAPOL-Key timeout
ath0: STA 00:0d:0b:83:6b:65 WPA: sending 3/4 msg of 4-Way Handshake
etc..etc...etc


This is stange, as the only difference is signal strength. If I let the units authnticate close to eash other and then move them apart there is no problem with data between the devices at all, not even when the device is back in exactly the same spot where the wpa fails. It is only the key exchange that fails.

If I use a laptop running wpa_supplicant in the same physical location as the WHR-G54S then the 4 way shake works just fine. In fact it continuies to work right down to the lowest of signal levels, so this is almost certainly not related to bit errors on the link.

If I look at the packets being transmitted during this exchange between the buffalo and hostapd, they all seem to be identified in the 802.11 header as 1Mb/s transmissions. I was thinking maybe the buffalo was trying to send keys at high transmission speeds but I dont think so.

Anyway, if anyone has any ideas what might be going on here, please let me know.
Thanks
Aidan