Help with my wlan_rx_awake issue N7 4.2.2 - Samsung Galaxy Nexus

I've been trying to narrow down the battery leech on my Nexus 7. Something is keeping it from going into deep sleep; it will spend more than 80% of its time in wlan_rx_awake and 20% in deep sleep and a few others (with screen off and otherwise idle). For example I just rebooted about 2 hours ago and while PowerManagerService is currently the #1 offender since I've actually been using the tablet, for just wlan_rx_wake I've got 32 minutes and a count of 2204. Last night I saw the count at over 8000 and the majority of the time.
I've blown away the obvious suspects - apps that might be waking my device up like facebook or garbage like that. I've done a lot of googling and UTFSE, and have been monitoring BetterBatterySaver, Network Log, and CPU SPY. There are no single processes or appps that seems responsible on the N7 - I'm thinking it's some sort of wireless broadcasts from my d-link 655. Network log shows a lot of UDP packets from 192.168.0.184 to 255.255.255.255, with source ports either 32805 or 32806 and dest port 1234 or 53274. Some research shows 1234 is VLC USP stream and 53274 TCP is "Xsan. Xsan Filesystem Access" from Apple - but I don't find anything about UDP 52374 192.168.0.184 is my Seagate Goflex Home, my network attached storage device - which is also a media server. I don't use the media server component but it apparently can't be disabled (though I've thought of logging into the goflex via the secret ssh interface and killing the minidlna server for troubleshooting purposes[it's running an embedded linux].) I've already disabled UPnP on it and that didn't change anything. I've also gone to the 2 Windows 7 machines that share the wifi and disabled the IP Helper service; something I read somewhere suggesteted that. It also suggested disabling Shell Hardware Detection, but disabling that service disable Windows Image Acquisition, rendering my wifi-attached HP 3050 scanner inoperable. So I had to leave those running. I'm not seeing a lot of packets from that printer so I don't think that's it - I really am suspecting the Goflex Home.
I wish I could output from Network Log. The Goflex home traffic is broadcast in bursts of about ten packets with anywhere from 1 minute to 45 minutes between. That's why this is my suspect but it could be a red herring. Can anyone offer me suggestions on how to proceed? Is there perhaps a sysctl command I can use to tell the device to go into deep sleep quicker? I suppose I could just have wifi turn off when the screen does but I'd rather not, I like the benefit of having everything sync'd and up to date. For now I've installed DS Battery Saver which just intermittently turns on Wifi. Hasn't been long enough to know if that helps.
Thanks for any help!
tl;dr wlan_rx_wake is keeping my device from deep sleep, leeching battery, and I suspect it's my Goflex Home's network broadcasts but I'm not sure.
Edit: Attached BetterBatteryStats output log

Did you try shutting the NAS down for some time, to really see if that's the culprit ?
Also one idea I've seen is disabling IPv6 on Windows clients in Adapter settings, which connect to the network, but this probably isn't the main case here.
Regarding output from Network log, you can enable monitoring in the app, so the log gets recorded to the storage. You can even filter the output before recording, so it's not crowded.

madd0g said:
Did you try shutting the NAS down for some time, to really see if that's the culprit ?
Also one idea I've seen is disabling IPv6 on Windows clients in Adapter settings, which connect to the network, but this probably isn't the main case here.
Regarding output from Network log, you can enable monitoring in the app, so the log gets recorded to the storage. You can even filter the output before recording, so it's not crowded.
Click to expand...
Click to collapse
I've got it logging, and filtered right now for just the Goflex IP.
I have rebooted the goflex, but not shut down for a period of time. Since it's only a weekly backup server that's not a bad idea.
I have made some progress. I got root on it and killed the minidnla service as well as the mt-daapd service (the latter provided Itunes [and possibly Bonjour] service I learned). Even with those killed I'm getting the same spurious UDP broadcasts with the same UDP ports. Using netstat on the goflex I found that a service called "locator-server" was opening connections to one of the aforementioned remote ports (didn't note which). I can find very little info on this service in google though. The goflex's core is an Axentra so I'd think more info would be available but not that I could find. Here's what's in the startup script for that service:
# locator: UDP broadcast of HipServ's presence
# description: broadcasts UDP messages to announce presence
I *think* that locator broadcast is just for this garbage Seagate dashboard program which is not necessary for the function of the NAS and is not installed. But I'm not sure. I suppose I need to shut it down and see if I lose functionality.
I guess I before I spend more hours on this I need to answer a basic question: does a series of wireless UDP packets to 255.255.255.255 even keep the N7 in wlan_rx_wake state?
Whatever's doing it is hitting it hard, of 2 hours uptime BetterBattery shows 45 minutes wlan_rx_awake right now with 2nd place going to just 2 minutes of PowerManagerService.
Edit: well I killed locator and not 2 minutes later got another burst of traffic from it, to UDP ports 1234, 53274, from 32775 and 32776. I even did "netstat -cap|grep -e 1234 -e 32775 -e 32776" but got no output. Time to shut it off.
Edit: No longer getting the spurious broadcast packets, but the wlan_rx_awake number continues to grow. All apps look normal - google play, mail, currents.

Hm, maybe try shutting down all devices in your network except the phone and router. That's the easiest route to troubleshooting with so many parameters - exclusion.
If this doesn't help, then you might want to borrow another router and after that it must be the phone configuration. But you'll know where to focus on.
A quick google for udp broadcasting to 255.255.255.255 says it might be the Apples Bonjour service. I presume you have some Apple software on the clients, so you might want to check that out. Try my suggestion above to see if it clears up when only the phone is present on the network and you'll know it's the other clients for sure.

Well I did a sort of test like that today - I took it to work. No issues at all with it going into deep sleep or wlan_rx_wake increasing dramatically. My battery lasted all day even with quite a bit of use.
Using Network Log I can easily see which systems are sending out the 255.255.255.255 packets, next step is to narrow it down as to what IP corresponds to what device. I can't shut all devices down, I have roommates.

With the Goflex NAS shutdown, my network broadcasts have dropped dramatically. At work I can use it off and on all day and still have 80% battery with 5 hours deep sleep. I get home and the battery starts to drop faster, and the wlan_rx_wake counter starts rapidly going up. But Network Log shows only normal things like checking email, no suspicious packets. I don't get it - why is it that at home the wlan_rx_wake counter just goes nuts and my battery shoots downwards -- it's now at 64%, down from 80% when I got home four hours ago, and I haven't even touched it.

Then it's the clients or router, if thats also whats left in the network ;] As i said try to troubleshoot those, talk to roomates to shut them down for couple hours or something.. Maybe its just one particular client, with some kind of broadcasting **** which is waking your device.
Sent from my Galaxy Nexus using Tapatalk 2

Do you happen to know does any packet sent to the broadcast address wake an N7 up from deep sleep?
Also shouldn't they be showing in Network Log? It's like wireshark so it should be showing any packets I receive.

You can also go through some tips in here : http://forum.xda-developers.com/showthread.php?t=2133176
The NetBios part was happening in my home network and I saw those in Network Log app.

Thanks, those are good tips I hadn't stumbled across that thread. I don't think I can disable netbios (I'd have to google how to do that anyway); I do my backups and file storage to a Goflex NAS via Windows networking and my wife I and I share some files between our Windows 7 machines. I also can't turn off Shell Hardware Helper service, as it seems to be needed for my network scanner. I did turn off the other services already "IP Helper" and "Windows Media Sharing Service" with no change. I've already got all systems that I have control over getting a static IP from the DHCP server, though I realize that's not the same as setting a static IP. But if I set a static IP I'll have to disable it when I get to work and re-enable when I get home. If I just spent my time on one network that'd work. Actually though for testing I could do a static I suppose. It's not possible in 4.2.2 to set a static IP on one SSID and DHCP on another is it?
Network Log is really not showing much NetBIOS activity anyway - seems like dhcp requests are the most common broadcasts I'm seeing.
Biggest revelation from that thread was that Network Log doesn't capture all packets! - I'd need to put Shark for Android on my N7 then transfer the file to my desktop and use Wireshark to look through it. Ugh, time consuming but I may have to do. Another thing I can try is disable IPv6 on my N7 but it looks like I need to install Android Firewall to get to that setting, it's not accessible otherwise.
Edit: Changed my DHCP leases from 24 hours to 7 days. I found these interesting checkboxes in my router config page though (Belkin d-655):
Enable DHCP Server: X
DHCP IP Address Range: 192.etc to 192.etc
DHCP Lease Time: 25200 (minutes)
Always broadcast: X (compatibility for some DHCP Clients)
NetBIOS announcement: X
Learn NetBIOS from WAN:
NetBIOS Scope: (optional)
NetBIOS node type :
Broadcast only (use when no WINS servers configured) X
Point-to-Point (no broadcast)
Mixed-mode (Broadcast then Point-to-Point)
Hybrid (Point-to-Point then Broadcast)
Primary WINS IP Address: 0.0.0.0
Secondary WINS IP Address: 0.0.0.0
I wonder what would happen if I turned off those two broadcast options....
I tried changing to hybrid mode, then making 192.168.0.1 (my router) as the first address. All sorts of things went awry then. I could get to the internet despite the Network and Sharing Center showing an X. Also when I tried to browse my network, it said File and Printer Sharing service is turned off, do you want to turn on? I'd hit yes and a second later would do again. I went into the Windows 7 settings and everything regarding sharing had been changed to no. So I turned them back on (I also share a printer from this computers) And I reverted back to broadcast only on the router and now I can browse my local network, but the goflex didn't show up under Network until I went there by hand (\\goflex_home\) in an explorer window. Very odd. Maybe I'll just stop wasting time with this before I break something, and just use DS battery saver at home.

Well, I've not made a little progress, my tablet battery can last overnight now. It still spends many hours in wlan_rx_wake (6 hours) though deep sleep is finally beating it (17 hours). The only significant changes I can think of were disabling "IP Helper" and "Windows Media Sharing" services, and disabling DLNA and mt-daapd on my goflex_home. To do that I had to ssh in, and chkconfig'ing them off didn't work - I had to rename their startup scripts /etc/init.d. I think it was the latter that helped the most as Network Log showed most broadcasts coming from it. I'm still curious if any broadcast traffic on the wlan is enough to trigger the N7 to wake up from deep sleep. CPU Spy shows most cpu time in Deep Sleep now, with the next highest being 340mhz.
Hope this info helps someone else.

Related

Unable to connect Wireless Lan when phone signal is weak?

Hi,
I'm experiencing a weird problem and please let me know if it's only my problem or there is some work around for it.
My phone is SX66 upgraded to 1.40 ROM + 1.13 Radio stack
I can connect Wifi fine whenever I have some phone signal (at work). Whenever I go home where the phone signal is weak then the WIFI couldn't get connected (I believe I set up my home network correctly as I've been using it for so long and configure it for several computer/laptop in house). The network could detect the AP with the SSID but I just couldn't connect to it even I'm sitting right next to the AP.
ROM 1.40
Radio: 1.13
MDD
Are you sure it isn't connecting? What has led you to this conclusion?
Is it possible that it is connecting, but that you just can't browse the internet, in which case check your connection proxy settings. If your work uses a proxy server and you've enabled the pass-through setting in ActiveSync, your network connection may be configured with your work proxy server.
If you're sure you're just not connecting however, things to check are;
WEP/WPA Encryption - If you're using it and have other wireless devices on your network, you no doubt know what to do. If not, say so & I can help you.
DHCP - Does your router/AP support Auto-IP Addressing? Is it enabled? If not, you'll have to configure the WiFi card with a static IP within the same subnet as your router. Ask if you need help.
MAC Filtering - Are you blocking unauthorised MAC Addresses (on your router/ap)?
Interference - Wireless A/V Senders and digital cordless phones are common culprits for RFI. 802.11x APs support multiple channels (most default to channel 11), and you can change these in case of interference. Once again, if you have other WiFi gear already connected with good, strong signals, you can probably discount this one.
Sorry if this is all elementary to you - I don't know how technical you are.
Thanks for your reply.
> Are you sure it isn't connecting? What has led you to this conclusion?
Yes, I've check wireless status on the phone. "Connected to the network", and the AP with DHCP on showed the status of an IP has been allocate to the SX66 mac address. However I dont' really believe it then I check the "Adater", it said network available, and the WIFI icon just didnot show any traffic.
> Is it possible that it is connecting, but that you just can't browse the internet, in which case check your connection proxy settings. If your work uses a proxy server and you've enabled the pass-through setting in ActiveSync, your network connection may be configured with your work proxy server.
I've experience once with the internet connection via Active Sync so I disable the passthrough. Both home and work doesn't have proxy server so I selected not to have any on the phone.
> WEP/WPA Encryption - If you're using it and have other wireless devices on your network, you no doubt know what to do. If not, say so & I can help you.
At work, I have 128 WEP and the connection works fine with the key. At home, I open my network but using MAC filtering to protect it. I have problem with the open network one at home. Perhaps, I will try to setup WEP at home and see if it can work.
The only thing I'm not really clear is the difference between setting "WPA" and "WPA-PSK" from the phone.
> DHCP - Does your router/AP support Auto-IP Addressing? Is it enabled? If not, you'll have to configure the WiFi card with a static IP within the same subnet as your router. Ask if you need help.
Yes, DHCP enable as I don't want to change it back and forth when traveling.
> MAC Filtering - Are you blocking unauthorised MAC Addresses (on your router/ap)?
I do it and I already opened the network and then captured the MAC address into the AP memory. (that's why I think it's connected but will check).
> Interference -
Not really, I'm 6' away from the AP and I don't have any cordless device in my computer room.
> Sorry if this is all elementary to you - I don't know how technical you
are.
No problem, I'd like to learn more about this PDA. The concept is about the same with PC, but the tools to debug is not there. I can't use tracert/traceroute, ifconfig or ping broadcast to really know if I'm the network.
Once again, thanks a lot.
Okay, well it sounds like you're on the right track & know what you're doing.
A useful troubleshooting tool, which gives you tracert, ping, whios, ipconfig and a host of other tools is "vxUtil", which is freeware. I'd give you a URL for downloading it, but I'm on my iMate now (sipping coffee by the Yarra in a Melbourne Cafe - oh what a techno-wanker am I!), but search these forums or Google it and you'll find it.
Now, regarding the proxy thing... These PPCs are a little tricky with their internet settings, and I had to create a different 'connect using...' connection profile, if that makes sense. The important setting within the profile, which is under the Proxy tab, from memory, is "This network connects to the internet".
Now for some reason, if you don't enter in a proxy server here, that check-box doesn't stay checked when you ok your way out. So what I've had to do is go into the advanced area & enter anything in the "wap" proxy, then ok out.
Strange, but it seems to work. Although I always leave my "Private network" on "My Work Network", I can now browse the 'Net through the WiFi AP/Router.
Download vxUtil & see if you can ping your AP, then go from there.
I've worked around the problem by using static IP address instead of depending on DHCP. Thanks to Hitchhiker software. I noticed that it was trying to obtain IP address from DHCP but failed. (The very same DHCP work wells for the rest of my network). Anyway, I will use Hitchhiker to switch IP back and forth if necessary.
Thanks a lot!
MDD
Great to hear you found the problem - well done.

[Q] [REQ] Seamless data access

I've had a problem that has been bugging me with my phone for a few months. I have no programming abilities, but was hoping someone here might be able to whip something up.
Whenever network interfaces go down it kills data access for 30-45 seconds. Not usually a huge problem, but I work in a hospital where there is a new router over the same network every 50 yards which knocks out the signal.
I also notice the interfaces switching when I put pandora on in the car. In my driveway I am still pulling from the home router. I lose audio when I the phone switches to 3G then lose it again when it routes to 4G.
My solution: Have a dummy interface that all data is tunneled through. Some service in the background pings all available gateways every X number of packets to monitor which are active. It can then swap between known working interfaces so there is no drop in service.
Problems I'm considering:
1. Power - How much would keeping alive all interfaces and each modem drain the battery?
2. New source IP -- Each time you switch the interface you are connect to a website from a new IP address. Would pandora allow this, it sees it streaming to your account on a.a.a.a and all the sudden you are telling it to stream to b.b.b.b. Same goes if you were logged into your bank account, your logged in and all the sudden their servers see someone choosing links with a different ip address.
I know there are many people on the board much smarter than myself. Could this be done?

[SOLVED] streaming over wifi causes buffer issues

Just like the title says, I use xiia player. Im forced to stream off EVDO to avoid the buffering issue but it tends to use more battery than wifi, plus i have dead zones in certain areas of the house. Any thoughts on what it could be?
Also is their a similar app that uses a pre-buffer to avoid or lessen skipping?
Phone setup: 0003
Calkulin 1.7.6 with the included kernel
Netgear dual band N router (WNDR3400) onewave cable internet 10/mbs
I can stream on my loptop, run Netflix on two devices all at the same time with no issues, there's no reason my phone should be buffering every 2 mins even if my phone is the only thing connected at the time.
Could be QoS or WISH on the router or ISP level. Try the following:
1) See if you can listen to the same stream on another device (laptop, etc.)
2) Listen to the stream through another player.
3) Check and see if you're getting this problem with multiple streams from different sites/servers, or just one server.
I remember reading a post (on here?) about similar issues. Something having to do with wifi power settings on the router?
I stream on my loptop and it works fine also the router power is at %100. Im convinced its something goibg on with the phone.
It had something to do with a low power mode setting on the router. Look at your wifi settings for power too... Something in the router had to match this.
I didn't run into the issue myself so didn't pay much attention, but it stuck in my mind.
Thank to a post by duffman in another forum:
Apparently the update changed the settings below to something that disrupts streaming. Whether it is because Sprint wants to redirect this traffic to a proxy server or someone just goofed on the settings, who knows.
Here's the fix:
1) Dial ##3282#
2) Choose Edit Mode
3) Enter MSL
4) Choose Advanced
5) Change HTTP PD Proxy Port to: 0
6) Change HTTP PD Proxy Address to: 0.0.0.0
These are the settings for other Android devices so I do not know why Sprint changed them. But this will get your streaming services working again.
phatmanxxl said:
These are the settings for other Android devices so I do not know why Sprint changed them. But this will get your streaming services working again.
Click to expand...
Click to collapse
Conserve bandwidth, faster response since it doesn't need to go offnetwork...
Proxy's are a double edged sword, good for static content that doesn't change too often.

Wrong IP address

At my workplace (400+ employees, probably 75 use devices that connect to WiFi, less than 10 on now), IT staff uses MAC filtering on a DHCP server (freeware called PF Sense, if anyone is knowledgeable with that software) that broadcasts IP addresses from the range of 10.10.1.50 to 10.10.1.200 - everything below the last .50 goes to a bunch of access points. This hasn't changed in at least five years, same setup.
IT uses a combination of Linksys and D-Link routers WITH THE DHCP TURNED OFF. This is verified, this is not at issue at all. And WiFi sniffers on two different phones and a MacBook turned up nothing but the EXTERNAL WiFi network (though, obviously, sometimes as many as 3 access points to connect to at one time).
At my work, we've got probably 2-3 city blocks of space here, with the building and myself no closer than 500 feet from the nearest road, let alone other businesses or residences.
Again, no other WiFi networks appear at all.
To be perfectly clear here: I have used this exact setup with no issues going back 2.5 years on both my current Samsung Galaxy S (Sprint Epic 4G) and my former Palm Pre (Sprint).
So here's what's going wrong:
I turn on WiFi, my Android phone running CM9 claims it's connected to "EXTERNAL" (the name of the WiFi network), the WiFi indicator in Android status bar goes blue (meaning has Net access), then it immediately goes gray (connected, no Internet available).
Instead of getting a 10.10.1.1xx IP, Android tells me I've got a 192.168.1.68 (or .21 or .8 or whatever).
Connected to a Cisco/Linksys device (always), and it tells me the following:
Gateway, DNS1 and DHCP server are all: 192.168.1.1.
Subnet mask: 255.255.255.0
IT has nothing that broadcasts this. My phone does not appear in the DHCP lease logs. It doesn't appear to connect on PF Sense's end at all, despite the MAC addresses matching in that system and on my phone. We killed mine out and reentered it. No change.
Of course, my WiFi at home works like a champ (and delivers IPs only above 192.168.1.100). Open WiFi at a McDonald's works. Pass pro WiFi at a local bar works as advertised.
WHAT DA FAAAAAAAAK??
I've reflashed my CM9 rom. I've wiped dalvik and regular caches. I've forgotten ALL WiFi networks and started from scratch.
What am I missing? What could be causing this? IT is stumped, I'm stumped - and I'm on Sprint so getting a data connection here is about as trustworthy as a methhead in a plumbing store.
Have you tried forcing the static ip and manually entering the settings?
Sent from my SPH-L710 using xda premium
I haven't, no. But of course after dealing with this since last Thursday, all of a sudden I'm working fine. :-/
8-D
XD
??????
IT is heading out for hte day, but they're going to check every access point in the building tomorrow.
So, so weird.
It actually sounds like one of the linksys access points may be going rogue on you. The default address for a linksys router is 192.168.1.1. It the linksys dhcp server responds before the main dhcp server, your phone can't get out of the neighborhood.
Sent from my SPH-D700 using xda app-developers app
Almost certainly a rogue access point. All too common for employees to sneak them in or for consumer grade units to behave curiously.
Enterprise wireless systems will automatically detect that sort of thing and contain the unit. It's rather stunning how well that works.
The hospital I used to work for was plagued daily until we properly engaged that security.
Sent from my SPH-D700 using xda developers app

[Q] change CM12 wifi hotspot broadcast channel

Background
I live in the stix and my only source of internet is my 'unlimited' data plan via phone carrier which also 'allows' me to tether.
This gives me about 15meg download on 58-65 ping which is really nice especially as there is no extra charge for the data I use.
Issue
Recently I started getting random 'limited' connectivity.... which of course means no net connection and to fix I discover the 'Default gateway is not available' and the adapter needs resetting. This solves the network connection.... but a complete nightmare if I'm downloading a big file that can't be torrented and I have to start again. I've tried changing from 'Obtain IP address automatically' to manually setting the IP address,subnet mask and default gateway but this random dropout to 'limited' persists.
I installed Vistumbler to check traffic and discover I'm broadcasting on channel 6 which is populated with lots of other traffic (5 other networks near by using channel 6) and figure this may be a potential cause. (someone else disconnecting from channel 6 at shutdown maybe...?... but that's a wild guess) So only way to discover how to stop this happening is by a process of elimination.
Question:
Does anyone know which 3rd party Wi-Fi tethering app will work on Lollipop and can change the broadcast channel number of my wifi hotspot from my Z1c running CM12...?

Categories

Resources