A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By tngw1500se
#75996
QuickFix wrote:Almost a year ago I wrote a small proof of concept script using Arduino that keeps track of WiFi devices in the vicinity, without having them to actually connect to an AP, perhaps you can use it as a starting point or some inspiration. :idea:


Interesting code. Thanks
User avatar
By martin_g
#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...
User avatar
By AcmeUK
#76026
tngw1500se wrote:I'd like the pin to go HIGH when in range and LOW if no phone is connected. That would open the gate without touching the phone.

Would not the iBeacon scenario provide a better solution?

You could detect a BLE signal from your phone.

See https://en.wikipedia.org/wiki/IBeacon

And https://www.youtube.com/watch?v=upeHpyTW1ZM

Here we have "DIY Arduino Beacons as an alternative to iBeacon" :- https://evothings.com/diy-arduino-beacons/