[Networking] MatteFugger:
OK... short one....

I have the prob as well with the zyxcel router p-660....

first a work around to make the problem less bad...

in the router config - Network->wirelessLan put the max value i.e.9999 in the field for "ReAuthentication Timer"

that makes the problem comes up "only" every 9999 sec - better than nothing... :-)

Second:

I had the problem first back in Jan and begining of Feb than I put a CM6 nightly Rom on my HTC DHD... somehow the issue was gone I Upgraded my nightly rom from time to time and at some stage when I installed CM7 the problem came back.

Explaining the prob:

after enabling wifi it connects fine to my zyxcel router WPA2 encryption....

DHCP is running on the router and finally I would say the DHCP server/client is somehow the problem... because once the ReAuthentication Time is over the HTC DHD is ReAuthenticating all is working as expected but for some reason the HTC is not updating the status...

Result: after reauth is happening and the status not gets updated some apps still have network access - some not - some limited...

so the connection is up somehow but the DHCP lease is not valid somehow

next thing is this seems to be an issue of the combination of zyxcel and the android - also other few routers are affected by this... will try to get access to a router where I don't have this prob and pul log and see - maybe something can be figured out

sorry for this crappy explanation - I just state what I guess from seeing the log

here it is the Log - read from bottom to top:

06-01 22:02:53.010 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=00:00:00:00:00:00\n
06-01 22:02:53.010 I/wpa_supplicant ( 2758): WPA: Key negotiation completed with xxxxxxxxxxxxxxxx [PTK=TKIP GTK=TKIP]\n
06-01 22:02:53.001 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:02:51.120 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:02:51.116 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
06-01 22:02:49.165 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
06-01 22:02:23.260 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=00:00:00:00:00:00\n
06-01 22:02:23.260 I/wpa_supplicant ( 2758): WPA: Key negotiation completed with xxxxxxxxxxxxxxxx [PTK=TKIP GTK=TKIP]\n
06-01 22:02:23.258 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:02:21.220 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:02:21.210 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
06-01 22:02:19.265 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
[COLOR="Magenta"]Here I miss the line marked in red below[/COLOR]
06-01 22:01:53.260 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=00:00:00:00:00:00\n
06-01 22:01:53.260 I/wpa_supplicant ( 2758): WPA: Key negotiation completed with xxxxxxxxxxxxxxxx [PTK=TKIP GTK=TKIP]\n
06-01 22:01:53.256 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:01:51.170 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:01:51.160 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
06-01 22:01:49.365 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
[COLOR="Red"]06-01 22:01:22.230 I/wpa_supplicant ( 2758): CTRL-EVENT-CONNECTED - Connection to 00:02:cf:95:f7:95 completed (auth) [id=0 id_str=]\n[/COLOR]
[COLOR="Magenta"]this line ^^ I miss 30 sec later when ReAuth is happening[/COLOR]
06-01 22:01:22.230 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=00:00:00:00:00:00\n
06-01 22:01:22.230 I/wpa_supplicant ( 2758): WPA: Key negotiation completed with xxxxxxxxxxxxxxxx [PTK=TKIP GTK=TKIP]\n
06-01 22:01:22.230 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:01:20.240 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00\n
06-01 22:01:20.237 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
06-01 22:01:18.241 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00\n
06-01 22:01:17.020 I/wpa_supplicant ( 2758): CTRL-EVENT-DRIVER-STATE STARTED\n
06-01 22:01:16.680 I/wpa_supplicant ( 2758): Associated with 00:02:cf:95:f7:95\n
[COLOR="Magenta"]here I switch on the wifi[/COLOR]
06-01 22:01:16.680 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=0 state=4 BSSID=xxxxxxxxxxxxxxxx\n
06-01 22:01:16.560 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=xxxxxxxxxxxxxxxx\n
06-01 22:01:16.552 I/wpa_supplicant ( 2758): Trying to associate with 00:02:cf:95:f7:95 (SSID='blub' freq=2462 MHz)\n
06-01 22:01:16.065 I/wpa_supplicant ( 2758): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00\n

Edit:

I will add a view links related to the problem...

http://code.google.com/p/android/issues/detail?id=12125

Edit: Also ich habe mich ein wenig mit der Sache.. oh english...

So I have made some tests on a different AP and so far I ruled out a few things...

As far as I understood it the wpa_supplicant is responsible/in error

The Zyxcel P-660... For the DHCP server of the router it is not possible to set the DHCP lease time

But you can set this ReAuthentication timer... as far as I understand that are 2 different things and these 2 events are handled in different way by wpa_supplicant.

if lease time is expired the client is requesting a full new lease from the DHCP server. The reauth is just a kind of confirmation that the WPA key is stil valid... somehow this way....

so wpa_supplicant handles correct if it needs a full new lease but somehow after the reauth it is not setting the Stat to connected (it is connected but it's state is still the authprocess so counted as offline) ...

Ideas: 1. I was trying to set the lease time smaller than the reauth time but in the Router I do not have the option (unable to test the idea) so if that can be setup this way, the client gets the new lease befor it is asked to reauth so if the time counter for reauth gets reseted when the client requests new lease, this should be an easy workaround

Also checked a bit if it is possible to overide the parameter for the lease/reauth time localy i.e. in the WPA_supplicant.conf - no success so far

a.t.m. i just try to get familar with the wpa_supplicant looking at it's code as this is causing the issue - I believe..

I'll update you -in case I find the problem in the code is someone here able to help me compiling it and test it? I'm a bit noob when it comes to that kind of stuff - thanks