无法连接到树莓派BLE装置 [英] Cannot connect to BLE device on Raspberry Pi

查看:3158
本文介绍了无法连接到树莓派BLE装置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图连接到BLE装置(心率传感器,极地H7),在树莓派2。我在这里使用的bluez发现(5.35)的最后一个版本: http://www.bluez.org/download/
但是,当我试图用连接 gatttool ,我总是有连接被拒绝的错误。

I'm trying to connect to a BLE device (Heart rate sensor, Polar H7), on a Raspberry Pi 2. I use the last version of bluez (5.35) found here: http://www.bluez.org/download/ But when I'm trying to connect using gatttool, I always have "connection refused" error.

下面是我做的:

pi@raspberrypi ~ $ sudo su
root@raspberrypi:/home/pi# hciconfig dev
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 5C:F3:70:69:54:3D  ACL MTU: 1021:8 SCO MTU: 64:1
        DOWN
        RX bytes:616 acl:0 sco:0 events:34 errors:0
        TX bytes:380 acl:0 sco:0 commands:34 errors:0

root@raspberrypi:/home/pi# hciconfig dev up
root@raspberrypi:/home/pi# hcitool lescan
LE Scan ...
00:22:D0:6D:E0:E6 (unknown)
00:22:D0:6D:E0:E6 Polar H7 6DE0E61C
^Croot@raspberrypi:/home/pi# hcitool lecc 00:22:D0:6D:E0:E6
Connection handle 64
root@raspberrypi:/home/pi# gatttool -b 00:22:D0:6D:E0:E6 -I
[00:22:D0:6D:E0:E6][LE]> connect
Attempting to connect to 00:22:D0:6D:E0:E6
Error connect: Connection refused (111)
[00:22:D0:6D:E0:E6][LE]> 

我试图按照本主题:<一href=\"http://stackoverflow.com/questions/24853597/ble-gatttool-cannot-connect-even-though-device-is-discoverable-with-hcitool-lesc\">BLE即使设备是可发现与hcitool莱斯康 gatttool无法连接
但它并没有为我工作。

I tried to follow this topic: BLE gatttool cannot connect even though device is discoverable with hcitool lescan but it did not work for me.

推荐答案

我不得不停用插件 PNAT 的/ etc /蓝牙/主.conf文件 - > DisablePugins = PNAT 。我读了它的不稳定,但我不知道很多关于这个插件。

I had to disable the plugin pnat in /etc/bluetooth/main.conf -> DisablePugins=pnat. I read that it's unstable, but I don't know much about this plugin.

这篇关于无法连接到树莓派BLE装置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆