Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
312 stars 76 forks source link

AttributeError: /usr/lib64/libusb-1.0.so.0: undefined symbol: libusb_strerror #103

Closed janisg closed 10 years ago

janisg commented 10 years ago

Hello, I am trying to use the Extractor on Centos (Linux 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux) with ANT USB-m stick and Forerunner 910XT.

I am struggling to figure out what is going on, - is it Extractor, Python 2.7/2.6 issues, libusb issues or the stick?

Here is the output from a try:

[root@pc Garmin-Forerunner-610-Extractor]# env PYTHONPATH=/home/janisg/Software/garmin/pyusb python2.7 ./garmin.py Driver available: [<class ant.base.driver.USB2Driver at 0xeabc80>, <class ant.base.driver.USB3Driver at 0xeabce8>]

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 "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 117, in init raise e AntException: Timed out while waiting for message Interrupted: Timed out while waiting for message

And here is the log file: MainThread 2014-08-05 09:04:32,350 garmin.ant.base.driver DEBUG USB Find device, vendor 0xfcf, product 0x1009 (driver.py:153) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG USB Config values: (driver.py:160) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Config 1 (driver.py:162) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Interface 0, Alt 0 (driver.py:164) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Endpoint 129 (driver.py:166) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Endpoint 1 (driver.py:166) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG No kernel driver active (driver.py:174) MainThread 2014-08-05 09:04:32,519 garmin.ant.base.driver DEBUG UBS Endpoint out: ENDPOINT 0x1: Bulk OUT =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x1 OUT bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x1, 1 (driver.py:202) MainThread 2014-08-05 09:04:32,519 garmin.ant.base.driver DEBUG UBS Endpoint in: ENDPOINT 0x81: Bulk IN =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x1, 129 (driver.py:213) ant.base 2014-08-05 09:04:32,520 garmin.ant.base.ant DEBUG Ant runner started (ant.py:103) MainThread 2014-08-05 09:04:32,523 garmin.ant.base.ant DEBUG Write data: a4 01 4a 00 ef ant.base 2014-08-05 09:04:32,523 garmin.ant.base.ant DEBUG Read data: [a4 01 6f 20 ea](now have [a4 01 6f 20 ea] in buffer) (ant.py:218) MainThread 2014-08-05 09:04:33,526 garmin.ant.base.ant DEBUG Write data: a4 09 46 00 a8 a4 23 b9 f5 5e 63 c1 74 MainThread 2014-08-05 09:04:33,527 garmin.ant.easy.filter DEBUG wait for message matching <function match at 0x1072a28> (filter.py:37) MainThread 2014-08-05 09:04:33,527 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:33,528 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:34,528 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:34,529 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:35,529 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:35,530 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:36,530 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:36,531 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:37,532 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:37,532 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:38,533 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:38,533 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:39,534 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:39,534 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:40,535 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:40,535 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:41,536 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:41,536 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:42,537 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:42,537 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0x1072a28> (filter.py:55) MainThread 2014-08-05 09:04:43,538 garmin.ant.easy.node DEBUG Stoping ant.easy (node.py:124) MainThread 2014-08-05 09:04:43,538 garmin.ant.base.ant DEBUG Stoping ant.base (ant.py:71) MainThread 2014-08-05 09:04:44,531 garmin ERROR 'Traceback (most recent call last):' (garmin.py:353) MainThread 2014-08-05 09:04:44,531 garmin ERROR ' File "./garmin.py", line 336, in main' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' g = Garmin(options.upload)' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' File "./garmin.py", line 137, in init' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' Application.init(self)' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' File "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 117, in init' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' raise e' (garmin.py:353) MainThread 2014-08-05 09:04:44,533 garmin ERROR 'AntException: Timed out while waiting for message' (garmin.py:353)

All help will be highly appreciated! The best, - Janis

Tigge commented 10 years ago

This is probably a mismatch between the pyusb and libusb version/type. Or yeah, it seems complicated. The related bug on pyusb for this is < https://github.com/walac/pyusb/issues/57>.

On 5 August 2014 09:23, janisg notifications@github.com wrote:

Hello, I am trying to use the Extractor on Centos (Linux 2.6.32-431.17.1.el6.x86_64 #1 https://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux) with ANT USB-m stick and Forerunner 910XT.

I am struggling to figure out what is going on, - is it Extractor, Python 2.7/2.6 issues, libusb issues or the stick?

Here is the output from a try:

[root@pc Garmin-Forerunner-610-Extractor]# env PYTHONPATH=/home/janisg/Software/garmin/pyusb python2.7 ./garmin.py Driver available: [, ]

  • Using: ant.base.driver.USB3Driver Exception in thread ant.base: Traceback (most recent call last): File "/usr/local/lib/python2.7/threading.py", line 810, in _bootstrap_inner self.run() File "/usr/local/lib/python2.7/threading.py", line 763, in run self.target(_self.__args, *_self.kwargs) File "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/base/ant.py", line 107, in _worker message = self.read_message() File "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/base/ant.py", line 215, in read_message data = self._driver.read() File "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/base/driver.py", line 221, in read return self._in.read(4096) File "/home/janisg/Software/garmin/pyusb/usb/core.py", line 364, in read return self.device.read(self, size_or_buffer, timeout) File "/home/janisg/Software/garmin/pyusb/usb/core.py", line 918, in read self.get_timeout(timeout)) File "/home/janisg/Software/garmin/pyusb/usb/backend/libusb1.py", line 769, in bulk_read timeout) File "/home/janisg/Software/garmin/pyusb/usb/backend/libusb1.py", line 872, in read _check(retval) File "/home/janisg/Software/garmin/pyusb/usb/backend/libusb1.py", line 552, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) File "/home/janisg/Software/garmin/pyusb/usb/backend/libusb1.py", line 541, in _strerror return _lib.libusb_strerror(errcode).decode('utf8') File "/usr/local/lib/python2.7/ctypes/_init.py", line 378, in getattr func = self.getitem(name) File "/usr/local/lib/python2.7/ctypes/ init.py", line 383, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /usr/lib64/libusb-1.0.so.0: undefined symbol: libusb_strerror

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 "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 117, in init raise e AntException: Timed out while waiting for message Interrupted: Timed out while waiting for message

And here is the log file: MainThread 2014-08-05 09:04:32,350 garmin.ant.base.driver DEBUG USB Find device, vendor 0xfcf, product 0x1009 (driver.py:153) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG USB Config values: (driver.py:160) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Config 1 (driver.py:162) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Interface 0, Alt 0 (driver.py:164) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Endpoint 129 (driver.py:166) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG Endpoint 1 (driver.py:166) MainThread 2014-08-05 09:04:32,355 garmin.ant.base.driver DEBUG No kernel driver active (driver.py:174) MainThread 2014-08-05 09:04:32,519 garmin.ant.base.driver DEBUG UBS Endpoint out: ENDPOINT 0x1: Bulk OUT =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x1 OUT bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x1, 1 (driver.py:202) MainThread 2014-08-05 09:04:32,519 garmin.ant.base.driver DEBUG UBS Endpoint in: ENDPOINT 0x81: Bulk IN =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x1, 129 (driver.py:213) ant.base 2014-08-05 09:04:32,520 garmin.ant.base.ant DEBUG Ant runner started (ant.py:103) MainThread 2014-08-05 09:04:32,523 garmin.ant.base.ant DEBUG Write data: a4 01 4a 00 ef ant.base 2014-08-05 09:04:32,523 garmin.ant.base.ant DEBUG Read data: a4 01 6f 20 ea (ant.py:218) MainThread 2014-08-05 09:04:33,526 garmin.ant.base.ant DEBUG Write data: a4 09 46 00 a8 a4 23 b9 f5 5e 63 c1 74 MainThread 2014-08-05 09:04:33,527 garmin.ant.easy.filter DEBUG wait for message matching (filter.py:37) MainThread 2014-08-05 09:04:33,527 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:33,528 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:34,528 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:34,529 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:35,529 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:35,530 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:36,530 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:36,531 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:37,532 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:37,532 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:38,533 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:38,533 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:39,534 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:39,534 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:40,535 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:40,535 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:41,536 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:41,536 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:42,537 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 111, array('B', [32]))]) (filter.py:40) MainThread 2014-08-05 09:04:42,537 garmin.ant.easy.filter DEBUG - could not find response matching (filter.py:55) MainThread 2014-08-05 09:04:43,538 garmin.ant.easy.node DEBUG Stoping ant.easy (node.py:124) MainThread 2014-08-05 09:04:43,538 garmin.ant.base.ant DEBUG Stoping ant.base (ant.py:71) MainThread 2014-08-05 09:04:44,531 garmin ERROR 'Traceback (most recent call last):' (garmin.py:353) MainThread 2014-08-05 09:04:44,531 garmin ERROR ' File "./garmin.py", line 336, in main' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' g = Garmin(options.upload)' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' File "./garmin.py", line 137, in init' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' Application.init(self)' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' File "/home/janisg/Software/garmin/Garmin-Forerunner-610-Extractor/ant/fs/manager.py", line 117, in init' (garmin.py:353) MainThread 2014-08-05 09:04:44,532 garmin ERROR ' raise e' (garmin.py:353) MainThread 2014-08-05 09:04:44,533 garmin ERROR 'AntException: Timed out while waiting for message' (garmin.py:353)

All help will be highly appreciated! The best, - Janis

— Reply to this email directly or view it on GitHub https://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/103.

janisg commented 10 years ago

Thanks a lot! I just installed libusb version 1.0.19, specified the path in LD_LIBRARY_PATH env variable and it worked as expected!

It seems that there has done a change in libusb software at version 1.0.16: 2013-07-11: v1.0.16

Tigge commented 10 years ago

Yeah, the whole libusb situation seems a bit messy. I counted to four separate implementations -- confusion! Good to see that you managed to work around this.