PDA

View Full Version : Wireless (wpa_supplicant) keep on disconnecting


bsund
2008-01-22, 09:43 AM CST
Hi!

I have this problem where i keep on losing the connection. I have everything set up with wpa_supplicant and dhclient because all gui's crashed, burned or just failed

Everything go on nicely but sometimes it just drop the connection and try to reauth, it varies sometimes it can take 2min and sometimes it can take 30min before it drops. sometimes it reauth in 5sec sometimes it can take 15min, so everything seems very random. When it drops it seems like if i kill everything and run wpa_suppliicant manually it will kick in after one or two tries.

Does anyone have a clue why it does this? works in windows to 100% very stable no dropouts..

One other thing is that if i do a clean boot. I always have to run wpa_supplicant having it try to auth then interupt it and run it again for it to start. Everything just seem to be a bit buggy and unstable?

Using Fedora 8 with latest updates and 3Com Corporation AR5212 802.11abg NIC (3CRDAG675) (rev 01) with madwifi drivers.


How it looks when i fire it up from fresh boot:
[root@localhost ~]# wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0
Trying to associate with 00:1e:7a:18:06:e0 (SSID='FHS1' freq=2442 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:1e:7a:18:06:e0 (SSID='FHS1' freq=2442 MHz)
Authentication with 00:00:00:00:00:00 timed out.
***** CTRL+C *****
CTRL-EVENT-TERMINATING - signal 2 received
[root@localhost ~]# wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0&
[1] 2826
[root@localhost ~]# Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Trying to associate with 00:1e:7a:18:06:e0 (SSID='FHS1' freq=2442 MHz)
Associated with 00:1e:7a:18:06:e0
CTRL-EVENT-EAP-STARTED EAP authentication started
CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected
OpenSSL: tls_connection_handshake - Failed to read possible Application Data error:00000000:lib(0):func(0):reason(0)
EAP-MSCHAPV2: Authentication succeeded
EAP-TLV: TLV Result - Success - EAP-TLV/Phase2 Completed
CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
WPA: Key negotiation completed with 00:1e:7a:18:06:e0 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:1e:7a:18:06:e0 completed (auth) [id=0 id_str=]


This is how it looks when it drops and then gets picked up again:
[root@localhost ~]# CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:1e:7a:18:06:e0
CTRL-EVENT-EAP-STARTED EAP authentication started
CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected
OpenSSL: tls_connection_handshake - Failed to read possible Application Data error:00000000:lib(0):func(0):reason(0)
EAP-TLV: TLV Result - Success - EAP-TLV/Phase2 Completed
CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
WPA: Key negotiation completed with 00:1e:7a:18:06:e0 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:1e:7a:18:06:e0 completed (reauth) [id=0 id_str=]

Iron_Mike
2008-01-22, 09:57 AM CST
2 things come to mind. Since starting wpa_supplicant from the CLI, is the wpa_supplicant service disabled?? Also is your SSID hidden or being broadcast?? If it is hidden, set it for broadcast and see if that helps...

bsund
2008-01-22, 10:02 AM CST
the wpa_supplicant service is disabled, i think the service is just a ordinary wpa_supplicant running in daemon mode so i disabled it to be able to fiddle more freely with it. the ssid is hidden and it's the net on my school so it will stay hidden :)

Iron_Mike
2008-01-22, 10:15 AM CST
What's your wpa_supplicant.conf file look like??? Edit out the password and what not....

bsund
2008-01-22, 10:30 AM CST
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="FHS1"
scan_ssid=1
key_mgmt=WPA-EAP
group=TKIP
pairwise=TKIP
identity="***"
password="***"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}

bsund
2008-01-22, 11:08 AM CST
i found one thing, using ap_scan=2 it was much more aggressive to reconnect to the same ap instead of scanning the net all over again so faster reconnect, but it still just lost the connection trying 0 now and i'll see.. (turned out it worked exactly like 2 for me)

maybe it happens that it drops in windows also but all the bloat hide it..

although i have a good comparision when listening to internet radio with vlc.. it has never skipped on windows but keep doing it in linux when the net drops..

Iron_Mike
2008-01-22, 11:33 AM CST
i found one thing, using ap_scan=2 it was much more aggressive to reconnect to the same ap instead of scanning the net all over again so faster reconnect, but it still just lost the connection trying 0 now and i'll see.. (turned out it worked exactly like 2 for me)

maybe it happens that it drops in windows also but all the bloat hide it..

although i have a good comparision when listening to internet radio with vlc.. it has never skipped on windows but keep doing it in linux when the net drops..


Yep, that's what I was looking for, to see what your ap_scan= setting was at...

bsund
2008-01-22, 12:00 PM CST
just found out one could run wpa_supplicant with some debug info :P

after it have run happily for a while this happens:RTM_NEWLINK: operstate=1 ifi_flags=0x1043 ([UP][RUNNING])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:1e:7a:18:06:e0 into blacklist
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
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_del_key: keyidx=0
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portValid=0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'FHS1'
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 8 pairwise 8 key_mgmt 1 proto 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT 802.1X
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 01 00 00
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_madwifi_associate
Setting authentication timeout: 60 sec 0 usec
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=12

It puts the access point i use into some blacklist(!?) makes no sense :rolleyes:

Iron_Mike
2008-01-22, 12:11 PM CST
Double check this:

wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0

There should also be -Dmadwifi to specify the "driver" if that doesn't work try -Dwext

bsund
2008-01-22, 12:23 PM CST
ya that is what i use been trying both madwifi and wext which is the default i think?

noticed that the blacklist thing is that if it gets disconnected from a ap it blacklist it temporarily until it tried others, so no help there either :/

bsund
2008-01-25, 08:24 PM CST
this seems to have been fixed in latest kernel update! (2.6.23.14-107.fc8)

good stuff :)