如何使用近距离应用模式的轮廓,立即通知服务,并找到我的资料在安卓4.3 BLE?我的、近距离、如何使用、轮廓

2023-09-05 08:12:49 作者:你未来的老公

我开发一个Android应用程序,其中我需要连接到蓝牙设备上的Andr​​oid 4.3。

I am developing an android application where I have to connect to Bluetooth device on Android 4.3.

这个应用程序的目标是BLE防损,它可以使远程设备上的蜂鸣器提示音,我要实现的近距离应用模式和查找过我

The goal of this APP is BLE Anti-loss, it can make the buzzer beep on the remote device and I want to implement the PROXIMITY PROFILE and Find Me PROFILE.

我引用的 BluetoothLeGatt 样品中的Andr​​oid API18,我可以扫描,连接和发现的服务。

I reference the sample of BluetoothLeGatt in Android API18 and I can scan, connect and discover the services.

我发现立即警报的UUID是0x1802,但我并没有发现UUID为查找过我和近距离应用模式的蓝牙开发者门户网站。

I found the UUID of Immediate Alert is 0x1802, but I did not found the UUID for Find Me PROFILE and PROXIMITY PROFILE at Bluetooth Developer portal.

如果我得到的UUID,如何使用这个UUID,使蜂鸣器提示音在远程设备上。

And if I got the UUID, how to use this UUID to make the buzzer beep on the remote device.

有没有人有一个Android应用程序示例立即警报 近距离应用模式和查找过我

Does anyone have an android application sample for Immediate Alert, PROXIMITY PROFILE and Find Me PROFILE?

或者可以告诉我怎么用UUID来实现所需的功能?

Or can show me how to use UUID to achieve the required functionality?

推荐答案

这是两个不同的东西: RSSI TX_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.

祝你好运!