- Sat Oct 13, 2018 5:08 pm
#78614
If ping works on iPhone that still remains a good option.
I have done a bit more playing with my Samsung phone to try to understand what is going on that makes ping not a good technique.
Ping does stop when the Samsung android goes to sleep but the router still shows the presence of a wifi signal from that device. It looks like something is suspending much of the IP stack when it is asleep.
However, I thought that the phone must still be sending out a beacon packet regularly for the router to register the signal.
I used the minisniff project
https://www.hackster.io/rayburne/esp826 ... iff-f6b93a to monitor the low level traffic. This does show the phone continuing to send packets whilst it is in sleep. These are recognised by their MAC address rather than IP address but that may be better to recognise devices as it is independent of any address allocation.
So one could in principle have code based on the sniffer just monitor these packets against a list of specified MAC addresses. A packet arriving would confirm the presence of that device. One would need to assume that if a packet did not arrive within a significant period of time (say 3 normal intervals) then that device was not present. That would not be suitable for rapid response e.g. lighting but may be Ok for heating.