Guess who is coming home?

Have you ever wanted to know if someone is coming home even before they ring the bell? I do not have a dog (they have that kind of power too) so I have to look for a solution on another domain.

So last weekend I decided to see if I could use an ESP8266 for that purpose, given that my sample subjects, aka sons, are equipped with smartphones with a MAC address I am aware of.

But the point is that if I wait till I can detect their phones are joining the home wireless network, they are probably at the door already. I am looking for something else that can pick them up sooner, even if their phones cannot yet pick up the home network wifi signal.

Googling around I found this code. It is a basic sniffer of wifi control frames. In particular, it is looking for probe frames that wireless stations can emit from time to time to discover nearby wireless networks.

But be warned that while the trick seems to work fine for Android phones, it does not seem to work for iPhones as they use to use a random MAC for probe frames.

As my results, well, it just works. I guess your mileage may vary depending on many factors. I get a one-minute warning, most likely their signal is detected when they enter the building.

An alternative (or complementary) use could be an early warning for the postman, the UPS guy, etc. But for that purpose, you'll need to figure out their MAC addresses, which is not difficult as the ESP2866 code gives you the signal level (RSSI) of the probes received, so a new MAC with a power signal when you have a visitor is going to be noticed.

Comments

Popular posts from this blog

VFD control with Arduino using RS485 link

How to get sinusoidal s-curve for a stepper motor

Stepper motor step signal timing calculation