[当我尝试读取需要通过RPI 3B上的GattTool加密的BLE特性时
gatttool -b 04:EE:03:B1:47:DF --char-read --handle=0x000e --sec-level=low
其结果为错误特征值/描述符读取失败:请求属性遇到了不太可能的错误
我尝试过/不使用--sec-level = low | medium | high
hcidump
2020-06-05 10:35:50.696249 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
type 0x00 (passive)
interval 60.000ms window 30.000ms
own address: 0x00 (Public) policy: white list only
2020-06-05 10:35:50.697091 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Parameters (0x08|0x000b) ncmd 1
status 0x00
2020-06-05 10:35:50.697158 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
value 0x01 (scanning enabled)
filter duplicates 0x01 (enabled)
2020-06-05 10:35:50.697910 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
2020-06-05 10:35:50.909070 > HCI Event: LE Meta Event (0x3e) plen 33
LE Advertising Report
ADV_IND - Connectable undirected advertising (0)
bdaddr 04:EE:03:B1:47:DF (Public)
Flags: 0x06
Unknown type 0x06 with 16 bytes data
RSSI: -34
2020-06-05 10:35:50.909151 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
value 0x00 (scanning disabled)
filter duplicates 0x00 (disabled)
2020-06-05 10:35:50.911659 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
2020-06-05 10:35:50.911717 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
bdaddr 04:EE:03:B1:47:DF type 0
interval 96 window 96 initiator_filter 0
own_bdaddr_type 0 min_interval 24 max_interval 40
latency 0 supervision_to 42 min_ce 0 max_ce 0
2020-06-05 10:35:50.912840 > HCI Event: Command Status (0x0f) plen 4
LE Create Connection (0x08|0x000d) status 0x00 ncmd 1
2020-06-05 10:35:52.419884 > HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 64, role master
bdaddr 04:EE:03:B1:47:DF (Public)
2020-06-05 10:35:52.420183 < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2
40 00
2020-06-05 10:35:52.421473 > HCI Event: Command Status (0x0f) plen 4
LE Read Remote Used Features (0x08|0x0016) status 0x00 ncmd 1
2020-06-05 10:35:52.588728 > HCI Event: LE Meta Event (0x3e) plen 12
LE Read Remote Used Features Complete
status 0x00 handle 64
Features: 0x1d 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2020-06-05 10:35:52.596785 < ACL data: handle 64 flags 0x00 dlen 7
ATT: Read req (0x0a)
handle 0x000e
2020-06-05 10:35:52.686141 > ACL data: handle 64 flags 0x02 dlen 9
ATT: Error (0x01)
Error: Insufficient authentication (5)
Read req (0x0a) on handle 0x000e
2020-06-05 10:35:52.884191 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 1
2020-06-05 10:35:52.884221 < ACL data: handle 64 flags 0x00 dlen 11
SMP: Pairing Request (0x01)
capability 0x04 oob 0x00 auth req 0x2d
max key size 0x10 init key dist 0x0d resp key dist 0x0f
Capability: KeyboardDisplay (OOB data not present)
Authentication: Bonding (MITM Protection)
Initiator Key Distribution: LTK CSRK
Responder Key Distribution: LTK IRK CSRK
2020-06-05 10:35:52.978584 > ACL data: handle 64 flags 0x02 dlen 6
SMP: Pairing Failed (0x05)
reason 0x05
Reason Pairing Not Supported
2020-06-05 10:35:52.978640 < HCI Command: Disconnect (0x01|0x0006) plen 3
handle 64 reason 0x05
Reason: Authentication Failure
2020-06-05 10:35:52.979073 > HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
2020-06-05 10:35:53.027840 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 1
2020-06-05 10:35:53.027952 > HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 64 reason 0x16
Reason: Connection Terminated by Local Host
任何人都知道如何解决此配对问题?
我已经能够在iOS上进行配对(通过cordova BLE中央插件),这是打包的记录器:https://gist.github.com/buildog/f65fb3b0d5a75d0b6aad26a7d71e9433
我现在不如何通过Gatttool在Linux上模仿此过程。
这是配对容量不一致的设备本身的问题
远程设备说“不支持配对”,同时也说“错误:身份验证不足”,这当然是相互矛盾的。显然,它并不符合蓝牙规范。您拥有的远程设备是什么?