DWA-140 hostapd with WPA-2/WPE problem

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

winjows

22-03-2011 08:23:49

I have D-Link DWA-140 USB

There are no problems when connecting to the mode with no encryption (public network)
Run with the authorization WPA WEP WPA2 = failed.

[code9rq7vxbd]$sudo lsusb
Bus 001 Device 002: ID 07d1:3c0a D-Link System DWA-140 RangeBooster N Adapter(rev.B2) [Ralink RT2870][/code9rq7vxbd]

My kernel
[code9rq7vxbd]# uname -a
Linux captain-desktop 2.6.35-27-generic-pae #48-Ubuntu SMP Tue Feb 22 21:46:58 UTC 2011 i686 GNU/Linux[/code9rq7vxbd]

[code9rq7vxbd]$sudo cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
logger_syslog=1
logger_syslog_level=4
logger_stdout=0
logger_stdout_level=4
debug=4
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=IT-CROWD
country_code=RU
hw_mode=g
channel=8
beacon_int=100
max_num_sta=255
wme_enabled=1
macaddr_acl=0
accept_mac_file=/etc/hostapd/hostapd.accept
deny_mac_file=/etc/hostapd/hostapd.deny
wpa=2
wpa_passphrase=123456
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_group_rekey=600
wpa_gmk_rekey=86400[/code9rq7vxbd]

[code9rq7vxbd]$sudo lsmod | grep "rt2\|80211"
rt2800usb 9636 0
rt2800lib 39183 1 rt2800usb
crc_ccitt 1351 1 rt2800lib
rt2x00usb 10032 1 rt2800usb
rt2x00lib 34629 3 rt2800usb,rt2800lib,rt2x00usb
kfifo 8355 1 rt2x00lib
mac80211 253233 3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211 148229 2 rt2x00lib,mac80211
compat 7323 3 rt2x00lib,mac80211,cfg80211
led_class 2633 2 rt2x00lib,compat
lib80211 5058 0[/code9rq7vxbd]

compat-wireless build from snap 2010-03-22

[code9rq7vxbd]#hostapd -ddd /etc/hostapd/wpa.conf
Configuration file: /etc/hostapd/wpa.conf
Line 12: DEPRECATED: 'debug' configuration variable is not used anymore
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Add own interface ifindex 3
nl80211: New interface mon.wlan0 created: ifindex=6
nl80211: Add own interface ifindex 6
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=RU
nl80211: 2402-2482 @ 40 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g Channel: 8 Frequency: 2447 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 1c:af:f7:04:b1:e9 and ssid 'test'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=4):
74 65 73 74 test
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 10/20 bytes from /dev/random
random: Only 10/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects
Get randomness: len=32 entropy=0
random from os_get_random - hexdump(len=32): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=32): [REMOVED]
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
random from os_get_random - hexdump(len=32): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=32): [REMOVED]
Key Counter - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
random from os_get_random - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=16): [REMOVED]
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=0x8096d07 key_idx=1 set_tx=1 seq_len=0 key_len=32
broadcast key
nl80211: Set beacon (beacon_set=0)
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Interface down
Unknown event 30
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Interface up
Unknown event 29
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5[/code9rq7vxbd]

Try connect
[code9rq7vxbd]mgmt::auth
authentication: STA=38:e7:d8:6d:ac:a7 auth_alg=0 auth_transaction=1 status_code=0 wep=0
New STA
authentication reply: STA=38:e7:d8:6d:ac:a7 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
Add randomness: count=1 entropy=0
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::assoc_req
association request: STA=38:e7:d8:6d:ac:a7 capab_info=0x431 listen_interval=3
IEEE 802.11 element parse ignored unknown element (id=46 elen=1)
WMM IE - hexdump(len=7): 00 50 f2 02 00 01 00
Validating WMM IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1 QoS info 0x0
new AID 1
Add randomness: count=2 entropy=1
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::auth cb
wlan0: mgmt::deauth
wlan0: deauthentication: STA=38:e7:d8:6d:ac:a7 reason_code=1
wlan0: AP-STA-DISCONNECTED 38:e7:d8:6d:ac:a7
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x827a410 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=38:e7:d8:6d:ac:a7
WPA: 38:e7:d8:6d:ac:a7 WPA_PTK entering state DISCONNECTED
WPA: 38:e7:d8:6d:ac:a7 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x827a410 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=38:e7:d8:6d:ac:a7
Could not set station 38:e7:d8:6d:ac:a7 flags for kernel driver (errno=11).
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x827a410 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=38:e7:d8:6d:ac:a7
Add randomness: count=3 entropy=2
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::auth
authentication: STA=38:e7:d8:6d:ac:a7 auth_alg=0 auth_transaction=1 status_code=0 wep=0
New STA
authentication reply: STA=38:e7:d8:6d:ac:a7 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
Add randomness: count=4 entropy=3
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::assoc_resp cb
nl80211: NL80211_CMD_NEW_STATION result: -22 (Invalid argument)
mgmt::assoc_req
association request: STA=38:e7:d8:6d:ac:a7 capab_info=0x431 listen_interval=3
IEEE 802.11 element parse ignored unknown element (id=46 elen=1)
WMM IE - hexdump(len=7): 00 50 f2 02 00 01 00
Validating WMM IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1 QoS info 0x0
new AID 1
Add randomness: count=5 entropy=4
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::auth cb
wlan0: mgmt::deauth
wlan0: deauthentication: STA=38:e7:d8:6d:ac:a7 reason_code=1
wlan0: AP-STA-DISCONNECTED 38:e7:d8:6d:ac:a7
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x827a3f0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=38:e7:d8:6d:ac:a7
WPA: 38:e7:d8:6d:ac:a7 WPA_PTK entering state DISCONNECTED
WPA: 38:e7:d8:6d:ac:a7 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x827a3f0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=38:e7:d8:6d:ac:a7
Could not set station 38:e7:d8:6d:ac:a7 flags for kernel driver (errno=11).
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x827a3f0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=38:e7:d8:6d:ac:a7
Add randomness: count=6 entropy=5
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::auth
authentication: STA=38:e7:d8:6d:ac:a7 auth_alg=0 auth_transaction=1 status_code=0 wep=0
New STA
authentication reply: STA=38:e7:d8:6d:ac:a7 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
Add randomness: count=7 entropy=6
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::assoc_resp cb
nl80211: NL80211_CMD_NEW_STATION result: -22 (Invalid argument)
mgmt::assoc_req
association request: STA=38:e7:d8:6d:ac:a7 capab_info=0x431 listen_interval=3
IEEE 802.11 element parse ignored unknown element (id=46 elen=1)
WMM IE - hexdump(len=7): 00 50 f2 02 00 01 00
Validating WMM IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1 QoS info 0x0
new AID 1
Add randomness: count=8 entropy=7
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=12): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
mgmt::auth cb[/code9rq7vxbd]


Who can help?