Request for help troubleshooting rt73usb and wpa_supplicant

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5151

thisrod

06-01-2009 05:18:55

I'm trying to get a D-Link G122 version C1 USB wireless dongle to associate with my home access point. Wpa_supplicant appears to be failing - it keeps running for at least 30 seconds or so, and prints messages about retrying to associate. If someone has time, could you please glance over the trace below and see if you can spot a likely problem, or suggest something to try next?

The access point shown in the scan has the same MAC as my home one; it's set to not broadcast it's SSID.

There's a message "WPA No WPA/RSN IE available from association info" in the debug output that seems a bit odd.

Thanks very much to the driver developers for providing so much support on this forum.


[code300xg69c]# ifconfig wlan0 up
# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:17:9A:C9:40:9A
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

# iwconfig wlan0
wlan0 IEEE 802.11g ESSID:"fslj39i93vb"
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key: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

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - Trying to associate with SSID 'fslj39i93vb'
CTRL-EVENT-TERMINATING - signal 2 received
# iwconfig wlan0 up
# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 00:13:D3:7B:13:6B
ESSID:""
Mode:Master
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=51/100 Signal level=-50 dBm
Encryption key:on
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
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:tsf=0000000148006cc9

# uname -r
2.6.24-etchnhalf.1-686
# modinfo -F version rt73usb
2.0.10
cat /etc/wpa_supplicant.conf
# default ctrl_interface path
ctrl_interface=/var/run/wpa_supplicant

ap_scan=2

# Crotty St network - generated by wpa_passphrase
network={
scan_ssid=1
ssid="fslj39i93vb"
proto=WPA2
key_mgmt=WPA-PSK
psk="0an4v9gbdlnelpmpapfl356"
#psk=a2d4afd3eb115713fb19b51ab4cdb2f59a9df4e75717d78a8540e48a24bce068
}
# ifconfig wlan0 up
# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext -d
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ap_scan=2
Priority group 0
id=0 ssid='fslj39i93vb'
Initializing interface (2) 'wlan0'
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)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:17:9a:c9:40:9a
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 -
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'fslj39i93vb'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
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=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT:ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
Setting authentication timeout: 60 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=19
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b19 len=8
Received 245 bytes of scan results (1 BSSes)
Scan results: 1
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
WEXT: Operstate: linkmode=0, operstate=6
Cancelling scan request[/code300xg69c]

nightflier

07-01-2009 23:34:19

I'm trying almost the same thing as you are with an MSI US54EX and I am having trouble as well.
If it's any indication, you could try a newer kernel. My rt73usb module says its version 2.1.8, from 2.6.27-gentoo-r7 #4 SMP PREEMPT.

My wpa_supplicant does this after its initialization (unfortunately over and over again, with slight variations in ap scanning and blacklisting)
[code24no5zod]
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 1018 bytes of scan results (3 BSSes)
Scan results: 3
Selecting BSS from priority group 1
0: 00:1a:92:b3:43:13 ssid='ConnectionPoint' wpa_ie_len=30 rsn_ie_len=26 caps=0x11
selected based on RSN IE
Trying to associate with 00:1a:92:b3:43:13 (SSID='ConnectionPoint' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 8 pairwise 24 key_mgmt 2 proto 2
WPA: set AP WPA IE - hexdump(len=30): dd 1c 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 04 00 50 f2 02 01 00 00 50 f2 02 00 00
WPA: set AP RSN IE - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 00 00
WPA: using GTK TKIP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
Authentication with 00:00:00:00:00:00 timed out.
BSSID 00:1a:92:b3:43:13 blacklist count incremented to 2
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
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
[/code24no5zod]

The message "Authentication with 000000000000 timed out." seems to miss the correct ssid. Otherwise I can't spot real error messages, but I don't know anything about this...

Meanwhile, in /var/log/messages, for each association attempt

[code24no5zod]
Jan 8 00:11:15 night wlan0: authenticate with AP 00:1a:92:b3:43:13
Jan 8 00:11:15 night wlan0: authenticate with AP 00:1a:92:b3:43:13
Jan 8 00:11:15 night wlan0: authenticate with AP 00:1a:92:b3:43:13
Jan 8 00:11:16 night wlan0: authentication with AP 00:1a:92:b3:43:13 timed out
[/code24no5zod]

I've enabled the module debug output, which seems to add these four lines periodically

[code24no5zod]
Jan 8 00:31:51 night phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 4, CWmax: 10, Aifs: 2.
Jan 8 00:31:51 night phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 4, CWmax: 10, Aifs: 2.
Jan 8 00:31:51 night phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 4, CWmax: 10, Aifs: 2.
Jan 8 00:31:51 night phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 4, CWmax: 10, Aifs: 2.
[/code24no5zod]

If anyone can offer advice on how to debug this any better, or needs more info from me to do so, please don't hesitate.

thisrod

27-01-2009 03:33:40

I'm posting this over the airwaves at last. Hooray!

I still don't know what the problem was. I upgraded to kernel 2.6.26, and got the same errors. Then I added the following to /etc/network/interfaces
[code3m77wife]iface wlan0 inet dhcp
wpa-ssid xxxxxxxx
wpa-psk xxxxxxxxxxxxxxxx
wpa-scan-ssid 1
[/code3m77wife]
This tells ifup to run wpa_supplicant, then set parameters via wpa-cli. For some reason that worked, while providing the "same" settings in wpa_supplicant.conf failed.

The root problem is that you get obsolete answers when you ask google how to configure wireless networks under Debian. The most visible examples on the web set the ssid and psk with iwpriv, and that doesn't work with the rt73usb driver. The new way to do it, using wpa_supplicant, is described in /usr/share/doc/wpasupplicant/README.modes.gz, on a Debian system with the wpasupplicant package installed.