从ANT + garmin USB读取数据

时间:2016-10-04 07:49:24

标签: linux libusb

我正在尝试阅读ANT+ garmin usb中的数据并按照本教程https://www.johannesbader.ch/2014/06/track-your-heartrate-on-raspberry-pi-with-ant/

但是我收到了这个错误,

starting node
Traceback (most recent call last):
  File "garmin_ant_demo.py", line 71, in <module>
    sys.exit(0)
  File "garmin_ant_demo.py", line 39, in __exit__
    self.stop()
  File "garmin_ant_demo.py", line 33, in stop
    self.antnode.stop()
  File "build/bdist.linux-x86_64/egg/ant/core/node.py", line 167, in stop
ant.core.exceptions.NodeError: Could not stop ANT node (not started).

运行时

python garmin_ant_demo.py

在我使用上述方法失败后,我从git克隆了以下repo,

https://github.com/Loghorn/ant-plus

并尝试运行给定的示例程序(https://github.com/Loghorn/ant-plus/blob/master/sample/sample.js),但我一直收到以下错误,

    this.device.__claimInterface(this.id)
                ^

Error: LIBUSB_ERROR_BUSY
    at Error (native)
    at Interface.claim (/home/suf/node_modules/ant-plus/node_modules/usb/usb.js:168:14)
    at GarminStick3.USBDriver.open (/home/suf/node_modules/ant-plus/build/ant.js:295:20)
    at Object.<anonymous> (/home/suf/final/ant/ant-plus/sample/sample.js:64:12)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)

我尝试研究错误Error: LIBUSB_ERROR_BUSY,但根本没有运气,事实上有人有同样的问题How to solve LIBUSB_ERROR_BUSY on Raspberry Pi (Debian) running Node.js但没有得到任何回复。

0 个答案:

没有答案