iPhone’s Bluetooth as a promixity sensor?
I’m trying to see if there’s a way to use the iPhone’s Bluetooth radio to figure out which other iPhones are nearby. I want to be able to walk into a restaurant, bar, sporting area, etc. and launch an application on the phone that finds all other Bluetooth devices around me and tells me the signal strength (=distance) of each device.
Background: Normally you can see your iPhone from another Bluetooth device only when the iPhone is in discoverable mode (Settings -> General -> Bluetooth). At that point you can pair your other device with the phone and from then on, they will see each other automatically. Until this pairing step has been completed, the devices (supposedly) don’t see each other. And here’s where I’m a bit lost. After pairing my phone to the car’s speaker/microphone, the two devices see each other immediately. There’s no need to make the iPhone discoverable again. This leads me to think that each device does a constant check whether a previously paired device is present. This check must contain unique identifiers for the devices, otherwise they would not know what secret key to use for the communication. That secret key is generated during the initial pairing operation.
Are there any geeks out there who know if it possible to reach down into the Bluetooth stack and get the raw communication that happens before paired devices hand-shake and work with each other? And, secondly, can you get to that protocol using the Apple iPhone SDK?