Raspberry Pi蓝牙LE连接到RedBearLab屏蔽

时间:2014-01-23 05:42:04

标签: bluetooth arduino raspberry-pi bluetooth-lowenergy bluez

我正在尝试从RaspPi连接到RedBearLab BLE屏蔽。我在用 CSR4.0 USB加密狗http://www.adafruit.com/products/1327 Raspberry Pi Rev-B板与Raspbian OS 的bluez-5.11

我将RedBearLab BLE屏蔽连接到Arduino UNO R3。我试图从RaspPi连接到盾牌(附加CSR4.0)。但它无法连接 - 连接尝试超时/资源繁忙。

以下步骤我使用

$ sudo hcitool lescan

LE Scan ...
xx:xx:xx:xx:xx:xx BLE Shield
$ sudo hcitool lecc xx:xx:xx:xx:xx:xx

无法创建连接:连接已超时

使用gatttool无法解决问题

$ sudo gatttool -b xx:xx:xx:xx:xx:xx --interactive

[ ][xx:xx:xx:xx:xx:xx][LE]> **connect**

Attempting to connect to xx:xx:xx:xx:xx:xx

Error: connect error: Device or resource busy (16)

[xx:xx:xx:xx:xx:xx][LE]>

非常感谢!

2 个答案:

答案 0 :(得分:2)

好像你的适配器很忙。有东西正在使用它。是否有其他设备连接到您的适配器?尝试使用以下方法重置适配器:

$ sudo hciconfig hci0 reset

答案 1 :(得分:1)

某些BLE设备在连接时需要随机地址。尝试:

sudo gatttool -t random -b xx:xx:xx:xx:xx:xx --interactive