Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
527 views
in Technique[技术] by (71.8m points)

android - What exactly is txPower for Bluetooth LE and how is it used?

I am trying to understand what exactly txPower is and how to use it, since I am planning to develop and Android app that uses Beacons.

I have seen 2 definitions online:

1.The transmitted power of the beacon.

2.The received power 1 meter away from the beacon.

How are these two definitions related? Also, when transmitting a Beacon signal from a device using an app such as QuickBeacon, how do I determine what to set the power (txPower) to?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Most beacon formats contain a single byte in the transmission that indicates what the expected signal level should be when you are one meter away. This byte is sometimes called txPower (short for transmitted power) and sometimes measured power.

Do not confuse this with a second configuration setting on some beacon models that lets you vary how strongly the transmitter actually sends its broadcasts. This is typically called transmit power, which is why measured power is a less easily confused term.

The measured power field is used to make distance estimates. If the phone sees that its signal level is the same as the measured power field transmitted by the beacon, it knows it is exactly one meter away. If it has a stronger signal, it knows it is closer. If it has a weaker signal it knows it is further away. Using a formula, you can get a rough idea of the distance in meters.

Making this distance estimate accurate requires having the measured power field set properly to the expected signal level at one meter. It is often pre-configured into the beacon by the manufacturer, but it is typically adjustable. Why would you want to adjust it? If you place the beacon inside a cabinet, it might attenuate the signal. If you place the beacon against a metal wall, it might increase the signal due to reflections. For this reason, it is recommended that you calibrate a beacon by measuring and setting its measured power value after installation.

Calibration involves using a phone to measure the beacon signal level (using a measurement called the Received Signal Strength Indicator or RSSI, which is measured in dBm). To calibrate, you hold a phone with a typically performing bluetooth receiver (ideally an iPhone 6, but Nexus devices work well too) exactly one meter away from the beacon, and measure the average signal strength over 30 seconds. Many beacon configuration apps and tools like Locate for iOS and Android have calibration utilities.

Once you have the calibration value, you need to configure it inside your beacon per the manufacturer's instructions. This will give you more accurate distance estimates.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...