Open eriktelepovsky opened 10 years ago
So, it can't find the ant stick for some reason (the exception is a bit misleading). I'm not that familiar with mac, but it seems that dmesg
is available. What does it say when you plug in the ant stick?
Well, the ANT stick was plugged in. Then I tried to plug it into different USB port and I got this:
Driver available: [<class ant.base.driver.USB2Driver at 0x10deb2e20>, <class ant.base.driver.USB3Driver at 0x10deb2ef0>]
- Using: ant.base.driver.USB3Driver
Traceback (most recent call last):
File "garmin.py", line 336, in main
g = Garmin(options.upload)
File "garmin.py", line 137, in __init__
Application.__init__(self)
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 82, in __init__
self._node = Node()
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/easy/node.py", line 48, in __init__
self.ant = Ant()
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/ant.py", line 59, in __init__
self._driver.open()
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/driver.py", line 180, in open
dev.set_configuration()
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/core.py", line 589, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/core.py", line 92, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 724, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 554, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 19] No such device (it may have been disconnected)
Interrupted: [Errno 19] No such device (it may have been disconnected)
You could try to comment out the line that calls the set_configuration function -- line 180 in the ant/base/driver.py file -- and see if that helps. There are some caveats here apparently, see < http://sourcecodebrowser.com/libusb-1.0/1.0.3/caveats.html> for details. There are really only one configuration for these ant devices, so I don't think it should be necessary.
On 25 March 2014 21:21, Erik Telepovský notifications@github.com wrote:
Well, the ANT stick was plugged in. Then I tried to plug it into different USB port and I got this:
Driver available: [<class ant.base.driver.USB2Driver at 0x10deb2e20>, <class ant.base.driver.USB3Driver at 0x10deb2ef0>]
- Using: ant.base.driver.USB3Driver Traceback (most recent call last): File "garmin.py", line 336, in main g = Garmin(options.upload) File "garmin.py", line 137, in init Application.init(self) File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 82, in init self._node = Node() File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/easy/node.py", line 48, in init self.ant = Ant() File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/ant.py", line 59, in init self._driver.open() File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/driver.py", line 180, in open dev.set_configuration() File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/core.py", line 589, in set_configuration self._ctx.managed_set_configuration(self, configuration) File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/core.py", line 92, in managed_set_configuration self.backend.set_configuration(self.handle, cfg.bConfigurationValue) File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 724, in set_configuration _check(self.lib.libusb_set_configuration(dev_handle.handle, config_value)) File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 554, in _check raise USBError(_str_error[ret], ret, _libusb_errno[ret]) USBError: [Errno 19] No such device (it may have been disconnected) Interrupted: [Errno 19] No such device (it may have been disconnected)
— Reply to this email directly or view it on GitHubhttps://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/92#issuecomment-38615426 .
It didn't help :/
Driver available: [<class ant.base.driver.USB2Driver at 0x10e710a78>, <class ant.base.driver.USB3Driver at 0x10e710b48>]
- Using: ant.base.driver.USB3Driver
Traceback (most recent call last):
File "garmin.py", line 336, in main
g = Garmin(options.upload)
File "garmin.py", line 137, in __init__
Application.__init__(self)
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 82, in __init__
self._node = Node()
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/easy/node.py", line 48, in __init__
self.ant = Ant()
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/ant.py", line 59, in __init__
self._driver.open()
File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/driver.py", line 187, in open
alternate_setting = usb.control.get_interface(dev, interface_number)
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/control.py", line 242, in get_interface
data_or_wLength = 1
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/core.py", line 729, in ctrl_transfer
self.__get_timeout(timeout)
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 819, in ctrl_transfer
timeout))
File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 554, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno None] Unknown error
Interrupted: [Errno None] Unknown error
Do you know another way how to get activities from Garmin FR 610?
Hm, what version of libusb are you using? I don't have access to a mac, so I haven't tried this program at all on the mac -- but I think it should be possible to get it work with some tweaks. I'm not sure if it is a permission issue (udev rules are required for linux) or something in the initialization code here or something in the usb libraries.
On 25 March 2014 22:38, Erik Telepovský notifications@github.com wrote:
It didn't help :/
Driver available: [<class ant.base.driver.USB2Driver at 0x10e710a78>, <class ant.base.driver.USB3Driver at 0x10e710b48>]
- Using: ant.base.driver.USB3Driver Traceback (most recent call last): File "garmin.py", line 336, in main g = Garmin(options.upload) File "garmin.py", line 137, in init Application.init(self) File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 82, in init self._node = Node() File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/easy/node.py", line 48, in init self.ant = Ant() File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/ant.py", line 59, in init self._driver.open() File "/Users/erik/src/python/Garmin-Forerunner-610-Extractor/ant/base/driver.py", line 187, in open alternate_setting = usb.control.get_interface(dev, interface_number) File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/control.py", line 242, in get_interface data_or_wLength = 1 File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/core.py", line 729, in ctrl_transfer self.__get_timeout(timeout) File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 819, in ctrl_transfer timeout)) File "/Users/erik/env/garmin/lib/python2.7/site-packages/usb/backend/libusb1.py", line 554, in _check raise USBError(_str_error[ret], ret, _libusb_errno[ret]) USBError: [Errno None] Unknown error Interrupted: [Errno None] Unknown error
Do you know another way how to get activities from Garmin FR 610?
— Reply to this email directly or view it on GitHubhttps://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/92#issuecomment-38624327 .
Any update with this? :(
No update. Still don't have access to a mac. What version of libusb are you using?
I got it working on my Macbook Pro running OS X Mavericks without any trouble. I wrote up instructions suitable for mostly non-technical people here:
http://chuckwolber.blogspot.com/2014/06/downloading-garmin-fit-files-manually.html
As for the error in question, I was able to get that to happen if I was not careful about the order in which I did things. You must first start with the watch turned off and the ANT stick unplugged. First turn the watch on (in my case it is a Garmin 910XT), and wait for it to FULLY start up. Wait a moment, and then plug in the ANT stick. Only after all of that happens can you run the garmin.py script.
It also appears as if you must not wait too long between steps. I did not experiment too broadly, but it seemed like if I ran garmin.py too long after I plugged in the stick, things did not work right. I also had issues if I waited too long to respond to the pairing request.
Update: I was able to get a stack trace almost identical to the OP when Garmin Express was running in the background. The solution is to simply shut down Garmin Express before you attempt to use the extractor. The same probably applies if you are running some other tool that accesses the ANT USB stick.
I have the exact same problem on OpenSuse 13.1, trying to communicate with my 310XT. (The line 180 trick does not work here either) I am using fresh Github versions of both pyusb and extractor.
@ktw what version of libusb do you have, and what version of the ANT USB Stick?
Ah, mine could be too old :-( Bus 003 Device 003: ID 0fcf:1004 Dynastream Innovations, Inc. ANT2USB
The 1004 doesn't work yet unfortunately. The newer sticks should work though -- they are available for purchase individually, but can still be quite expensive. It should be possible to make the 1004 work as well but I haven't succeeded in doing that yet.
On 18 July 2014 10:19, Kim Trolle Wadum notifications@github.com wrote:
Ah, mine could be too old :-( Bus 003 Device 003: ID 0fcf:1004 Dynastream Innovations, Inc. ANT2USB
— Reply to this email directly or view it on GitHub https://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/92#issuecomment-49406577 .
What about other compatible units, has there been any testing in that direction? http://www.dcrainmaker.com/2012/02/much-better-usb-ant-stick-for-your.html The Suunto unit seems to be fairly cheap, and easier to find than the Garmin stick.
I'm assuming both of these are just branded versions of the http://www.thisisant.com/developer/components/antusb-m/ ANT USB-m stick -- but I'm not 100% sure. I have bought an unbranded version of this ANTUSB-m stick and it works very nice.
On 18 July 2014 10:39, Kim Trolle Wadum notifications@github.com wrote:
What about other compatible units, has there been any testing in that direction? http://www.dcrainmaker.com/2012/02/much-better-usb-ant-stick-for-your.html The Suunto unit seems to be fairly cheap, and easier to find than the Garmin stick.
— Reply to this email directly or view it on GitHub https://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/92#issuecomment-49408006 .
I will give it a try, and let you know how it turns out :-) Edit: Just ordered a Suunto Movestick Mini.
You can add the cheap Suunto Movestick Mini to the positive list :-) ID 0fcf:1008 Dynastream Innovations, Inc. Mini stick Suunto Works perfect.
Excellent! But it is still 0fcf:1008? I would have expected this one to have the 0fcf:1009 id.
On 19 July 2014 16:34, Kim Trolle Wadum notifications@github.com wrote:
You can add the cheap Suunto Movestick Mini to the positive list :-) ID 0fcf:1008 Dynastream Innovations, Inc. Mini stick Suunto Works perfect.
— Reply to this email directly or view it on GitHub https://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/92#issuecomment-49511105 .
I got this exception (using Garmin Forerunner 610 on Mac OSX 10.9.2, Python 2.7.5):