我使用以下配置从源代码安装了 bluez-5.15:
$ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \
--localstatedir=/var --libexecdir=/lib --disable-systemd
然后我不得不手动将 gatttool 复制到 /usr/local/bin 目录中
$ sudo cp attrib/gatttool /usr/local/bin/
我重新启动了 Raspberry Pi 并尝试了以下连接到我的 BLE 设备:
$ sudo hciconfig hci0 up
$ sudo hcitool lescan
LE Scan ...
EA:FB:B5:CE:B0:13 DfuTarg
$ sudo hcitool lewladd EA:FB:B5:CE:B0:13
$ sudo hcitool lecc EA:FB:B5:CE:B0:13
Could not create connection: Input/output error
于是我尝试连接 gatttool:
$ gatttool -b EA:FB:B5:CE:B0:13 --interactive
[EA:FB:B5:CE:B0:13][LE]> connect
Attempting to connect to EA:FB:B5:CE:B0:13
Error: connect error: Device or resource busy (16)
[EA:FB:B5:CE:B0:13][LE]>
我在这里缺少什么-这是配置问题吗?这些错误是什么意思?