使用RPi跟踪蓝牙LE钥匙圈

时间:2018-01-27 20:13:21

标签: bluetooth bluetooth-lowenergy ibeacon beacon

我买了一个Chipolo(https://chipolo.net/)它就像其他蓝牙低能量钥匙圈(Tile,Keeper,Nut,......) 我想在没有Android应用程序的情况下跟踪它。我想使用RPi。

如果我将设备置于关联模式(按下它),我设法发现它:

user@indigene:~ $ sudo hcitool lescan
LE Scan ...
C8:59:6F:2D:XX:XX Chipolo

我设法提出一些要求:

user@indigene:~ $ for d in $(sudo gatttool -t random --char-read --uuid 0x2a00 -b C8:59:6F:2D:XX:XX | sed 's,.*value: ,,'); do echo "0x$d" | xxd -r; done; echo
Chipolo

user@indigene:~ $ sudo gatttool -t random -b  C8:59:6F:2D:XX:XX --characteristics
handle = 0x0002, char properties = 0x02, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x0009, char properties = 0x20, char value handle = 0x000a, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x000d, char properties = 0x1a, char value handle = 0x000e, uuid = 0000fff0-0000-1000-8000-00805f9b34fb
handle = 0x0010, char properties = 0x0a, char value handle = 0x0011, uuid = 0000ffe0-0000-1000-8000-00805f9b34fb
handle = 0x0012, char properties = 0x1a, char value handle = 0x0013, uuid = 0000ffe1-0000-1000-8000-00805f9b34fb
handle = 0x0016, char properties = 0x0a, char value handle = 0x0017, uuid = 0000ff00-0000-1000-8000-00805f9b34fb
handle = 0x0018, char properties = 0x18, char value handle = 0x0019, uuid = 0000ff10-0000-1000-8000-00805f9b34fb
handle = 0x001b, char properties = 0x18, char value handle = 0x001c, uuid = 0000ff20-0000-1000-8000-00805f9b34fb

但是当我没有任何命令(2分钟或更长时间)离开钥匙圈时,它再也无法联系到它。

user@indigene:~ $ sudo gatttool -t random --char-read --uuid 0x2a01 -b C8:59:6F:2D:XX:XX | sed 's,.*value: ,,'
connect error: Connection refused (111)

有没有办法请求连接或与之配对? 使用手机应用程序,即使我让它持续5分钟,当我靠近密钥环与手机共享数据时。而且我可以用手机打电话。

  • 有没有办法用RPi恢复/模拟这种行为?
  • 否则有没有办法分析手机和密钥环之间的蓝牙流量?

先谢谢你的帮助, BDR

0 个答案:

没有答案