I'd like to do something in the following using bluetooth.
For example,
I'd like to display something in the following on my iPhone application.
My iPhone is connected to another iPhone:Harry's iPhone.
In this case,
Does anyone know how to do this?
Using bluetooth you can at best obtain a distance resolution of few meters, but you can't calculate the direction, not even roughly.
WifiNanScan relies on Wi-Fi Aware's core structure and you can use this app to find out how far the other device is from your device. Google describes this app as: The WifiNanScan app measures the distance between two smartphones using the Wi-Fi Aware protocol (also called Neighborhood Aware Networking(NAN)).
RSSI (Received Signal Strength Indicator) For Bluetooth, it is the strength of the beacon's signal as seen on the receiving device, e.g. a smartphone. The signal strength depends on distance and Broadcasting Power value.
Bluetooth signal strength is measured by the Received Signal Strength Indicator (RSSI). You can access the device's RSSI by accessing the Bluetooth device settings and then reading the RSSI. An ideal RSSI is between -40 and -55.
Using bluetooth for localization is a very well known research field (ref.). The short answer is: you can't. Signal strength isn't a good indicator of distance between two connected bluetooth devices, because it is too much subject to environment condition (is there a person between the devices? How is the owner holding his/her device? Is there a wall? Are there any RF reflecting surfaces?). Using bluetooth you can at best obtain a distance resolution of few meters, but you can't calculate the direction, not even roughly.
You may obtain better results by using multiple bluetooth devices and triangulating the various signal strength, but even in this case it's hard to be more accurate than few meters in your estimates.
You could use sound and knowledge of speed sound to calculate the distance between the iphones.
In iOS7 Apple introduced iBeacons. This will give you the distance between 1 phone and another. It is simple to setup, check out the WWDC sample AirLocate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With