且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 android 4.3 BLE 中使用 PROXIMITY PROFILE、IMMEDIATE ALERT SERVICE 和 Find Me Profile 的配置文件?

更新时间:2022-12-06 22:24:26

它们是两个不同的东西:RSSITX_POWER.

They are two different things: RSSI and TX_POWER.

TX_POWER 是用于传输信号的电源.
RSSI 是接收器测得的信号功率.

TX_POWER is a power that was used to transmit the signal.
RSSI is a power of the signal measured by the receiver.

始终如此:TX_POWER >= RSSI.
(因为您无法测量比实际传输的功率更大的功率)

It is always true: TX_POWER >= RSSI.
(Since you can't measure power greater than it was actually transmitted)

要监控两个设备(发射器和接收器,或外围设备和中间设备)之间的接近度,您应该使用以下等式:

To monitor proximity between two devices (Transmitter & Receiver, or, Peripheral & Central) you should use the following equation:

接近等级 = TX_POWER - RSSI

这背后的直觉如下,发射器总是以相同的功率(TX_POWER)发射,但接收器测量的RSSI不同,根据距离(接近度),当它靠近时RSSI值变大,并且当它移开时,RSSI 值越来越小.

The intuition behind this is as follows, the transmitter is always transmit with the same power (TX_POWER), but receiver measure RSSI differently, according to the distance (proximity), when it get closer the RSSI value is getting bigger, and when it moves away the RSSI value is getting smaller.

祝你好运!