Whats the possible range of peripheralDataWithMeasuredPower
-
21-12-2019 - |
Question
I am trying to setup a Beacon with CBPeripheralManager
. I'm using peripheralDataWithMeasuredPower
on the CLBeaconRegion
and from the docs it says that it would be the measured RSSI value 1m from the device. But in the real scenario always Im getting a particular RSSI value while Ranging, irrespective of the Power we have set. Any ideas on this.
Solution
The RSSI value you get in the ranging callback is supposed to be the actual measured signal strength, not the calibration power value you set. So what you are seeing is expected.
iOS compares the measured RSSI to the calibration constant (which is not visible through the ranging API) to calculate an estimated distance. If the measured RSSI is weaker than the calibration constant then the device is over one meter away. If it is less, then the device is less than one meter away.