如何在 android 4.3 BLE 中使用 PROXIMITY PROFILE、IMMEDIATE ALERT SERVICE 和 Find Me Profile 的配置文件? [英] How to use the profile of PROXIMITY PROFILE,IMMEDIATE ALERT SERVICE and Find Me Profile in android 4.3 BLE?

查看:15
本文介绍了如何在 android 4.3 BLE 中使用 PROXIMITY PROFILE、IMMEDIATE ALERT SERVICE 和 Find Me Profile 的配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Android 应用程序,我必须在其中连接到 Android 4.3 上的蓝牙设备.

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

这个APP的目标是BLE Anti-loss,它可以使远程设备上的蜂鸣器发出哔哔声,我想实现PROXIMITY PROFILEFind Me PROFILE.

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.

我参考了Android API18中BluetoothLeGatt的示例,我可以扫描、连接和发现服务.

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

我发现即时警报的 UUID 是 0x1802,但我没有在蓝牙开发者门户上找到 Find Me PROFILE 和 PROXIMITY PROFILE 的 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.

有人有即时警报PROXIMITY PROFILEFind Me PROFILE的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?

推荐答案

它们是两个不同的东西: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.

祝你好运!

这篇关于如何在 android 4.3 BLE 中使用 PROXIMITY PROFILE、IMMEDIATE ALERT SERVICE 和 Find Me Profile 的配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆