我通过 node.js 使用 noble & bleno 从 Rasbian 连接到 BLE 外围设备,但出现问题并且无法建立连接。我尝试了多个不同的 BLE 加密狗,它们都以相同的方式失败。目前我有一个 CSR 4.0 附加。当从 OS X、iOS 或 Android 进行连接时,连接工作得很好。
这是 HCI 转储:
2015-11-22 18:36:54.732907 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
bdaddr 00:12:6F:6B:C7:32 type 0
interval 96 window 48 initiator_filter 0
own_bdaddr_type 0 min_interval 6 max_interval 12
latency 0 supervision_to 200 min_ce 4 max_ce 6
2015-11-22 18:36:54.734511 > HCI Event: Command Status (0x0f) plen 4
LE Create Connection (0x08|0x000d) status 0x0c ncmd 1
Error: Command Disallowed
现在,当我尝试通过连接hcitool lecc
或gatttool
建立连接时 - 但尝试写入特征值失败时Characteristic Write Request failed: Attribute requires authentication before read/write
. 这有关系吗?
我在Linux raspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux