c++ - 需要具有以下功能的 bluez API 的替代方案

标签 c++ ubuntu bluetooth bluez

我正在开发一个蓝牙模块。我需要这些功能-

1>device discovery,  
2>device connection,  
3> inter-device communication,  
4>RSSI to know the approximate distance between them(it need not be accurate).  

我之前使用“bluez”堆栈 API 开发了该功能。但是我没有找到特征- RSSI 来知道它们之间的大致距离(它不需要准确)。
所以,我想要 2 个选项-

1> to use an alternative to "bluez" or  
2> to request "bluez" to include RSSI module.

我正在使用 C++ 和“GTK”在“ubuntu”Linux 环境中进行开发。

请建议我该怎么做?
我只需要通过任何方式使用 c++ 来确定两个设备之间的距离,如果有任何 linux 命令,也许我可以使用 system() 或其替代方法。我想检查设备之间的距离是否小于 10 英尺。或大于 10 英尺。这是我唯一需要的东西。

最佳答案

BlueZ 允许您获取两个设备之间的 RSSI。在这里查看我的回答:-

https://stackoverflow.com/a/24417605/2215147

但是,正如您可能已经读到的那样,准确性并不高,通常不建议通过 RSSI 估算距离。请参阅以下链接以供引用:-

关于c++ - 需要具有以下功能的 bluez API 的替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62818651/

相关文章:

安卓蓝牙 : Connect()/Disconnect()

java - 蓝牙激活时如何强制警报是否?

cocos2d-iphone - 任何展示如何使用游戏套件(服务器-客户端模型)而无需(!)GKPeerPickerController 和 2 个以上设备的示例项目?

C++ - 成对显示的整数因子

java - 通过 JNI 将多个参数从 java 传递到 c++ 应用程序

c++ - 为什么没有 strand::wrap() 等同于 strand::post()?

node.js - AWS EC2未安装nodejs

python - importerror 没有名为缓存的模块

c++ - 多线程Mandelbrot设置代码输出不正确的图像

MySQL权限问题: User cannot see database despite permission being granted to role