1

I am trying to read the data from ANT+ garmin usb and following this tutorial, https://www.johannesbader.ch/2014/06/track-your-heartrate-on-raspberry-pi-with-ant/

but I am getting this error,

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).

when running

python garmin_ant_demo.py

After I failed with the above approach, I cloned the following repo from git,

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

and tried running the sample program given (https://github.com/Loghorn/ant-plus/blob/master/sample/sample.js) , but I keep getting the following error,

    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)

I tried researching the error Error: LIBUSB_ERROR_BUSY but had no luck at all, in fact someone had the same issue How to solve LIBUSB_ERROR_BUSY on Raspberry Pi (Debian) running Node.js but didn't get any response.

martin clayton
  • 76,436
  • 32
  • 213
  • 198
Akash Masand
  • 1,441
  • 14
  • 30
  • What operating system do you work on? – dryman Oct 04 '16 at 08:14
  • i am using ubuntu 16 – Akash Masand Oct 04 '16 at 08:19
  • Ah ok I missed the linux tag. Do you have any other software installed that may access the device? LIBUSB_ERROR_BUSY means there is a different process already accessing the device. Maybe try rebooting prior to your next try. – dryman Oct 04 '16 at 11:55
  • This is the contextmanager in the example erroring out in it's cleanup and masking an error. In my case this was due to permissions. To get the underlying error add `if self.antnode.running:` in the `__exit__` function. – Att Righ Jan 24 '17 at 18:36
  • hi, having the same issues, did you find the solution ? Thanks – Yann92 Apr 07 '20 at 09:57

0 Answers0