yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] bganley:
With Prima it appears that all broadcast/multicast packets are filtered when told to (including ARP) which is why you noticed a failure of ARP during sleep. I agree that any decent WiFi chipset has ARP offload support and as you found out later in your post, so does the Prima - and it is very broken. Google has also acknowledged this fact.

On your battery comments, yes this does have a negative impact on battery. This has been discussed throughout this thread. Surprisingly the battery impact is less than I would have expected at first, but yes it is there. Of course filtering the traffic will help battery life as it did with your BCM devices. This is probably why Qualcomm has filtering enabled by default. The problem is ARP offload + filtering == borked wifi. As for multicast - I agree there isn't much of a use case for this but for weirdo's like me that run IPv6, I need multicast to support ND.

This thread isn't meant to be a "baseball bat" fix as you stated. It is simply here to provide a workaround so that people having this problem are able to get full functionality from their phone while waiting for Goog/Qualcomm to get a proper driver released. And after seeing the fix not make it into 4.2.2, who knows how much longer this will take.

Also, not everyone will experience this issue with the same severity. Different ARP cache configurations on different routers is the main culprit for this.

I know this thread has started to get longish but all of this has been discussed. I plan on re-writing the first post sometime soon to clarify everything that has been discussed/discovered over the last couple of months. Hopefully that will help.
[Nexus 4 General] zevim2005:
Have the same question...this is the most annoying problem on nexus 4 and i already tested almost every custom rom and kernel and sadly this bug is everywhere.
[Nexus 4 General] csunny95:
I have flashed the zip, but the delay problem still presence
[Nexus 4 General] Sddddd:
another Here::crying:
[Nexus 4 General] thesebastian:
Is this related to Nexus 4 "WiFi driver"?

https://www.codeaurora.org/gitweb/external/wlan/?p=prima.git;a=shortlog

I'm seeing recently changes, but i don't know if it's for a totally different device. (I saw this folder on nexus 4: /vendor/firmware/wlan/prima/ )

I also saw that they now use McastBcastFilter=0 like in the OP.

What about this one? (26-FEB-2013)

https://www.codeaurora.org/gitweb/e...it;h=b8ddf46808da1267b35086b478884bed27360e5c
[Nexus 4 General] bganley:
Good find! I had checked that site when 4.2.2 came out and was really disappointed when I didn't see any mention of ARP offload fixes. Looks like they are finally working on it (and quite a bit of other tweaks). Hopefully a new driver will get pushed out in the near future to fix this and a lot of other wifi bugs.

I just looked real quick so I may be missing something but I'm not sure why they have mcastbcastfilter disabled if ARP offload is enabled in the new code....
[Nexus 4 General] thesebastian:
Nice!!

It seems that we can also download these new drivers. But i have no idea how to install them...(for instance: WCNSS_cfg.dat ). There are a lot of folders with those files in the N4. (Probably a lot of them are symlinked or whatever; but they have different permissions).

To check this, i downloaded and extracted: wlan: cs release 3.2.0.70.
[Nexus 4 General] TaintedByte:
I am rewriting this post for clarity and because what I wrote previously is incorrect.

The specific file linked before is a firmware that is located in /etc/wifi/ in our device, however simply swapping the files will not work and is not recommended.

Good news is that this does look like the problem we're having is being worked on. As a matter of fact if the change log is accurate the fix is implemented already we just have to wait for the update.

Even better news is that someone might be able to make this available sooner if all the source code is available.

EDIT: This is the code change that allegedly fixes the ARP offload issue we are having, for anyone curious: https://www.codeaurora.org/gitweb/e...ff;h=b8ddf46808da1267b35086b478884bed27360e5c
[Nexus 4 General] thesebastian:
Good! Well let's just have some faith in this.
[Nexus 4 General] OrrPenn18:
Thank God, I hope the next update 4.2.3 possibly? Or the next major overhaul KLP fixes it!

It is too annoying. Ugh.
[Nexus 4 General] meangreenie:
Hopefully they just push through a WiFi fix soonish.
[Nexus 4 General] MonztA2:
fyi: I am on Eos 4.0 since yesterday (on stock before that) and the issue has not appeared yet for me.
[Nexus 4 General] harlock:
I noticed the exact same behaviour when using mobile data, maybe there is an equivalent file for the HSDPA counterpart?

Does anyone know?

Does anyone have this issue when on mobile data?

Thanks
[Nexus 4 General] thesebastian:
I think that is another issue.

On WiFi you almost always lose connection within 1-6 minutes.

On HSDPA (in my tests) you lose connection after 15-20 minutes of screen off. And I think its a different bug.

For instance: It could also be a carrier problem (lost signal) mixed with N4 without trying to reconnect to 3G network.

Maybe this (another) issue with 3G could be fixed with "Push Notification Fixer" app...(just a theory...).
[Nexus 4 General] harlock:
Yes I agree... but for example when I download something ( on mobile data ) and then I turn off the phone, I expect it ll finish downloading at some point. Instead when I turn the screen back on I find it s stuck!! That pisses me off so much....

It is for sure a different problem but the effect is the same so there might be some similar settings... or maybe we just need to wait for the big G to deploy another update...

Thanks a lot
[Nexus 4 General] thesebastian:
It seems Qualcomm devs just fixed the BT + WiFi problem:
[Nexus 4 General] TaintedByte:
I am excited that they are fixing almost all of the wireless issues everyone has been having. I'm just hopeful that we get a release pushed soon. Even if it's a side loaded zip to shut us up, because really most laymen won't be noticing this issue. It's mostly us geeky folk.
[Nexus 4 General] Inpain:
Word.. us geeky folks :D I'm sick n tired of this issue myself :crying:
[Nexus 4 General] meangreenie:
Have a bad feeling we're getting our hopes up too much.
[Nexus 4 General] undercover:
Subscribing...
[Nexus 4 General] andy o:
I didn't say anything about the new AOSP release of the drivers cause I thought they were the same that we already had in CM 10.1 and most if not all other roms, but Paranoid Android just posted a notice that implies that the drivers are new (they're urging their users to update bootloader and radio cause of this). Anyone compared the new drivers?
[Nexus 4 General] thesebastian:
But the question is...

Are those JD39Q's drivers? Or newer drivers not in Stock Google JD39Q?
[Nexus 4 General] Morganator:
I just wanted to clarify if I'm having the same issues as others..

I can connect to home wifi (D-Link 2780) but don't get a stable connection, random drops, and internet speeds are terribly slow. Mobile works well with other routers.

Others describing similar issues to mine at: https://code.google.com/p/android/issues/detail?id=40065

So are you all experience something like me? Or has the Nexus 4 just got a whole variety of wifi problems?!
[Nexus 4 General] clubtech:
That's indeed a good question. Anyone knows?
[Nexus 4 General] andy o:
I got a problem with the N7 and WPA2, which for some reason seems to be common with Netgear routers, but these are different issues than the specific one described in this thread. With the N4 I don't get disconnects, I do get the notifications, only delayed, and the phone cannot get pinged with the screen off. It also disappears from the connected devices list on my router's (WNR3500) config page when the screen is off and reappears when on.
[Nexus 4 General] SpookyTunes:
The Advanced WiFi setting;

Keep WiFi on during sleep = always

Does seem to work temporarily if I change it to something else, then back to always, but reverts back if I turn WiFi off and back on.
[Nexus 4 General] skyrocket727:
I'm having the same problem. Once i connect n4 to home wi-fi it ruins everyone's wifi connection. Decided not to use n4's wifi on my home network until its fixed.
[Nexus 4 General] andy o:
It doesn't seem to be the same problem.
[Nexus 4 General] Nexonian:
No problem here when the phone is awake. Only when the screen is off, the connections drops after a short time. When I press the power button, it reconnects almost instantly and I receive all my delayed push notifications. But this is just my experience with my access points, maybe there are more problems / incompatibilities with other routers.
[Nexus 4 General] thesebastian:
I think this is the most aligned problem to this topic.
[Nexus 4 General] pro.aggro:
I've got the same problem.

I'm using the newest ParanoidAndroid build (4.2.2), JDQ39 radio & bootloader.
[Nexus 4 General] Stryder5:
Did you flash the fix or manually change the files yet?
[Nexus 4 General] pro.aggro:
Yes.

I tried both and set the line to 0 and 1 but this fixes nothing.
[Nexus 4 General] Stryder5:
Set it to 0, check permissions, then reboot.
[Nexus 4 General] pro.aggro:
This is what i did.
[Nexus 4 General] akiv:
Could this cause the suspend_backoff wakelock?
[Nexus 4 General] darkamikaze:
I still can't believe this isn't a big issue for everyone that it does up on tech sites :/

Sent from my Nexus 4
[Nexus 4 General] thesebastian:
Because I think there are some routers that doesn't have this issue.
[Nexus 4 General] elandune:
Are there any news about any rom that is working to implement those news qualcomm drivers for wifi?

Enviado desde mi Nexus 4 usando Tapatalk 2
[Nexus 4 General] ergalle2:
ariesau and

I want to know the same thing.
[Nexus 4 General] bganley:
Just a heads up. I updated the first post to hopefully help clear up some of the confusion here.
[Nexus 4 General] Unblackrussian:
Ho!! Private ip ?

:D

Enviado desde mi Nexus 4
[Nexus 4 General] JanusDC:
I am trying to understand in what scenario not responding to ARP requests would be a problem.

In general the routers have a table IP/MAC, at least if the router assigned such an IP (using DHCP for example). In that case, the router should never send an ARP request, because it know it already. Am I right?

So the only scenario where no replying to broadcast traffic could be a problem is when the router is stupid enough to forget to which MAC it assigned each IP. (Or if it has been statically assigned).

Am I missing something?
[Nexus 4 General] thracemerin:
Looks like Franco has the fix in r97, I've also added it to my hsic fix kernel.
[Nexus 4 General] elandune:
lets wait people can confirm it works :)

Enviado desde mi Nexus 4 usando Tapatalk 2
[Nexus 4 General] harlock:
I just installed r97, will be testing and report back
[Nexus 4 General] darkamikaze:
Doesn't work for me. same thing. Turned screen off. pinged after 10 sec. Host unreachable. turn screen on. pings come in.

AirDroid is super slow at responding to events as well.
[Nexus 4 General] andy o:
Yeah, doesn't work here either. On CM 10.1 3/2 nightly.
[Nexus 4 General] Godaemon:
Works great for me guys...

Via NeXuS 4 / xda-developers app
[Nexus 4 General] andy o:
Dumb question, you wouldn't happen to have your phone plugged in?
[Nexus 4 General] Godaemon:
Nope its unplugged before this fix for example I could not run tuneinradio while screen off.After 3 minutes of screen off there was no streaming.Now it works and so does viber for example.

Via NeXuS 4 / xda-developers app
[Nexus 4 General] andy o:
I wonder if your problem wasn't something else though, cause my connection itself never broke, I could stream just OK. And notifications did arrive, only delayed by up to tens of seconds. Are you getting instant Viber notifications (about at most 1 second)?

I'm gonna be testing more tomorrow with a couple other routers.
[Nexus 4 General] Toss3:
Wifi still flaky here, even after flashing Franco's r97 kernel. Speeds vary between 45KB/s and 11MB/s, and the Nexus 4 consistently drops the connection to my router (my sgs3 had no such problems on the same network, even on 4.2.1/4.2.2!). *sigh* Thank god the SGS4 is coming out soon, because I cannot live with a phone that cannot even keep a stable wifi connection.
[Nexus 4 General] harlock:
Did you try another router? Here I m all right with Franco R97 and the .ini fix...
[Nexus 4 General] Toss3:
Nope as I'm using an Asus RT-N66U that I just got(pretty expensive for a router). None of my other devices are experiencing any problems, so I'm not sure why the Nexus 4 would have any issues. The SGS3 and iPhone 5 are both working perfectly fine(both connected at a link speed of 150mbps, while the nexus 4 jumps between 6-72mbps).

Tried editing the .ini file(not just the bcastandmcast filter) to no avail.

EDIT: Getting 80kB/s right now on my Nexus 4. 11mB/s on the iPhone 5.

EDIT2: Could it be a ROM-issue? Are you using an AOSP rom or CM, as I'm currently using the latter?
[Nexus 4 General] harlock:
Hi,

I am currently using the original stock ROM with Franco Kernel R97, if you read in the OP it s mentioned that the N4 CAN have problems with some routers...But I do understand you when you say that the other devices are working well.

The N4 should work well but it doesnt thanks for big G which probabily has put it on the market too soon...

EDIT1 I dont think it is ROM related, it looks like it s got to do with the WiFi drivers ( in the kernel ) . Probabily we need to wait some time before they ( the big G ) will fix this... at this point I doubt they will push an OTA for this, given the fact that in May rumors say it ll be announced Key Lime Pie. Hopefully they ll merge the fixes in there....

but this is only my opinion...

There is one thing that is pissing me off more than this.... When I am downloading something on WiFi, and the screen turns off, when I turn it back on I always get download unsuccessful,,,, Like the WiFi connection would drop completely... I made some research and I am not the only one, There is a google support ticket where thay say that this is a feature!!! Nice feature.... every time I have to download something I MUST keep the screen on ( Phone awake completely ) to succeed downloading....

How s that possible that this is a feature ???? My wife has the GNex and this doesnt happen!

From https://code.google.com/p/android/i...c=ID Type Status Owner Summary Stars&id=40065

Well done Google! ( that was sarcastic of course )
[Nexus 4 General] Toss3:
Managed to get a link speed of 150 mbps! :good: Had to change the gChannelBondingMode5GHz from 0 to 1! Also disabled automatic TX power Control and set the TX limit to 150(from 30).

EDIT: Getting 11mB/s on my Nexus 4!
[Nexus 4 General] TaintedByte:
It DOES work. However, because it's a kernel it doesn't implement the fix on the firmware settings side of things (the file we edited for this fix).

You STILL have to do the fix on the OP. Actually more specifically, you have to do the following fix (use the 'green' settings): https://www.codeaurora.org/gitweb/external/wlan/?p=prima.git;a=blobdiff;f=firmware_bin/WCNSS_qcom_cfg.ini;h=73ce6cf06f2a84da96d0ccb6fba0db1c7841b2f2;hp=df4b739b18a797c30fa3471215123d8b93afc584;hb=c0ed3819ab067034ba7a920aadd470fe9db5b1e8;hpb=2214143009d76d137b5d37aead4d829e38c5c57c

What's the point of even flashing Franco's kernel you say? Well as he stated himself, his kernel implements the way those settings are handled, meaning that the battery wont have as much of an impact as it currently does.

Because it's only a kernel, we still have to manually do the fix, however once the issue gets officially pushed by Google and ROMs start being based off of that update, we won't have to change anything. The ROM side will take care of the firmware settings and then the actual kernel will have the implemented fix that franco already pushed to his kernel.

Glad to see we actually have a fix though! :victory:

TL;DR Update to the kernels that implemented the fix, do what the OP says in this thread, you'll get a fix with less battery footprint.
[Nexus 4 General] rycus86:
Does someone know why is my device appears twice in the router's device list:

br0	49:3F:68:10:73:5A
eth1	10:68:3F:49:5A:73

(Weird is that the bytes are the same just in another order)

Thanks!

(Also I updated the ini file and flashed the updated kernel but somehow still getting delayed notifications)
[Nexus 4 General] Toss3:
Delayed notifications here as well. At least I got the link speed to work correctly(150mbps). Added the lines that were missing in my INI file, but that did nothing.
[Nexus 4 General] Lownita:
gEnableActiveModeOffload there is no such entry. Should we just add it, or forget it?
[Nexus 4 General] ol@fson:
same setup, same issue .. cm10.1 official nightly 20130302 with franco.kernel r97, setting McastBcastFilter=0 in WCNSS_qcom_cfg.ini applied, no change. Device is not reachable with ping after some time screen off.
[Nexus 4 General] pro.aggro:
http://xdaforums.com/showpost.php?p=38776035&postcount=17528
[Nexus 4 General] chrisgtl:
Also don't have the 3rd green setting.
[Nexus 4 General] harlock:
regarding gEnableActiveModeOffload

I checked in the source code of franciscofranco and that flag is not handled.

So if you add it or not it doesnt make any difference.

If you use a different kernel, you need to check which version of WiFi driver you are using...

the latest can handle this flag.

see here https://www.codeaurora.org/gitweb/e...;hpb=2214143009d76d137b5d37aead4d829e38c5c57c
[Nexus 4 General] meangreenie:
Do you know of a kernel that handles this flag?
[Nexus 4 General] harlock:
It looks like it s a part of another WiFi patch from code aurora and it is not involved in this issue:

see http://xdaforums.com/showthread.php?t=2002782&page=1756

page 1756
[Nexus 4 General] mitch44:
Tried the fix, but phone is still not reachable in standby :rolleyes:

Franco r97 also could not fix this issue.
[Nexus 4 General] GabrielSousa:
the solution that work for me is

on /system/etc/wifi/WCNSS_qcom_cfg.ini

set "gEnableBmps=0"

disable the BMPS "Beacon Mode Power Save"

with this have good wifi speeds
[Nexus 4 General] thesebastian:
This is not about WiFi speed.

Its about WiFi not working ASAP.... after phone enters deep sleep.
[Nexus 4 General] andy o:
Still not working with the changes. I wonder if it's time to check which ROM's we're all using. I'm on the latest CM 10.2 3/5 nightly. Would it be possible that they're not using the same driver that is compatible with these changes? Still need to try other routers though, will do in a couple of hours.
[Nexus 4 General] Lownita:
So franco would have to add another wifi driver for it to work?
[Nexus 4 General] thesebastian:
But he said he will wait for Google to approve this patch.

BTW...Qualcomm is changing this everyday. Its still in beta.
[Nexus 4 General] JoshinPl:
This issue exist on ubunt os too, i've flashed it yesterday and I couldn't download anything with wifi connetion (but I was connected to my router)

Enviado desde mi Nexus 4 usando Tapatalk 2
[Nexus 4 General] jonnyb16:
Running op's fix, Franco r97, and latest paranoid android and still having WiFi issues. Routinely losing Wi-Fi signal, also still having to turn Wi-Fi on/off average 5-7 times before it see's my network.
[Nexus 4 General] edenist:
No, it is very much the same...... This also occurs when I have SSH'd into my phone [using SSHDroid server], and with AirDroid.

If the screen goes off, the phone is dead to the network.

The ini modification allows it to respond to ICMP packets, but otherwise no TCP packers will leave the phone when the screen is off, period, thus it proves no useful solution.
[Nexus 4 General] Stryder5:
This thread isn't about wifi signal, but rather the connectivity. The issue this thread relates to is connected to wifi, but no actual network activity when the screen is off.
[Nexus 4 General] TaintedByte:
EDIT: Well this is embarrassing... Ignore this post. I'm so not used to wireless charging yet that I completely forgot the phone was charging (and thus not entering deep sleep) that it made my entire test inaccurate.
[Nexus 4 General] darkamikaze:
works a lot better in what sense? AirDroid is fluid even after 10min with no lag opening options within it?
[Nexus 4 General] TaintedByte:
Well this is embarrassing... Ignore my last post. I'm so not used to wireless charging yet that I completely forgot the phone was charging (and thus not entering deep sleep) that it made my entire test inaccurate.
[Nexus 4 General] harlock:
I m sorry to diappoint you but changing the ini file and the _nv.bin file is not enough to actually change the driver if you looh here:

You will understand that the bin file IS not the FW itself but only a placeholder for the driver settings.

What you did, is you changed the ini file and that solved your problem, if you want to change the driver you must recompile the kernel.

If you dont believe me, look in your last_kmsg file, in there it says the wlan driver version.

The lastone from code aurora is 3.2.0.75a

which wont be the one you ll find in your kmgs file.

Let s try not to make more confusion on this WiFi problem.
[Nexus 4 General] TaintedByte:
Firmware =/= driver.

The driver is in the kernel, I never argued that. I don't think I even used the word driver :eek:

That is why I initially thought that by pushing the firmware it would help the driver that franco pushed to his kernel. Must be that the issue probably wasn't fixed by qualcomm then :(

EDIT: I already edited my post out before you posted your reply. Please edit my post out of your quote to not cause more confusion as my test was, after all, inaccurate due to me being an idiot and not noticing my phone was actually not being in deep sleep because of wireless charging xD
[Nexus 4 General] elandune:
I tested yesterday the new franco and angela v8 but had to came back to 4.2.1

still had problem to recieve notifications :(
[Nexus 4 General] Inpain:
lol so this issue is still going on :(
[Nexus 4 General] Godaemon:
Guys with the latest Kernel From Franco and after changing the values at the INI file works fine for me without battery drain...

Via NeXuS 4 / xda-developers app
[Nexus 4 General] postm:
Yesterday I encountered an issue with N4 unable to connect to a Wifi. I was at a customer, trying to login to guest wifi.

When I entered the password, the AP would disappear and went to "Not in reach" status. It would be available agaib only after a forgot the network and re-scanned manually.

When visible, it would have really low wifi strength.

I had access to a iphone and ipad and samsung Note at the time, all at the same spot. All had strong wifi and no problems connecting.

Unfortunately, I was unable to find out any more details (wifi model, channel...).

I'm on 4.2.2, PA 3.1, no kernel mods.
[Nexus 4 General] OrrPenn18:
You should read the first post. It is NOT the thread for loose wifi connections.
[Nexus 4 General] jsylvia007:
Just curious, what Rom are you on and what Franco Kernel are you using? Also, from what I can see, there is only one value to change in the ini file. Did you change more than that one?
[Nexus 4 General] muyoso:
I have been having a hell of a time with VOIP calls for the last couple days after upgrading to the latest PA and updating the radio and bootloader. What exactly do I need to do to get back to 4.2.1 and get it working again? I assume its the radio update that "fixed" whatever was "broken" in 4.2.1 that kept the ARP offload issue from being an actual issue, so do I just need to flash the old radio and bootloader and then flash a compatible 4.2.1 version of PA? I should seriously learn not to upgrade things all at once. Flashed a new ROM, radio, bootloader and kernel as well as switched from Sipdroid to CSipSimple all within 10 minutes, so trying to track down WTF was causing me to miss all incoming calls when the screen was off was driving me insane. . . .
[Nexus 4 General] Stryder5:
Try Faux's kernel yet? I think he incorporated the ARP update that may have fixed this issue.