- Sun May 20, 2018 2:31 am
#76005
There are two options:
One is to sniff around for traffic (incl. probe requests) and extract an compare the MAC. E.g. like this:
https://www.youtube.com/watch?v=fmhjtzmLrg8 Problem here are iPhones - they change their MAC periodically when not connected to avoid tracing like this.
The other option would be to set up your own AP (with out without password) on the ESP and handle the WiFi event EVENT_SOFTAPMODE_STACONNECTED. As soon as a MAC connects, you will get an event with with this MAC. And even iPhone use the same MAC once they connect. However, you wil have to make sure, that the phone doesn't connect to another WiFi in range (not completely unrealistic near your home).
A third would be to make sure that all devices in a standard home network always get the same IP (from DHCP - often the case with lonf lease times) and use the ESP to ping the IPs of the devices - if they respond, they are there...