Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #961 (new defect)

Opened 15 years ago

Last modified 15 years ago

AR5006EG, madwifi associating only once

Reported by: Gilles Assigned to:
Priority: major Milestone:
Component: madwifi: driver Version: trunk
Keywords: ar5006eg not associating Cc:
Patch is attached: 0 Pending:

Description

Hi Everyone, I own a new toshiba laptop with a AR5006EG card.

lspci -d 168c:001c

0000:02:00.0 Ethernet controller: Atheros Communications, Inc.: Unknown device 001c (rev 01)

I m running Kubuntu 6.06, linux 2.6.15-27-386. I downloaded the svn snapshot yesterday (svn r1754), unloaded all the ubuntu-provided modules (new_ath_pci, new_wlan_xauth, new_wlan_wep, new_wlan_tkip, new_ath_rate_sample, new_wlan_scan_ap, new_wlan_ccmp, new_wlan_scan_sta, new_wlan, new_wlan_acl, new_ath_hal), make && make install && modprobe ath_pci

So far so good, everything went fine.

root@gilles-laptop:/# tail /var/log/message
Oct 18 21:12:40  kernel:  ath_pci: 0.9.4.5 (svn r1754)
Oct 18 21:12:40  kernel:  ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 233
Oct 18 21:12:40  kernel:  wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Oct 18 21:12:40  kernel:  wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Oct 18 21:12:40  kernel:  wifi0: H/W encryption support: WEP AES AES_CCM TKIP
Oct 18 21:12:40  kernel:  wifi0: mac 10.0 phy 6.1 radio 10.2
Oct 18 21:12:40  kernel:  wifi0: Use hw queue 1 for WME_AC_BE traffic
Oct 18 21:12:40  kernel:  wifi0: Use hw queue 0 for WME_AC_BK traffic
Oct 18 21:12:40  kernel:  wifi0: Use hw queue 2 for WME_AC_VI traffic
Oct 18 21:12:40  kernel:  wifi0: Use hw queue 3 for WME_AC_VO traffic
Oct 18 21:12:40  kernel:  wifi0: Use hw queue 8 for CAB traffic
Oct 18 21:12:40  kernel:  wifi0: Use hw queue 9 for beacons
Oct 18 21:12:40  kernel:  wifi0: Atheros 5424/2424: mem=0xd0100000, irq=233

After a couple of seconds, ath0 associates with my access-point, which happens to be a linux box, with a netgear wifi card running madwifi (svn r1754 as well).

root@gilles-laptop:/# iwconfig
lo        no wireless extensions.

sit0      no wireless extensions.

eth0      no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:"Los_Binos"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:14:6C:32:92:2D
          Bit Rate:54 Mb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=49/94  Signal level=-45 dBm  Noise level=-94 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@gilles-laptop:/# ifconfig
ath0      Link encap:Ethernet  HWaddr 00:16:E3:58:E9:09
          inet6 addr: fe80::216:e3ff:fe58:e909/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1368 (1.3 KiB)  TX bytes:914 (914.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:79341 errors:0 dropped:0 overruns:0 frame:0
          TX packets:79341 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5705666 (5.4 MiB)  TX bytes:5705666 (5.4 MiB)

wifi0     Link encap:UNSPEC  HWaddr 00-16-E3-58-E9-09-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8399 errors:0 dropped:0 overruns:0 frame:646
          TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199
          RX bytes:1067729 (1.0 MiB)  TX bytes:5752 (5.6 KiB)
          Interrupt:233 Memory:eca40000-eca50000

I can now get an IP by running the dhcp client. However, things start to go wrong when I bring down the ath0 interface, or when the laptop is disassociated from the AP (for example if the AP goes down). In these cases, I cannot reassociate with the AP. Here is an example:

root@gilles-laptop:/# iwconfig ath0
ath0      IEEE 802.11g  ESSID:"Los_Binos"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:14:6C:32:92:2D
          Bit Rate:36 Mb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=48/94  Signal level=-47 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@gilles-laptop:/# dhclient ath0
Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
wifi0: unknown hardware address type 801
Listening on LPF/ath0/00:16:e3:58:e9:09
Sending on   LPF/ath0/00:16:e3:58:e9:09
Sending on   Socket/fallback
DHCPREQUEST on ath0 to 255.255.255.255 port 67
DHCPACK from 192.168.3.1
bound to 192.168.3.11 -- renewal in 23596 seconds.

root@gilles-laptop:/# ifconfig ath0
ath0      Link encap:Ethernet  HWaddr 00:16:E3:58:E9:09
          inet addr:192.168.3.11  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::216:e3ff:fe58:e909/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1592 (1.5 KiB)  TX bytes:4029 (3.9 KiB)

root@gilles-laptop:/# ifconfig ath0 down
root@gilles-laptop:/# iwconfig ath0
ath0      IEEE 802.11g  ESSID:""
          Mode:Managed  Channel:0  Access Point: Not-Associated
          Bit Rate:0 kb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-93 dBm  Noise level=-93 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@gilles-laptop:/# iwconfig ath0 ap 00:14:6C:32:92:2D
root@gilles-laptop:/# iwconfig ath0 essid Los_Binos
root@gilles-laptop:/# iwconfig ath0
ath0      IEEE 802.11g  ESSID:"Los_Binos"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:14:6C:32:92:2D
          Bit Rate:0 kb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-96 dBm  Noise level=-96 dBm
          Rx invalid nwid:131  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

(  wait a couple of seconds   )

root@gilles-laptop:/# iwconfig
ath0      IEEE 802.11g  ESSID:"Los_Binos"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:14:6C:32:92:2D
          Bit Rate:0 kb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-96 dBm  Noise level=-96 dBm
          Rx invalid nwid:162  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@gilles-laptop:/# iwlist ath0 scan
ath0      Scan completed :
          Cell 01 - Address: 00:14:6C:32:92:2D
                    ESSID:"Los_Binos"
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Quality=49/94  Signal level=-46 dBm  Noise level=-95 dBm
                    Encryption key:off
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:bcn_int=100

As you can see, even if I used iwconfig to configure the AP bssid and essid, I still cant associate with it(no bit rate and link quality values). However, I noticed the Rx invalid nwid counter keeps increasing rapidly. The only way to solve this, is to rmmod ath_pci && modprobe ath_pci...

I also noticed that if I run hostapd on my AP, then the laptop fails associating with the AP right after modprobing ath_pci, and there is no way to associate the two with hostapd running...

Has someone got any thoughts on this issue ?

Thanks Gilles

Change History

10/19/06 06:11:23 changed by mrenzmann

  • version set to trunk.

Your transscript misses an ifconfig ath0 up at some point after the ifconfig ath0 down. If you missed that step in your tests, too, that's the cause for your problem.

10/19/06 07:26:47 changed by Gilles

Actually, I didnt have to ifconfig ath0 up because the last "iwconfig ath0 ap 00:14:6C:32:92:2D" did it on its own... ath0 was up after that (which is why the bottom iwlist worked I guess). the state of ath0 being constantly changed between up and down by iwconfig was a bit confusing to me...

10/21/06 12:54:12 changed by Gilles

Some more info on this problem: When using a WPA protected AP, wpa_supplicant cant associate either with the AP:


root@gilles-laptop:/# modprobe ath_pci
root@gilles-laptop:/# iwconfig ath0
ath0      IEEE 802.11b  ESSID:""
          Mode:Managed  Channel:0  Access Point: Not-Associated
          Bit Rate:0 kb/s   Tx-Power:0 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@gilles-laptop:/# ifconfig ath0 up
root@gilles-laptop:/# iwlist ath0 scan
ath0      Scan completed :
          Cell 01 - Address: 00:14:6C:32:92:2D
                    ESSID:"LosBinos"
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Quality=55/94  Signal level=-40 dBm  Noise level=-95 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:bcn_int=100
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Extra:wme_ie=dd180050f2020101810002a3400027a4000042435e0062322f00
                    Extra:ath_ie=dd0900037f01010024ff7f
root@gilles-laptop:/# wpa_supplicant -c/etc/wpa_supplicant/wpa_gilles -dd -iath0 -Dmadwifi
Initializing interface 'ath0' conf '/etc/wpa_supplicant/wpa_gilles' driver 'madwifi' ctrl_interface 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_gilles' -> '/etc/wpa_supplicant/wpa_gilles'
Reading configuration file '/etc/wpa_supplicant/wpa_gilles'
Line: 7 - start of a new network block
ssid - hexdump_ascii(len=8):
     4c 6f 73 42 69 6e 6f 73                           LosBinos
scan_ssid=1 (0x1)
key_mgmt: 0x2
PSK (ASCII passphrase) - hexdump_ascii(len=24): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='LosBinos'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=19 WE(source)=13 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
Own MAC address: 00:16:e3:58:e9:09
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Added interface ath0
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 9
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=8):
     4c 6f 73 42 69 6e 6f 73                           LosBinos
Wireless event: cmd=0x8b1a len=17


Wireless event: cmd=0x8b19 len=8
Received 327 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:14:6c:32:92:2d ssid='LosBinos' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected based on WPA IE
Trying to associate with 00:14:6c:32:92:2d (SSID='LosBinos' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_madwifi_associate
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b1a len=17



Authentication with 00:00:00:00:00:00 timed out.
Added BSSID 00:00:00:00:00:00 into blacklist
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b1a len=8



Wireless event: cmd=0x8b19 len=8
Received 327 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:14:6c:32:92:2d ssid='LosBinos' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected based on WPA IE
Trying to associate with 00:14:6c:32:92:2d (SSID='LosBinos' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_madwifi_associate
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b1a len=17



Authentication with 00:00:00:00:00:00 timed out.
BSSID 00:00:00:00:00:00 blacklist count incremented to 2
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)

(the line breaks in the wpa_supplicant output have been added manually and show when wpa_supplicant paused for a couple of seconds)

From my understanding, things start to go wrong when wpa_supplicant tries to associate with the AP, right after scanning

As a side note, I successfully ran wpa_supplicant with the same config file using ndiswrapper instead of madwifi. However, ndiswrapper comes with its own drawbacks, and I d rather use madwifi. Any help is appreciated. I m happy to run more tests too !

Thanks

03/21/07 01:19:15 changed by N'Ice

I can add something:
Benq p41 laptop with AR5006eg
UBUNTU 6.10 with restricted-modules uninstalled.
madwifi from SVN (revision 2206)

[17187402.120000] ath_pci: 0.9.4.5 (svn r2203)
[17187402.120000] ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 233
[17187402.120000] PCI: Setting latency timer of device 0000:03:00.0 to 64
[17187402.636000] ath_rate_sample: 1.2 (svn r2203)
[17187402.636000] wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
[17187402.636000] wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
[17187402.636000] wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
[17187402.636000] wifi0: H/W encryption support: WEP AES AES_CCM TKIP
[17187402.636000] wifi0: mac 10.0 phy 6.1 radio 10.2
[17187402.636000] wifi0: Use hw queue 1 for WME_AC_BE traffic
[17187402.636000] wifi0: Use hw queue 0 for WME_AC_BK traffic
[17187402.640000] wifi0: Use hw queue 2 for WME_AC_VI traffic
[17187402.640000] wifi0: Use hw queue 3 for WME_AC_VO traffic
[17187402.640000] wifi0: Use hw queue 8 for CAB traffic
[17187402.640000] wifi0: Use hw queue 9 for beacons
[17187402.644000] wifi0: Atheros 5424/2424: mem=0xdf9f0000, irq=233

something is wrong when i try to conect my AP point with WEP Shared 104bit hex key i can't associate with it, but when i try with WEP disabled it's running pretty good. It seems to me that WEP module is kinda broken. I sure that i managed iwconfig settings correctly

here iwconfig dump with WEP enabled AP !NOT WORKING!

ath0      IEEE 802.11g  ESSID:"homenet"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:15:E9:CC:D7:2E
          Bit Rate=11 Mb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:5945-4211-4061-9841-5021-9843-73   Security mode:restricted
          Power Management:off
          Link Quality=45/94  Signal level=-50 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

and this is with WEP disabled (only mac access list) !WORKING!

ath0      IEEE 802.11g  ESSID:"homenet"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:15:E9:CC:D7:2E
          Bit Rate:54 Mb/s   Tx-Power:17 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=62/94  Signal level=-34 dBm  Noise level=-96 dBm
          Rx invalid nwid:372  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

next i'll try with WPA.

PS AP - ADSL router D-link DSL-G604T (running with hidden ssid and in G only mode) And i try to load modules as on wiki/Compatibility#AtherosAR5006EG in many ways.