Main Content

Your HotSpot is a presence detector

I never connect my devices to “free wifi” hotspots. I’ve seen what a (bad) hacker can do, using one laptop, a battery powered Raspberry PI board and a collection of software tools. He can spy (almost) any smartphone that is connected to the same “free wifi” hotspot.

For this reason, I always use my own LTE 4G connection and my smartphone is always enabled to share such internet connection with my other devices (one laptop, another smartphone and some other) using an access filter based on MAC address of every device. This is more secure than use “free wifi” hotspots and I suggest to everyone the same approach. However, this isn’t the subject of my post.

Having my own hotspot, with the SSID choosen by myself, I can use the smartphone for a lot of nice services. In this article I will describe one of them.

The presence blinker

I’m currently living in a B&B, ‘cause I’m far from home, due to a contract job. When I am in my room, I don’t make too much noise. I just read or write documents; the TV is turned off and also the music is off. So, it happens that other hosts of the B&B, when going out, lock the main door with the key! This makes me a bit claustrophobic! To avoid this unfair situation, I decided to build a flashing light that will be visible from the low side of my room’s door, just to warn the other hosts that I am in my room…

I thought about a passive IR sensor, but such devices work only if there is a movement in the room, and I don’t move so often. Also microwave sensors based on Doppler effect work in the same way; they activate the output when there is a movement. Finally, I decided to use my smartphone as a presence detector… I built a small device based on the well known ESP-01 module. This device has an ATtiny2313 microcontroller and a blue led (high luminosity) that blinks when I am in the room (with my smartphone). When my smartphone goes out (with me) the led stops blinking…

The working principle is very simple. The microcontroller sends AT commands to the ESP-01 to get the list of active hotspots in the area. One of such hotspots is my smartphone, so the SSID string is taken and compared with the one programmed in the internal flash memory. If the two strings match, the led blinks; otherwise the led remains off. So simple…”

Link to article