【问题标题】:How can I connect to the FitBit Zip over Bluetooth 4.0 LE on Linux with bluez?如何使用 bluez 在 Linux 上通过蓝牙 4.0 LE 连接到 FitBit Zip?
【发布时间】:2013-05-16 00:01:47
【问题描述】:

我购买了 FitBit 拉链。此设备使用蓝牙 4.0 LE。我想至少通过 bluez 连接到它。如果这成功了,我想看看我能弄清楚多少协议。

我使用的是联想 P500 Ideapad,它集成了对蓝牙 4.0 的支持。它似乎工作(有点)

当我这样做时:

hcitool lescan

我能够找到设备的蓝牙地址,它(虽然可能不相关)是:CF:D9:24:DB:F4:7B

现在,我读到另一个问题:Bluetooth Low Energy: listening for notifications/indications in linux,我可以收听通知和其他协议功能。我使用过旧蓝牙,但我没有使用蓝牙 LE 的经验。

我在尝试使用 hcitool leccgatttool 连接设备时遇到了问题。连接超时并且似乎使 Linux 机器上的蓝牙处于不良状态。我可以通过重新加载蓝牙相关的内核模块来解决这个问题。

感谢任何提示。我正在尝试使用最新的 bluez。

【问题讨论】:

    标签: linux reverse-engineering bluez fitbit


    【解决方案1】:

    看看galileo project,我们可以使用 Fitbit 加密狗(也是蓝牙连接器)连接到跟踪器(并同步它)。那里使用的字节应该可以帮助您找出您需要的字节...

    完全披露:我是这个项目的维护者。

    【讨论】:

    • 非常感谢。我最近没在附近,但这很酷,我将安装它并尝试理解代码。
    • 嘿,是否可以让 Fitbit Charge 与我正在开发的新(自定义我自己的版本 android/iphone)应用程序通话并显示提醒等。
    • 这个项目死了吗?链接转到 404 页面。
    • 我已修复链接,感谢您的提醒。
    【解决方案2】:

    我记得做了一些类似于你所描述的事情并且能够很好地连接。但是,没有列出任何指示/通知的特征,因此除了真正的基本元数据(设备类型、设备名称等)外,我无法从设备获取任何数据。

    我今天只是尝试做同样的事情,但我似乎根本无法建立连接,直到我告诉它使用随机类型的地址。

    这是我之前让它工作时记录的结果:

    # gatttool -b EB:47:1D:11:11:11 --addr-type=random --primary
    attr handle = 0x0001, end grp handle = 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
    attr handle = 0x0008, end grp handle = 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
    attr handle = 0x0009, end grp handle = 0x000e uuid: adabfb00-6e7d-4601-bda2-bffaa68956ba
    attr handle = 0x000f, end grp handle = 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb
    
    # gatttool -b EB:47:1D:11:11:11 --addr-type=random --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 = 0x000a, char properties = 0x12, char value handle = 0x000b, uuid = adabfb01-6e7d-4601-bda2-bffaa68956ba
    handle = 0x000d, char properties = 0x06, char value handle = 0x000e, uuid = adabfb02-6e7d-4601-bda2-bffaa68956ba
    handle = 0x0010, char properties = 0x02, char value handle = 0x0011, uuid = 00002a29-0000-1000-8000-00805f9b34fb
    handle = 0x0013, char properties = 0x02, char value handle = 0x0014, uuid = 0000fb00-0000-1000-8000-00805f9b34fb
    

    您可能需要配对设备才能获得实际有用的数据...不知道该怎么做。

    【讨论】:

    • 感谢您的回答。这篇文章将非常有帮助。
    • 感谢您联系我。不幸的是,我最近忙于工作,无法将其弄乱。希望我能尽快解决。
    • 我能够继续使用 gatttool 来获取一些数据,但仍然不确定它的用途。 gatttool -b F8:56:40:65:66:15 --char-read -u 00002a00-0000-1000-8000-00805f9b34fb --addr-type random
    猜你喜欢
    • 1970-01-01
    • 2014-10-04
    • 2023-03-22
    • 2016-03-20
    • 2016-05-18
    • 1970-01-01
    • 2018-12-31
    • 2016-01-04
    • 1970-01-01
    相关资源
    最近更新 更多