[Desire Q&A, Help & Troubleshooting] d0msen:
Hi everyone,

I recently moved to AOSP Roms since I'm sick of Sense and since that I'm experiencing this very weird Wifi-glitch. First of all, here's a logcat of what I get:

12-07 14:24:20.896 174 732 V WifiMonitor: Event [CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys]
12-07 14:24:20.906 174 272 V WifiStateTracker: New network state is DISCONNECTED
12-07 14:24:20.906 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=00:00:00:00:00:00]
12-07 14:24:20.906 174 272 V WifiStateTracker: Changing supplicant state: COMPLETED ==> DISCONNECTED
12-07 14:24:21.006 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=2 BSSID=00:00:00:00:00:00]
12-07 14:24:21.006 174 272 V WifiStateTracker: Changing supplicant state: DISCONNECTED ==> SCANNING
12-07 14:24:21.926 174 732 V WifiMonitor: Event [Trying to associate with 00:11:6b:15:9a:4a (SSID='default' freq=2457 MHz)]
12-07 14:24:21.926 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=3 BSSID=00:11:6b:15:9a:4a]
12-07 14:24:21.936 174 272 V WifiStateTracker: Changing supplicant state: SCANNING ==> ASSOCIATING
12-07 14:24:25.686 174 732 V WifiMonitor: Event [CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys]
12-07 14:24:25.686 174 272 V WifiStateTracker: New network state is DISCONNECTED
12-07 14:24:25.716 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=00:11:6b:15:9a:4a]
12-07 14:24:25.716 174 272 V WifiStateTracker: Changing supplicant state: ASSOCIATING ==> DISCONNECTED
12-07 14:24:25.906 174 272 D WifiStateTracker: Reset connections and stopping DHCP
12-07 14:24:26.916 174 272 D WifiStateTracker: Disabling interface
12-07 14:24:31.936 174 732 V WifiMonitor: Event [Authentication with 00:00:00:00:00:00 timed out.]
12-07 14:24:31.936 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=00:00:00:00:00:00]
12-07 14:24:31.936 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
12-07 14:24:31.936 174 272 V WifiStateTracker: Changing supplicant state: DISCONNECTED ==> DISCONNECTED
12-07 14:24:31.936 174 272 V WifiStateTracker: Changing supplicant state: DISCONNECTED ==> SCANNING
12-07 14:24:32.866 174 732 V WifiMonitor: Event [Trying to associate with 00:11:6b:15:9a:4a (SSID='default' freq=2457 MHz)]
12-07 14:24:32.866 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:11:6b:15:9a:4a]
12-07 14:24:32.876 174 272 V WifiStateTracker: Changing supplicant state: SCANNING ==> ASSOCIATING
12-07 14:24:42.846 174 732 V WifiMonitor: Event [Authentication with 00:11:6b:15:9a:4a timed out.]
12-07 14:24:42.856 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=00:11:6b:15:9a:4a]
12-07 14:24:42.876 174 272 V WifiStateTracker: Changing supplicant state: ASSOCIATING ==> DISCONNECTED
12-07 14:24:42.876 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
12-07 14:24:42.876 174 272 V WifiStateTracker: Changing supplicant state: DISCONNECTED ==> SCANNING
12-07 14:24:43.716 174 732 V WifiMonitor: Event [Trying to associate with 00:11:6b:15:9a:4a (SSID='default' freq=2457 MHz)]
12-07 14:24:43.716 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:11:6b:15:9a:4a]
12-07 14:24:43.736 174 272 V WifiStateTracker: Changing supplicant state: SCANNING ==> ASSOCIATING
12-07 14:24:47.886 174 272 D WifiStateTracker: Reset connections and stopping DHCP
12-07 14:24:48.886 174 272 D WifiStateTracker: Disabling interface

So, from what I understand, the Wifi all of a sudden disconnects and then loops in a DHCP reset process not calling for a new ip adress. I tried using a static ip - no luck either. Anyway, when I set my wifi policy to sleep on screen off this changes the wifi state to DORMANT and when I then wake it up, it starts the DHCPhandler and grabs a new ip. Completely turning wifi off in the settings and then switching it back on has the same effect. logcat:

12-07 14:28:59.966 174 272 V WifiStateTracker: Changing supplicant state: ASSOCIATING ==> DISCONNECTED
12-07 14:28:59.966 174 272 D WifiStateTracker: Reset connections and stopping DHCP
12-07 14:29:00.966 174 272 D WifiStateTracker: Disabling interface
12-07 14:29:00.976 174 272 V WifiStateTracker: Changing supplicant state: DISCONNECTED ==> DORMANT
12-07 14:29:00.976 174 272 D WifiStateTracker: Reset connections and stopping DHCP
12-07 14:29:01.976 174 272 D WifiStateTracker: Disabling interface
12-07 14:29:02.296 174 732 V WifiMonitor: Event [CTRL-EVENT-DRIVER-STATE STOPPED]
12-07 14:29:02.306 174 272 V WifiStateTracker: Changing supplicant state: DORMANT ==> DORMANT
12-07 14:31:58.526 174 273 D WifiStateTracker: Reset connections and stopping DHCP
12-07 14:31:59.536 174 273 D WifiStateTracker: Disabling interface
12-07 14:32:00.306 174 732 V WifiMonitor: Event [CTRL-EVENT-DRIVER-STATE STARTED]
12-07 14:32:00.306 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
12-07 14:32:00.306 174 272 V WifiStateTracker: Changing supplicant state: DORMANT ==> SCANNING
12-07 14:32:00.976 174 732 V WifiMonitor: Event [Trying to associate with 00:11:6b:15:9a:4a (SSID='default' freq=2457 MHz)]
12-07 14:32:00.976 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:11:6b:15:9a:4a]
12-07 14:32:00.976 174 272 V WifiStateTracker: Changing supplicant state: SCANNING ==> ASSOCIATING
12-07 14:32:00.986 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=4 BSSID=00:11:6b:15:9a:4a]
12-07 14:32:00.996 174 732 V WifiMonitor: Event [Associated with 00:11:6b:15:9a:4a]
12-07 14:32:00.996 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00]
12-07 14:32:00.996 174 272 V WifiStateTracker: Changing supplicant state: ASSOCIATING ==> ASSOCIATED
12-07 14:32:00.996 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00]
12-07 14:32:01.006 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00]
12-07 14:32:01.006 174 732 V WifiMonitor: Event [WPA: Key negotiation completed with 00:11:6b:15:9a:4a [PTK=CCMP GTK=CCMP]]
12-07 14:32:01.006 174 732 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=00:00:00:00:00:00]
12-07 14:32:01.006 174 732 V WifiMonitor: Event [CTRL-EVENT-CONNECTED - Connection to 00:11:6b:15:9a:4a completed (reauth) [id=0 id_str=]]
12-07 14:32:01.006 174 272 V WifiStateTracker: Changing supplicant state: ASSOCIATED ==> FOUR_WAY_HANDSHAKE
12-07 14:32:01.006 174 272 V WifiStateTracker: Changing supplicant state: FOUR_WAY_HANDSHAKE ==> FOUR_WAY_HANDSHAKE
12-07 14:32:01.006 174 272 V WifiStateTracker: Changing supplicant state: FOUR_WAY_HANDSHAKE ==> GROUP_HANDSHAKE
12-07 14:32:01.006 174 272 V WifiStateTracker: Changing supplicant state: GROUP_HANDSHAKE ==> COMPLETED
12-07 14:32:01.006 174 272 V WifiStateTracker: New network state is CONNECTED
12-07 14:32:01.026 174 734 D WifiStateTracker: DhcpHandler: DHCP request started
12-07 14:32:06.026 174 734 V WifiStateTracker: DhcpHandler: DHCP request succeeded
12-07 14:32:06.036 174 272 V WifiStateTracker: IP configuration: ipaddr 192.168.178.42 gateway 192.168.178.1 netmask 255.255.255.0 dns1 192.168.178.1 dns2 0.0.0.0 DHCP server 192.168.178.1 lease 864000 seconds
12-07 14:32:06.036 174 272 V NetworkStateTracker: Setting TCP values: [4095,87380,110208,4096,16384,110208] which comes from [net.tcp.buffersize.wifi]

I searched the interwebs myself for quite a while and came across pretty similar posts, but none of the threads contained a solution to the problem.

So, as I'm not even close to being a linux/android dev myself I kindly ask you geniuses to lent me a hand on this one, because I really started to love the clean look and amazing speed of AOSP ROMs. :-)

Thanks in advance!

d0msen

Different behaviors on different ROMs:

CM 6, DeFrost: Connection dropping after a couple of seconds/minutes, regardless of the screen being on or off

CM 6 nightly with Vorkkernel: same as Oxygen, looks like it might be kernel related

CM 6 nightly 216 with 2.6.35.9-cyanogenmod ctso@core #10 kernel, no drops so far!

Oxygen: Connection drops after some minutes, regardless of the screen being on or off, comes back to life when DORMANT state is reached in between connection attempts, though

MUIU, Ultimate Droid: Connection stays on pretty long, can even take more than in hour till it drops, DORMANT gets it back on, WIFI is never dropping whilst the screen is on.

Sense ROMs: no reported issue till date