Use your phone as an access control device

We saw in Chapter 4, Wi-Fi Pranks-Exploring Your Network, how we could use our Raspberry Pi to scan the wireless networks to see what devices are around. Most smartphones come with either Wi-Fi or Bluetooth, or both, on them nowadays, which transmits an identifier unique to that device.

We can take advantage of that by using our phone as an access control device, so our Pi can know when we're nearby and act accordingly. For example, let's say if each time you were near your Pi with your smartphone, it could automatically unlock the encrypted container you set up in Chapter 5, Taking Our Pi Off-Road, and then lock it again when we're not nearby. By constantly scanning for our phone's broadcast packets, ...

Get Raspberry Pi for Secret Agents - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.