[Galaxy Note II Android Development] ant1fr:
Nontrivial Wifi Problem

First of all, it's defintely a wonderful ROM, fast and reliable even if based on most recent leaks and mixing Note2/Note2/S5 features.

The only issue I face on this ROM appeared on a previous ROM I used (ResurrectionRemix) and have been there since on any ROM I flash even after a full wipe.

My issue

My device WiFi is turning ON normally without any problem but when I try to connect to WiFi hotstop (Open, WEP, WPA...), it tries to connect then switch to "Saved, secured". Oddly, that happens only with 2.4Ghz WiFi hotspot as I can connect to (the rare) 5Ghz WiFi hotspots I came across.

According to the logcat the device fails to authenticate with the WiFi hotspot :

04-02 22:29:38.713: I/wpa_supplicant(2814): CTRL-EVENT-SSID-REENABLED id=0 ssid="4641425966726565"
04-02 22:29:42.159: I/wpa_supplicant(2814): Trying to associate with 9A.91.34 (SSID='4641425966726565' freq=2462 MHz)
04-02 22:29:42.159: I/wpa_supplicant(2814): CTRL-EVENT-STATE-CHANGE id=-1 state=5 BSSID=00.00.00 SSID=
04-02 22:29:42.784: I/wpa_supplicant(2814): CTRL-EVENT-ASSOC-REJECT bssid=9A.91.34 status_code=1
04-02 22:29:46.994: I/wpa_supplicant(2814): CTRL-EVENT-DISCONNECTED bssid=9A.91.34 reason=3 locally_generated=1
04-02 22:29:46.994: I/wpa_supplicant(2814): CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="4641425966726565" auth_failures=1 duration=10
04-02 22:29:46.994: I/wpa_supplicant(2814): CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=00.00.00 SSID=4641425966726565
04-02 22:29:47.004: I/wpa_supplicant(2814): CTRL-EVENT-SSID-REENABLED id=2 ssid="746957696669"
04-02 22:29:47.004: I/wpa_supplicant(2814): Trying to associate with 00.FD.6C (SSID='746957696669' freq=2412 MHz)
04-02 22:29:47.004: I/wpa_supplicant(2814): CTRL-EVENT-STATE-CHANGE id=2 state=5 BSSID=00.00.00 SSID=746957696669
04-02 22:29:47.584: I/wpa_supplicant(2814): CTRL-EVENT-ASSOC-REJECT bssid=00.FD.6C status_code=1
04-02 22:29:57.039: I/wpa_supplicant(2814): CTRL-EVENT-DISCONNECTED bssid=00.FD.6C reason=3 locally_generated=1
04-02 22:29:57.039: I/wpa_supplicant(2814): CTRL-EVENT-SSID-TEMP-DISABLED id=2 ssid="746957696669" auth_failures=1 duration=10
04-02 22:29:57.039: I/wpa_supplicant(2814): CTRL-EVENT-STATE-CHANGE id=2 state=0 BSSID=00.00.00 SSID=746957696669

What I did

First I checked my bootloader version and it was MJ5. But I follow Dr.ketan's howto to downgrade and flash the WiFi fix to be sure. It seemed to work... a couple of minutes but failed again so I came back to MJ5.

Then, I thought that I might have missed an important pre-MJ5 update from Samsung like a WiFi firmware update... As I switched from stock ROM to custom ROM (AOSP-based) before MJ5 release, I could be possible. So I downgraded to 4.1.2 (last version I used). Obviously the ROM wasn't working very well (IMEI no recognized as the EFS was refactored in the meantime. But I patiently flashed all the subsequent ROM (XEF) from Sammobile to 4.3.

No effect :(

So I browsed the web and discovered that I am not the only impacted by this bug. Actually, it seems to exist on a variety of devices from Nexus to S3 and Note2.

I didn't find any common cause between all the cases I found and some are impacted on 4.1.2, 4.2, 4.3 and 4.4.

It might be related to the upgrade I did without wipe from ResurrectionRemix 5.0.1 (4.4.2) to 5.0.3 (4.4.2-r2) but I'm not too sure.

What's obvious is it's not a trivial problem that can't be fix by a simple wipe and I am unable to follow its root cause's path.

Some are proposing to copy/paste N7100 4.1.1 Wifi folder (/data/misc/wifi), some are proposing to flash a fix directly to /system/etc/wifi/... But the reality is... none seems to know what to do except from send back to device to Samsung if the warranty is still active.

So the question is : is anyone else here has the same problem ? Is anyone here can help me sort it out and fix it ?

Thanks :)