It seems that AirPods and iPhone can communicate on a very sensitive level. Moving AirPods physically close to the device (1 foot away) will trigger the iPhone to react.
Can the iPhone really detect bluetooth signals with such accuracy? I'm using bluetooth right now, but I can't seem to reach this level of signal sensitivity.
To determine if a Sync Bluetooth device location has adequate signal strength, you can measure the Bluetooth signal strength at its installation location. Primex recommends using the nRF Connect for Mobile . This app allows you to scan and explore Bluetooth® low energy devices.
Description. Discover nearby Bluetooth peripherals and inspect their services for information and characteristics. • View information and signal strength for all peripherals and devices, updating in real time as you move around.
On your iOS device go into "Settings-> Bluetooth" and turn on your BLE device. You should see the device listed in your available devices.
They used to have some additional measures to find out the distance. As noticed by hotpaw2 in comments
func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
if let power = advertisementData[CBAdvertisementDataTxPowerLevelKey] as? Double{
print("Distance is ", pow(10, ((power - Double(truncating: RSSI))/20)))
}
}
TL:DR;
RSSI readings are not very stable and highly depend on environment
It may also vary due to a number of factors, including both the power and sensitivity of the sensing / transmitting radios, as well as the environmental stuff (are you inside, outside? are there many people nearby? noisy wireless environment or not, and so on).
The problem, however, is that beacon signals are actually radio waves, and can be absorbed by metals, walls, water etc. Since they transmit radio signals in the commonly used 2.4GHz band, the signal strength received from a beacon varies widely because of interference.
One of the mostly used formula to find out distance is
d = 10 ^ ((TxPower - RSSI) / 20)
TxPower is typically known as transmit power
The txPower value will be available in BLE advertisement data (available only if the broadcaster (peripheral) provides its Tx power level).
As per apple documentation the value of CBAdvertisementDataTxPowerLevelKey in CBAdvertisementDataTx
Delegate method to access the raw advertisement data
optional func centralManager(_ central: CBCentralManager,
didDiscover peripheral: CBPeripheral,
advertisementData: [String : Any],
rssi RSSI: NSNumber)
Can be also accessed by using BlueCap API
To know more advantages of AirPlay than Classical Bluetooth
https://www.cambridgeaudio.com/blog/airplay
According to the image below from Link
RSSI will go down if you cover the beacon (e.g., a person comes in between you and the beacon). That is, you're still in the same distance, but RSSI goes down—so where you to base the distance estimate on the RSSI, the distance would go up, without you moving an inch.
Many of the above explanations are taken from other sites.
I Hope it sum up to your need!
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