bluetooth-lowenergy - 蓝牙低功耗广告扫描、 channel 信息或选择

标签 bluetooth-lowenergy

我使用 bluez 编写了一个应用程序,它可以扫描 BLE 广告数据。该应用程序目前接收广告消息没有任何问题。

对于广告消息,BLE 使用 37、38 和 39 三个 channel 发送消息。每个 channel 使用不同的频率。当应用程序接收数据时,我希望能够确定在哪个 channel 上接收数据。如果这不可能,是否可以在单个 channel 或 3 个 channel 的子集上强制进行低能量扫描。

最佳答案

le_set_advertising_parameters_cp结构中有chann_map;

如果该位设置为 1,则使用 channel 37,如果该位设置为 2

使用 channel 38,如果位设置为 4,则使用 channel 39,如果位设置为 4,则使用 channel 39

设置为 7 所有 channel 均启用;更多详细信息请参阅spec4.0 中的第 1058 页

关于bluetooth-lowenergy - 蓝牙低功耗广告扫描、 channel 信息或选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29866446/

相关文章:

android - 使用 Android 6.0 的 BluetoothLeScanner.startScan 无法发现设备

ios - 在后台iOS Swift中扫描附近的所有蓝牙设备。

ios - 在我的应用程序中未检测到新的 ibeacons

android - 无法向 BLE 外设 (ZL-RC04A) 设备发送数据

android - 不调用 onLeScan

android - 是否有可能改进 BLE 服务发现

android - 任何用于 React-native 的蓝牙网格插件?

android - 如何使用 BluetoothLeAdvertiser 添加特征?

ios - 在 iOS 上保存大型数组的最佳方法

c++ - 使用 Qt 阅读 Central Role 上的 BLE 广告