Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Wi-Fi tweaks #4564

Merged
merged 4 commits into from Feb 8, 2019

Conversation

Projects
None yet
2 participants
@NiLuJe
Copy link
Member

NiLuJe commented Feb 8, 2019

  • On Kobo, try to avoid booting in an inconsistent state ("Wi-Fi connection" checked, because the modules are loaded, but no actual network connection, for whatever reason).
  • Don't enable auto_restore_wifi by default.

NiLuJe added some commits Feb 8, 2019

On Kobo, kill WiFi on startup if we detect an inconsistent state...
Untested, not terribly pretty.

The other solution is to slow down the Wi-Fi meny by doing the same
check for the "Wi-Fi connection" checkbox as in the later wifi_status
one...
Don't enable auto_restore_wifi by default
It's liable to silently murder batteries for no good reason, given that
we prompt to enable WiFi by default when needed, and we otherwise have
no actual need to keep WiFi on in the background.

re #2215 (in particular, this directly contradicts @houqp in
#2215 (comment) ;)).
@NiLuJe

This comment has been minimized.

Copy link
Member Author

NiLuJe commented Feb 8, 2019

I can't actually produce such a broken launch status on Kobo, but at least it doesn't seem to have averse effects (if you boot with WiFi enabled and in a sane state, it won't murderously kill it).

The other approach would be to make the "Wi-Fi connection" checkmark more accurate by using NetworkMgr:isWifiOn() and NetworkMgr:isConnected() instead of just NetworkMgr:isWifiOn(), but that might incur a delay, as we're running ping & route for isConnected on a lot of platforms.

(To recap, on Kobo: isWifiOn checks if the wifi driver is loaded, while isConnected tries to ping the default gateway).

@NiLuJe

This comment has been minimized.

Copy link
Member Author

NiLuJe commented Feb 8, 2019

As for auto_restore_wifi, it's useful in some circumstances, but I just think it's liable to do more harm than good for a default, given what we rely on wifi for.

NiLuJe added some commits Feb 8, 2019

@Frenzie

Frenzie approved these changes Feb 8, 2019

Copy link
Member

Frenzie left a comment

lgtm, I turn that off myself

@Frenzie Frenzie added the enhancement label Feb 8, 2019

@Frenzie Frenzie merged commit 0113708 into koreader:master Feb 8, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.