Hardware Reference
In-Depth Information
Continued from opposite page.
// read the address. It's a two-byte value, so you
// add the two bytes as follows:
address = thisPacket[5] + thisPacket[4] * 256;
// get RSSI:
result = thisPacket[6];
}
return result;
}
Radio signal strength is measured in decibel-
milliwatts (dBm). You might wonder why the
signal reads -65dBm. How can the signal
strength be negative? The relationship between milliwatts
of power and dBm is logarithmic. To get the dBm, take
the log of the milliwatts. So, for example, if you receive 1
milliwatt of signal strength, you've got log 1 dBm. Log 1 = 0,
so 1 mW = 0 dBm. When the power drops below 1 mW, the
dBm drops below 0, like so: 0.5 mW = (log 0.0005) dBm or
-3.01 dBm. 0.25mW = (log 0.00025) dBm, or -6.02 dBm.
If logarithms confuse you, just remember that 0 dBm
is the maximum transmission power, which means that
signal strength is going to start at 0 dBm and go down
from there. The minimum signal that the XBee radios
you're using here can receive is -92 dBm. Bluetooth radios
and WiFi radios typically have a similar range of sensitivity.
In a perfect world, with no obstructions to create errors,
the relationship between signal strength and distance
would be a logarithmic curve.
Figure 8-7
Output of the XBee RSSI test program.
 
Search WWH ::




Custom Search