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, we can do this.