BlueZ,蓝牙管理API:读取控制器信息命令,bluetooth_version,人类可读

问题描述 投票:0回答:1

[BlueZ蓝牙管理API的读取控制器信息命令返回的bluetooth_version映射到什么版本?

例如我的控制器返回0x08。这是蓝牙4.1或5.2或1.1还是...?

我找不到mgmt-api.txt文件的任何信息。在Google上使用“蓝牙版本二进制字符串转换”进行搜索也没有任何帮助。同样,spec没有为“ 0x08”或“蓝牙版本”打开任何东西。在这里搜索版本是没有意义的,因为每个页面标题都包含该单词...

新见解

btmon似乎知道...

@@ MGMT事件:命令Comp。(0x0001)plen 283 {0x0003} [hci0]

11:04:18.712443读取控制器信息(0x0004)全体280

    Status: Success (0x00)
    Address: 00:25:CA:2A:08:38 (OUI 00-25-CA)
    Version: Bluetooth 4.2 (0x08)
bluetooth bluetooth-lowenergy bluez
1个回答
0
投票
但是可以在bluez lib/hci.c源文件中找到这样的映射:

/* Version mapping */ static hci_map ver_map[] = { { "1.0b", 0x00 }, { "1.1", 0x01 }, { "1.2", 0x02 }, { "2.0", 0x03 }, { "2.1", 0x04 }, { "3.0", 0x05 }, { "4.0", 0x06 }, { "4.1", 0x07 }, { "4.2", 0x08 }, { "5.0", 0x09 }, { "5.1", 0x0a }, { NULL } };

© www.soinside.com 2019 - 2024. All rights reserved.