【问题标题】:need an alternative to bluez APIs having following features需要具有以下功能的 bluez API 的替代品
【发布时间】:2020-10-30 06:32:08
【问题描述】:

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

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++ 以任何方式获取 2 个设备之间的距离,如果有任何 linux 命令,也许我可以使用 system() 或其替代方法。我希望检查设备之间的距离是否小于 10 英尺。或大于 10 英尺。这是我唯一需要的。

【问题讨论】:

    标签: c++ ubuntu bluetooth bluez


    【解决方案1】:

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

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

    但是,您可能已经读过,准确度不是很高,一般不建议通过 RSSI 来近似距离。请参阅以下链接以供参考:-

    【讨论】:

      猜你喜欢
      • 2013-10-20
      • 1970-01-01
      • 2021-06-16
      • 1970-01-01
      • 2022-08-12
      • 2013-07-30
      • 2010-11-30
      • 1970-01-01
      • 2011-01-15
      相关资源
      最近更新 更多