Laptop gets disconnected
Gustav Wetter
gustav_wetter
Tue Jul 20 04:41:32 PDT 2010
Hello!
I am having problems with my hostapd wireless AP and any help from you
people out there would be greatly appreciated! I have done my best to
explain the problem and copy and paste what I believe to be relevant
debug output.
THE PROBLEM
I can connect to my wireless network with my laptop and everything works
fine, but after a while (<5 minutes) I get disconnected. When I try
to reconnect it does not work until I reboot the server/AP. It would
probably suffice to just kill the hostapd process correctly and then
restart it, but since I am new to the Linux world I don't know how.
THE SETUP
Server/AP
OS version: Ubuntu Server 10.04/Linux 2.6.31-21-generic-pae
hostapd version: hostapd v0.6.9
Wireless card model in AP: Atheros AR928X Wireless Network adapter
Wireless driver: athk9 (came with my Ubuntu installation, I think)
MAC-address Wireless card in AP: 00:22:43:66:21:4d
Laptop/Client
Wireless card model in laptop: Intel WiFi link 5300 AGN
MAC-address Wireless card in laptop: 00:21:6a:92:1c:36
Configuration file
This is the output of my hostapd.conf: sudo grep -v \#
/etc/hostapd/hostapd.conf | grep -v "^$"
interface=wlan0
bridge=br0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=dalvik[dot]no[dash]ip[dot]org
hw_mode=g
channel=1
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wme_enabled=1
wme_ac_bk_cwmin=4
wme_ac_bk_cwmax=10
wme_ac_bk_aifs=7
wme_ac_bk_txop_limit=0
wme_ac_bk_acm=0
wme_ac_be_aifs=3
wme_ac_be_cwmin=4
wme_ac_be_cwmax=10
wme_ac_be_txop_limit=0
wme_ac_be_acm=0
wme_ac_vi_aifs=2
wme_ac_vi_cwmin=3
wme_ac_vi_cwmax=4
wme_ac_vi_txop_limit=94
wme_ac_vi_acm=0
wme_ac_vo_aifs=2
wme_ac_vo_cwmin=2
wme_ac_vo_cwmax=3
wme_ac_vo_txop_limit=47
wme_ac_vo_acm=0
ieee80211n=1
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
INFO FROM DEBUG OUTPUT
I run hostapd with the following command:
evilannanas at dalvik:~$ sudo hostapd -dd /etc/hostapd/hostapd.conf
[sudo] password for evilannanas:
hostapd starts and I get some debugging output:
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
Opening raw packet socket for ifindex -1215979532
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
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=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
....
RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x4
RATE[3] rate=110 flags=0x4
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11b Channel: 1 Frequency: 2412 MHz
Using interface wlan0 with hwaddr 00:22:43:66:21:4d and ssid
'dalvik[dot]no[dash]ip[dot]org'
SSID - hexdump_ascii(len=29):
64 61 6c 76 69 6b 5b 64 6f 74 5d 6e 6f 5b 64 61 dalvik[dot]no[da
73 68 5d 69 70 5b 64 6f 74 5d 6f 72 67 sh]ip[dot]org
PSK (ASCII passphrase) - hexdump_ascii(len=10):
66 75 70 70 65 6c 6d 75 70 70 password
PSK (from passphrase) - hexdump(len=32): 19 12 6b 2c 40 3a 05 1b 36 dd
ab 6d 76 30 0f 57 fb 87 85 ce 1a 32 65 0f 06 00 bc 9e 76 47 ad 72
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wlan0: Setup of interface done.
Everything seems fine so far and I connect my laptop to the AP. It
generates the following output:
STA 00:21:6a:92:1c:36 sent probe request for broadcast SSID
MGMT (TX callback) ACK
mgmt::proberesp cb
STA 00:21:6a:92:1c:36 sent probe request for our SSID
STA 00:21:6a:92:1c:36 sent probe request for our SSID
MGMT (TX callback) ACK
mgmt::proberesp cb
MGMT (TX callback) ACK
mgmt::proberesp cb
MGMT
mgmt::auth
authentication: STA=00:21:6a:92:1c:36 auth_alg=0 auth_transaction=1
status_code=0 wep=0
New STA
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.11: authentication OK (open
system)
wlan0: STA 00:21:6a:92:1c:36 MLME:
MLME-AUTHENTICATE.indication(00:21:6a:92:1c:36, OPEN_SYSTEM)
wlan0: STA 00:21:6a:92:1c:36 MLME:
MLME-DELETEKEYS.request(00:21:6a:92:1c:36)
authentication reply: STA=00:21:6a:92:1c:36 auth_alg=0
auth_transaction=2 resp=0 (IE len=0)
MGMT (TX callback) ACK
mgmt::auth cb
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.11: authenticated
MGMT
mgmt::assoc_req
association request: STA=00:21:6a:92:1c:36 capab_info=0x411
listen_interval=10
WME IE - hexdump(len=7): 00 50 f2 02 00 01 00
Validating WME IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1
HT: STA 00:21:6a:92:1c:36 HT Capabilities Info: 0x0830
handle_assoc STA 00:21:6a:92:1c:36 - 20 MHz HT, num of 20MHz HT STAs 1
hostapd_ht_operation_update current operation mode=0x13
hostapd_ht_operation_update new operation mode=0x13 changes=0
new AID 2
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.11: association OK (aid 2)
MGMT (TX callback) ACK
mgmt::assoc_resp cb
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.11: associated (aid 2)
wlan0: STA 00:21:6a:92:1c:36 MLME:
MLME-ASSOCIATE.indication(00:21:6a:92:1c:36)
wlan0: STA 00:21:6a:92:1c:36 MLME:
MLME-DELETEKEYS.request(00:21:6a:92:1c:36)
wlan0: STA 00:21:6a:92:1c:36 WPA: event 1 notification
wlan0: STA 00:21:6a:92:1c:36 WPA: start authentication
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state INITIALIZE
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.1X: unauthorizing port
WPA: 00:21:6a:92:1c:36 WPA_PTK_GROUP entering state IDLE
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state AUTHENTICATION
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state AUTHENTICATION2
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state INITPSK
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state PTKSTART
wlan0: STA 00:21:6a:92:1c:36 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
IEEE 802.1X: 00:21:6a:92:1c:36 TX status - version=2 type=3 length=95 -
ack=0
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.1X: did not Ack EAPOL-Key frame
(unicast index=79)
wlan0: STA 00:21:6a:92:1c:36 WPA: EAPOL-Key timeout
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state PTKSTART
wlan0: STA 00:21:6a:92:1c:36 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
IEEE 802.1X: 00:21:6a:92:1c:36 TX status - version=2 type=3 length=95 -
ack=1
IEEE 802.1X: 123 bytes from 00:21:6a:92:1c:36
IEEE 802.1X: version=1 type=3 length=119
wlan0: STA 00:21:6a:92:1c:36 WPA: received EAPOL-Key frame (2/4
Pairwise)
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:22:43:66:21:4d A2=00:21:6a:92:1c:36
WPA: PMK - hexdump(len=32): 19 12 6b 2c 40 3a 05 1b 36 dd ab 6d 76 30 0f
57 fb 87 85 ce 1a 32 65 0f 06 00 bc 9e 76 47 ad 72
WPA: PTK - hexdump(len=64): ad d9 e6 8d b5 07 41 06 8b a0 dc 75 e5 ca 53
9f 72 dd b7 bc 11 8e 4b 26 39 f9 d0 09 c3 46 13 c1 89 13 e7 c9 50 a7 38
8f 96 ad ee 02 b2 f8 92 36 aa e0 ca 0a 1d da 14 18 52 48 2d 02 a6 7f ab
65
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA 00:21:6a:92:1c:36 WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=56): 30 14 01 00 00 0f ac 04
01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 dd 16 00 0f ac 01 01 00 96 ad
0c 20 bc 54 09 a7 fa bf 6d 81 e4 62 ac af dd 00 00 00 00 00 00 00 00 00
IEEE 802.1X: 00:21:6a:92:1c:36 TX status - version=2 type=3 length=151 -
ack=1
IEEE 802.1X: 99 bytes from 00:21:6a:92:1c:36
IEEE 802.1X: version=1 type=3 length=95
wlan0: STA 00:21:6a:92:1c:36 WPA: received EAPOL-Key frame (4/4
Pairwise)
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state PTKINITDONE
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.1X: authorizing port
wlan0: STA 00:21:6a:92:1c:36 RADIUS: starting accounting session
4BEB0D8C-00000001
wlan0: STA 00:21:6a:92:1c:36 WPA: pairwise key handshake completed (RSN)
Everything works fine, I can connect to the WLAN/LAN and Internet. After
a short while, though, my laptop gets disconnected from the wireless
network and I am unable to reconnect unless I restart the server/AP
running hostapd. I get the following debug output on the AP/server
screen, I think it is related to my problem:
MGMT
mgmt::action
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.11: handle_action - unknown action
category 7 or invalid frame
IEEE 802.11: Return unknown Action frame back to sender
MGMT (TX callback) ACK
mgmt::action cb
MGMT (TX callback) ACK
mgmt::action cb
MGMT (TX callback) ACK
... and I also see this message in the log:
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect:
STA 00:21:6a:92:1c:36 reason 2
WPA: 00:21:6a:92:1c:36 WPA_PTK_GROUP entering state IDLE
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state DISCONNECTED
WPA: 00:21:6a:92:1c:36 WPA_PTK entering state INITIALIZE
wlan0: STA 00:21:6a:92:1c:36 IEEE 802.1X: unauthorizing port
What does this mean ("unknown action category 7 or invalid frame" /
"WPA authenticator requests disconnect: STA 00:21:6a:92:1c:36 reason 2" ?)
Why do I get disconnected, and why can't I reconnect without restarting
my AP? Is there anything wrong with my configuration? Thanks everyone!
Regards,
Gustav
_________________________________________________________________
Hotmail: Trusted email with Microsoft?s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20100720/87cfa295/attachment.htm
More information about the Hostap
mailing list