4

I've got a small home network with a DiskStation NAS and a Raspberry Pi server, both of which can do various chores such as controlling power plugs among other things. I want these two machines to be able to realize and distinguish between me being at home, my partner being at home or both/noone of us being at home.

My best idea so far has been to check wether the respective smartphones are currently connected to Wifi, just by using the Raspberry Pi to ping their IPs or dhcp hostnames. The system should be somewhat responsive, so the minimum period between should not exceed something like maybe 30 seconds.

Can anyone make an educated guess on how frequent pings will affect the battery life of the smartphone while connected to the network?

2
  • 2
    I do not see where this question is based on opinion. I'm asking for the impact on battery life when constantly pinging a smartphone and there shoulb be answers based on facts.
    – inVader
    Nov 20, 2013 at 22:17
  • Update: It's 2020-09-13 and almost all smartphones around me keep WiFi on all the time even on power saving modes, replying to pings, too. Sep 13, 2020 at 12:31

1 Answer 1

1

The phones I have tested don't maintain an active Wifi connection unless they are actively using it. When the connection isn't active the pings won't be responded to starting with timeouts and then destination host unreachable.

  1. Do some browsing on phone so Wifi is active.
  2. Ping it - should work fine.
  3. Turn off the display, let it sleep etc.
  4. Keep pinging - after a while you will get timeouts and then host unreachable.
  5. Turn display back on and browse some
  6. Ping works again.
1
  • 1
    Just some remarks:On my current phone (Android Marshmellow on LG G4) this seems not to be correct anymore. Device has been turned off for five hours and can still be pinged
    – Ole Albers
    Jan 4, 2016 at 23:09

Not the answer you're looking for? Browse other questions tagged .