views:

38

answers:

1

Hi,

I'm trying to find a way to detect when some iPhone device is near another device (which could be another iPhone, a PC or another kind of sensor/device).

Anyone knows how this could be accomplished? I've thought in the direction of bluetooth, but as I understand - some pairing must be done before. Can this be accomplished without pairing? if so, how can I identify exclusively the iPhone being detected?

Thanks, Roman

A: 

You don't need pairing to determine proximity through Bluetooth. Searching for devices will only return the devices in your vicinity (due to the limited range of BT).

If you then want to communicate with this newly discovered device, it is slightly more complicated - but to just detect if there is other devices with BT enabled near-by scanning is enough.

andy
Thank you for the quick response. Could I get the devices' bluetooth MAC or detect some actions it does?
Roman
Most devices are not visible over Bluetooth (I think iPhones are only visible while they are searching for other devices, or when an app is publishing a service with GameKit/Bonjour). I'm also pretty sure that you don't get direct access to the Bluetooth stack, so you're SOL.
tc.
Yeah, you can only see already paired devices using the api.
Peter DeWeese