yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] elkinm:
I set the delay to 10 seconds, was 0 before and it seems to have fixed it.

The log still says scheduling wifi to to turn off in 10 seconds, right after turning wifi on, but wifi stays on with no additional entries. Good enough for now.
[Android Apps and Games] whitedavidp:
Hello. I have recently discovered that my LG V40 w/Android 9 (rooted) seems to be blocking either multicast send, multicast receive, or both when the device is sleeping. I am using echo and netcat to send a multicast and simultaneously using tcpdump to see the resulting multicast response. Most of the time, this works fine. But if I reboot the phone (as I do every night at midnight) and the phone just sits on a tabletop (as it does all night after the reboot), this mechanism just stops producing any results at all.

I have read elsewhere that there may be some multicast locking/filtering going on. And I can see what might be related in a dumpsys wifi:

2020-01-19T10:15:27.782 - CMD_SET_MULTICAST_FILTER wlan0/-1 0 0 true [rcvd_in=StoppedState, proc_in=StoppedState]

2022-04-22T11:52:17.574 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:52:19.107 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:52:19.107 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:52:37.590 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 true [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:52:38.068 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:52:48.341 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 true [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:56:25.314 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T11:58:38.117 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 true [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T12:02:09.671 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T12:03:18.820 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 true [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T12:03:19.924 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 false [rcvd_in=RunningState, proc_in=RunningState]

2022-04-22T12:03:30.360 - CMD_SET_MULTICAST_FILTER wlan0/34 0 0 true [rcvd_in=RunningState, proc_in=RunningState]

But I really have no idea. And I am wondering/hoping this app might help. Can anyone confirm/deny? Thanks
[Android Apps and Games] patsmike:
Thanks man, feels like I JUST posted that haha.

---------- Post added at 04:56 PM ---------- Previous post was at 04:44 PM ----------

In 4.0.1, the "hold wifilock" option doesn't stick if quiting out of the app using the back button or if restarting phone
[Android Apps and Games] chamonix:
https://github.com/asksven/BetterWifiOnOff/issues/21
[Android Apps and Games] patsmike:
Thanks. Is it easier for you if I post bugs directly to github?
[Android Apps and Games] chamonix:
sure, it's a copy paste action less so if you want please feel free. But I support both and have no problem in copying either.

If you post there please use [bug] and [feature], that makes my life simpler than with tags
[Android Apps and Games] mamouton:
What is the hold high pref wifilock?
[Android Apps and Games] chamonix:
In this Wi-Fi lock mode, Wi-Fi will be kept active as in mode WIFI_MODE_FULL but it operates at high performance with minimum packet loss and low packet latency even when the device screen is off. This mode will consume more power and hence should be used only when there is a need for such an active connection.

An example use case is when a voice connection needs to be kept active even after the device screen goes off. Holding the regular WIFI_MODE_FULL lock will keep the wifi connection active, but the connection can be lossy. Holding a WIFI_MODE_FULL_HIGH_PERF lock for the duration of the voice call will improve the call quality.

http://developer.android.com/reference/android/net/wifi/WifiManager.html#WIFI_MODE_FULL_HIGH_PERF
[Android Apps and Games] Edwrib:
Hi, I have FC when select 'WiFi lock while plugged'.

GNex @ JB.

And 'disabled' toggle shouldn't stop the service?

Ty.
[Android Apps and Games] chamonix:
No, disabled just stops the processing.

Can you please provide a logcat of the FC condition?
[Android Apps and Games] Edwrib:
Only this:

--------- beginning of /dev/log/main

W/InputEventReceiver( 5898): Attempted to finish an input event but the input event receiver has already been disposed.

D/dalvikvm( 5898): GC_CONCURRENT freed 2819K, 26% free 11469K/15495K, paused 26ms+8ms, total 57ms
[Android Apps and Games] patsmike:
Ditto on this. It seems to save the setting even though it FCs
[Android Apps and Games] patsmike:
Is the high performance wifilock working for anyone? I tried download a large file and listening to Pandora, but wifi shuts off no matter what. Anyone have better success?
[Android Apps and Games] gsmdb:
I miss an option

- Rules while unplugged > High perf. Wifilock

because when using voip and the screen is off by proximity sensor then wifi is off. It isn't convenient.

If uncheck - turnoff while screen is off - then the wifi is never turned off, so the option isn't similar compared my request.
[Android Apps and Games] chamonix:
https://github.com/asksven/BetterWifiOnOff/issues/23

I'm on it, bugfix coming in a few minutes
[Android Apps and Games] chamonix:
That would be this feature: https://github.com/asksven/BetterWifiOnOff/issues/17

It's tricky because android does not give me visibility to Wifilocks held outside of the application context so I will need to hack something to detect that another app is holding a wifilock.
[Android Apps and Games] chamonix:
Release 0.4.1

Bugfix is up. See post #1 for changelock
[Android Apps and Games] gsmdb:
Good news for you!

Using the latest csipsimple trunk there is an option to hold wifilock, indeed high perf. wifilock. Since its open source so I believe you can get an idea how to implement it in BetterWifiOnOff.

From now I'm glad to use yr apk in conjunction w. CSipSimple w/o bother keeping a wifilock when the screen is turned off.

Hope yr apk being better w. time! Thank you. :good:
[Android Apps and Games] chamonix:
I haven't got any feedback on SSID whitelist. Does it work for you?
[Android Apps and Games] castaway1:
i have idea for this app. My suggestion is feature that turn wifi off when signals drop to 0% (so connections is lost) or in low state (like 2-3%). So it turn off automatically when i leave my house.

What you think?
[Android Apps and Games] yhrn:
Sorry, on vacation last week and the next one as well so I can't test it at the moment. Will come back with feedback once I'm back home.
[Android Apps and Games] jr67:
As far as the ssid whitelist I couldn't get it to work for more than one ssid. It works for the first ssid listed (my home wifi) but it kept shutting off my wifi when I was at work. I just list the ssids separated with a comma, right? Unfortunately, I didn't pull a logcat but I'll pull one on Monday.

Also I want to report a bug. I have it set to shut off wifi after 30 seconds when I turn off the screen; but if I turn on the screen again before 30 seconds it will still turn off the wifi after 30 seconds from the time I turned off the screen. It registers that the screen was turned on again but since wifi is still on it thinks that nothing needs to be done so the previous command to shut off the wifi will be executed. Not sure I'm explaining the problem clearly so I've attached a screen shot.
[Android Apps and Games] chamonix:
It would be great if you could provide a logcat about the ssid (please not ssid is case sensitive).

I'll look back into the off switch when turning screen back on thing. It was fixed for me in 4.1 but there may be another error condition. A logcat would be helpful on that issue too
[Android Apps and Games] chamonix:
That would be #16
[Android Apps and Games] jr67:
Just tested the ssid whitelist again and everything is working fine now so I'm not sure what I was doing wrong before.

Here is the logcat for the off switch issue.
[Android Apps and Games] jr67:
Okay, I figured out what was happening. It looks like any changes to the whitelist aren't being applied until after I kill/restart the app. I tried removing my ssid for my work wifi from the whitelist but it wouldn't turn off my wifi until after I killed/restarted the app. I've attached another logcat.
[Android Apps and Games] patsmike:
Ahh interesting. I think aokp's "power saver" (albeit buggy) had something that could do this. I guess its easier when its built into the ROM....
[Android Apps and Games] chamonix:
That's something I will look after.

Edit: at a first look I couldn't find it in the settings app of aokp. Is it a Rom feature or an add on app?
[Android Apps and Games] chamonix:
#25
[Android Apps and Games] igogold:
It seems to #20 is not fixed.

I have default settings: put wifi off when screen goes off after 30 sec and put wifi on after screen unlock, not after it goes on. But there is a small window after screen off when I can push home or lock button and wake phone without lock screen. If I wake phone in this time alarm to put wifi off not cancel and wifi goes off in next ~28 sec.

I suppose it thinks as there wasn't unlock it need not cancel the alarm.

I think this log is more informative than in logfile.
[Android Apps and Games] chamonix:
reopened #20
[Android Apps and Games] chamonix:
Release 0.5

New version is up. See post #1 for changelog
[Android Apps and Games] twe90kid:
Is there a way to have a option to keep wifi on when screen is off (when active data is running, for example when streaming radio). I like having wifi shutoff when screen is off, but I don't want it to go off when there's data transferring. Thx
[Android Apps and Games] chamonix:
Yes that feature is planned: https://github.com/asksven/BetterWifiOnOff/issues/17
[Android Apps and Games] patsmike:
Hmm, its a ROM feature... its also ICS aokp, not jb if that helps. I used it up until Build 40, maybe they took it out for the last milestone build? The one I used was 99.9% pure aokp, just modified for the galaxy s2

http://xdaforums.com/showthread.php?t=1574718
[Android Apps and Games] chamonix:
OK, I guess I will have to download the sources :) where in Rom is this located and what is the exact name / label!
[Android Apps and Games] jr67:
It's the battery saving settings of AOKP's rom control app.
[Android Apps and Games] patsmike:
I'm not running aokp right now, sorry. I will try and flash tonight when I get a chance
[Android Apps and Games] chamonix:
Got it: https://github.com/AOKP/packages_apps_ROMControl/tree/ics
[Android Apps and Games] chamonix:
I am going to try following stuff (found it here: https://github.com/AOKP/frameworks_base/blob/ics/core/java/android/server/PowerSaverService.java)

Check for active downloads

DownloadManager dl = (DownloadManager) mContext.getSystemService(Context.DOWNLOAD_SERVICE);
Cursor query = dl.query(new DownloadManager.Query()
.setFilterByStatus(DownloadManager.STATUS_PENDING
| DownloadManager.STATUS_RUNNING));

Checking for running apps

I could find no explicit wifilock handling so I'm going to stick to trying the download manager detection
[Android Apps and Games] patsmike:
I don't really know that much about how sleeping and downloads work (does the phone go to sleep if it continues to download?) but, Instead of checking for downloads, could you just start the wifi off timer after the screen is turned off AND the phone goes to sleep/deep sleep. Wouldn't that serve the same function that were trying to achieve?

For example, I remember with AOKP power saving mode, if I put the phone to my ear during a call and the screen turned off, the wifi WOULDN'T turn off since the phone is still in active state (not deep sleeping), but with your app it would turn off.
[Android Apps and Games] chamonix:
Unfortunately there is no way to trap the process of going to deep sleep and handle that from userland. About being in a call: there is some code for that and I added a feature for that too: https://github.com/asksven/BetterWifiOnOff/issues/26
[Android Apps and Games] chamonix:
Testing 0.6 with:

- keep wifi on when in call

- keep wifi on while downloads active/queued
[Android Apps and Games] patsmike:
Awesome, I'm super excited
[Android Apps and Games] May Arno:
Amazing work man. Totally eliminated the wifi wake lock.
[Android Apps and Games] chamonix:
Release 0.6

Version 0.6 is up. Check changelog in post #1
[Android Apps and Games] patsmike:
Edit: Stupid post by me :) please ignore. Wifi on while downloads working great!

Edit 2: nvm, its not working, wifi shuts off during downloads
[Android Apps and Games] chamonix:
Ok, let me add some more logging of the decision making
[Android Apps and Games] chamonix:
Release 0.6.1

Release 0.6.1 is up. No functional additions, just more logging / event logging.

For the ones of you testing "keep wifi on if downloads running" please provide a logcat (you can check what's going on by looking for WifiOffAlarmReceiver.
[Android Apps and Games] patsmike:
So I started a download, turned off my screen (using the "0 sec wifi off timer"), and then turned it back on after a few seconds. The download failed and wifi had turned off with the screen.

Logcat included
[Android Apps and Games] twe90kid:
Bit buggy, doesn't always keep on when streaming radio.
[Android Apps and Games] patsmike:
I don't think we have that functionality yet
[Android Apps and Games] twe90kid:
That is the function.

Since i'm using Tunein radio app, it's downloading or streaming the music by data. If data is on and screen is off, it should keep wifi connected (assuming the function works correctly.)
[Android Apps and Games] patsmike:
What I meant is that this app can't do this yet. Chamonix is working on figuring out a way, but as of now, if you turn your screen off, streaming radio will not keep the wifi on.
[Android Apps and Games] chamonix:
I am pretty sure there is a difference in the handling whether the delay is 0 or >0. In one case there is no alarms and the handling for download manager happens there. This is of course not as it should be but as a temp workaround you may want to set the delay to something not 0

Issue #29
[Android Apps and Games] chamonix:
Could you please provide a Logcat starting from the point you start streaming up to the point Wifi goes off.

I currently support download manager and I bet it's not used by streaming. But I may find a hint on how to do this looking at what services are used for streaming.
[Android Apps and Games] twe90kid:
how do I provide a logcat?
[Android Apps and Games] patsmike:
I changed to a 10sec sleep timer and I had the same problem
[Android Apps and Games] Aduck79:
Try aLogcat from market and use "Pastebin for Droid" to publish.

Sent from my LG Optimus 2X
[Android Apps and Games] twe90kid:
Here's a logcat of the tunein radio problem. please check to see if you can fix so that the wifi stays on when streaming and the screen is off. Thx
[Android Apps and Games] igogold:
When I have a phone with screen on and disconnect charger wifi goes off after time-out by alarm.

I think wifi must stay on while screen is on.

Also when I start GUI after long time there are no logging entries on main screen. But if I exit from GUI by back button and start GUI again the entries are shown for a long time, not only between exit and start.
[Android Apps and Games] chamonix:
#31 and #32
[Android Apps and Games] twe90kid:
hopefully my logcat helps
[Android Apps and Games] igogold:
I also have the same issue. WiFi icon in status bar shown as static grey, not animated blue on my modded Sony ICS. But quick screen off / screen on refreshes the icon and after that it works good.
[Android Apps and Games] chamonix:
I had a pretty full week with day work but will start looking at the log tonight.

I also have added an experimental technique to detect current transfer rate on wifi and will try using this for detecting of streaming as at a first look streaming doesn't use the download manager. I will do some more testing and add a few fixes to the next version.
[Android Apps and Games] tiwag:
I get a FC whenever i connect the USB cable or the charger.

tapatalked using recycled bits and bytes
[Android Apps and Games] patsmike:
Same here. I have the following settings for wifi on charger:

Do not turn on if plugged in

Do leave on if plugged

No wakelocks and no wifilocks if plugged in

What settings do you have? Maybe we can narrow it down.
[Android Apps and Games] chamonix:
That is fixed in upcoming 0.7
[Android Apps and Games] yhrn:
Hi,

I've now been able to test a bit with the latest version and here's a little bit of feedback.

I'm a bit confused when it comes to the whitelist feature. Is it the intention that the whitelist is merely a precondition for any of the other "leave wifi on" rules to be used? What I would like is to be able to specify networks for which wifi will unconditionally stay on, even when the screen goes off.

Regardless of this it does not seem to work properly - if if I am connected to a whitlisted network wifi is turned off when the screen is turned off if none of the "leave wifi on" rules are fulfilled. On the other hand, if I'm not in a whitelisted network and have unchecked "Leave on only if connected" wifi is still left on after the timeout is reached. Or perhaps I'm missing something here?

The "Hold wifilock" options on the main screen feel a bit mysterious to me. A description somewhere would be nice. From what I have gathered the point of enabling these would be if I want to make sure an app that does not grab a wifilock itself will still communicate over wifi when the screen is off. Is this correct?

The text within parenthesis after "Run as foreground service" cannot be read fully on my device, even in landscape mode, as there is no line wrapping for the "primary" text of an option. Maybe it could be moved to the description below.

Will try to test a bit more when I have better understanding of how it is supposed to work.
[Android Apps and Games] patsmike:
I think this just an ICS thing. Ever since I upgraded to jb, I haven't had this problem
[Android Apps and Games] chamonix:
Release 0.7

New version is up with rewritten bandwidth detection. If pref is set Wifi stays on if bandwith is > 1KB/s or if download manager has active or queued transfers. I have tested that with last.fm HQ streaming and Wifi stayed on. Nevertheless with low quality streaming I had Wifi turning off because of buffering. If you guys encounter that situation please post a logcat so I can see what bandwidth in used in your case (I may need to have to wait longer (e.g. 5 minutes) in order to make sure that downloads/buffering are balanced
[Android Apps and Games] koricua74:
Getting this when trying to download the latest apk

"Invalid Attachment specified. This can happen for a variety of reasons-- most likely because the thread or post you are trying to view has been moved or deleted. Please return to the forum home and browse for another similiar post."
[Android Apps and Games] malavan:
Where is 0.7 download
[Android Apps and Games] chamonix:
Edit: nvm, attachements are broken :(

Edit: working again, everything is back to normal
[Android Apps and Games] DJCrapsody:
As above, the attachment link is not working. You'll have to reupload a new version.
[Android Apps and Games] chamonix:
I can't upload nor delete/manage attachements anymore so I guess something is broken. See post #1 for downloads from dev-host

Edit: Link removed, attachements were fixed and are back to post #1
[Android Apps and Games] chamonix:
I'll rename the pref to "Leave on only if connected to whitelisted SSID". The rules are sequential and the first one that fails causes Wifi to turn off. e.g. if "leave on only if connected" is checked BWON will check if the phone is connected to a hotspot and has an IP. If this fails the Wifi is turned off, if not it goes on with next rule.

The Whitelist rules checks if the connected SSID is in the whitelist (if the rule is checked) and if that fails (even if a whitelisted SSID is visible but not connected) that will turn Wifi off. If you observe that this logic does not work please send me a logcat.

It makes sure that the Wifi stack stays loaded even if the phone goes to sleep. Basically it's a replacement for the not always working Wifi sleep policy from Wifi settings. I'll try to think of a way to explain that (#34)

#33
[Android Apps and Games] yhrn:
Let me see if I got this straight (sorry for being a bit thick :o). The "Rules for turning wifi on" and "Rules for turning wifi off" are actually the events that BWON subscribes to and acts on whereas the "The rules for leaving wifi on" are rules that are checked by BWON when a "wifi off event" is raised and if all of the active rules are met the event does not result in wifi being turned off.

Did I get this right? If so I'll be able to test a bit more.

I have a few more thoughts immediately though:

Another way of saying that the "Leave wifi on rules" are applied sequentially is to say that AND logic is used to combine the rules. It would be very nice if it was possible to combine the rules using both AND and OR logic. I realize that this is more difficult to achieve in the UI but I think it makes sense to be able to configure things like "leave wifi on if there is network activity OR a connection to a whitelisted AP has been established".

The description for the "Connection timeout" option is a bit unclear - is this timeout related to the "Leave on only if connected" and/or to any other rule? If it is only related to "Leave on only if connected" then maybe it could be moved up to that option. Or maybe it could be disabled when it has no effect (in that case the same behavior would probably be a good idea for other dependent options like the SSID whitelist).

Are whites paces significant in the SSID whitelist or are they trimmed?

#33 could include the "Run as foreground service" as well, i.e. I can't read all the text.
[Android Apps and Games] mamouton:
Great app! I get excellent battery life running this app. I notice when I plug my phone up to my computer I am consistently getting a better wifi has stopped responding message.
[Android Apps and Games] tiwag:
Thanks! FC's when plugging are solved too!

tapatalked using recycled bits and bytes
[Android Apps and Games] chamonix:
That should be fixed in 0.7. If it persists please post a logcat
[Android Apps and Games] mamouton:
I am attaching a log. I was listening to Pandora and my wifi cut off. I didn't realize I had the logs from previous days but the log from the better wifi stopping when plugging in is included as well.
[Galaxy S III General] surender9999:
Hi guys I am from India and on international s3 and face a problem that s3 get hot upto 48c

I have a solution for this(must be work)

1. First of all disabled bundled stock apps like chat on etc I have attached a screen shot of disabled apps on my s3

2. Off NFC android beam.

3.disable s voice( big battery eater)

4.must disable s memo and exchange mail

5.clear cache of all files and apps weekly

6.flip board users plz clear your cache routinely( this apps has a network bug that eat more battery in less time.

7. Set sync of apps like Google +,mail,wheather to 6 hours.

Screenshots are below.

Plz tell me after disabled these apps attached below that the tricks work or not
[Galaxy S III General] sebarkh:
48°C is really like nothing. I remember SGS 1 & SGS 2 especially were getting almost 60°C.

So - unless some expert denies - I'm pretty sure temperatures up to 70 will not make harm.

With one exception: temperatures above 40° will shorten battery lifespan in the long run. Li-ion batteries don't like this.

Sent from my Galaxy SIII
[Galaxy S III General] nodq:
That sounds crazy, 70°Celsius? How can you actually still hold the phone on that temp? Almost impossible. My S3 never reached 40° Celsius once so far. But i remeber my HC Desire, when it was very hot outside, it reched almost 50° Celsius and it was HOT like **** in the hand i couldnt hold it very long tbh. And i dont think that this is good for the phone.