Difference between revisions of "Ibeacon"

From Wiki2
(Created page with "The iBeacon output power is measured (calibrated) at a distance of 1 meter. Let's suppose that this is -59 dBm (just an example). The iBeacon will include this number as part...")
 
Line 1: Line 1:
http://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/
===distance===
The iBeacon output power is measured (calibrated) at a distance of 1 meter. Let's suppose that this is -59 dBm (just an example). The iBeacon will include this number as part of its LE advertisment.
The iBeacon output power is measured (calibrated) at a distance of 1 meter. Let's suppose that this is -59 dBm (just an example). The iBeacon will include this number as part of its LE advertisment.



Revision as of 14:36, 27 April 2015

http://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/

distance

The iBeacon output power is measured (calibrated) at a distance of 1 meter. Let's suppose that this is -59 dBm (just an example). The iBeacon will include this number as part of its LE advertisment.

The listening device (iPhone, etc), will measure the RSSI of the device. Let's suppose, for example, that this is, say, -72 dBm.

Since these numbers are in dBm, the ratio of the power is actually the difference in dB. So:

ratio_dB = txCalibratedPower - RSSI To convert that into a linear ratio, we use the standard formula for dB:

ratio_linear = 10 ^ (ratio_dB / 10) If we assume conservation of energy, then the signal strength must fall off as 1/r^2. So:

power = power_at_1_meter / r^2. Solving for r, we get:

r = sqrt(ratio_linear) In Javascript, the code would look like this:

function getRange(txCalibratedPower, rssi) {

   var ratio_db = txCalibratedPower - rssi;
   var ratio_linear = Math.pow(10, ratio_db / 10);
   var r = Math.sqrt(ratio_linear);
   return r;

} Note, that, if you're inside a steel building, then perhaps there will be internal reflections that make the signal decay slower than 1/r^2. If the signal passes through a human body (water) then the signal will be attenuated. It's very likely that the antenna doesn't have equal gain in all directions. Metal objects in the room may create strange interference patterns. Etc, etc... YMMV.

shareeditflag edited Feb 7 '14 at 2:19

answered Feb 7 '14 at 1:24

Mark Fassler 43135