Discussion:
[pyusb-users] Problem with Ubuntu 10.04
Alan Jhonn Aguiar Schwyn
2015-08-16 01:57:08 UTC
Permalink
Hi,
I now that Ubuntu 10.04 (Lucid) has end their support, but I have to mantaina program for it.The problem I don't know where is, but is a recent change.The tag "1.0.0b2" works fine but the latest commit of master git not works.
d = usb.core.find()Traceback (most recent call last): File "<stdin>", line 1, in <module> File "usb/core.py", line 1252, in find return _interop._next(device_iter(k, v)) File "usb/_interop.py", line 60, in _next return next(iter) File "usb/core.py", line 1221, in device_iter d = Device(dev, backend) File "usb/core.py", line 728, in __init__ desc = backend.get_device_descriptor(dev) File "usb/backend/libusb1.py", line 722, in get_device_descriptor dev_desc.speed = self.lib.libusb_get_device_speed(dev.devid) File "/usr/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__ func = self._FuncPtr((name_or_ordinal, self))AttributeError: /lib/libusb-1.0.so.0: undefined symbol: libusb_get_device_speed
Seems that this version of LibUSB has not implemented get_device_speed ??
Regards!
Alan
Alan Jhonn Aguiar Schwyn
2015-08-16 02:54:07 UTC
Permalink
Hi again,
I found the problem. Ubuntu 10.04 has libusb 1-0.0 package version: 2:1.0.6-1.The self.lib object has this properties:
['_FuncPtr', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_func_flags_', '_func_restype_', '_handle', '_name', 'libusb_alloc_transfer', 'libusb_attach_kernel_driver', 'libusb_bulk_transfer', 'libusb_claim_interface', 'libusb_clear_halt', 'libusb_close', 'libusb_control_transfer', 'libusb_detach_kernel_driver', 'libusb_exit', 'libusb_fill_iso_transfer', 'libusb_free_config_descriptor', 'libusb_free_device_list', 'libusb_free_transfer', 'libusb_get_bus_number', 'libusb_get_config_descriptor', 'libusb_get_configuration', 'libusb_get_device_address', 'libusb_get_device_descriptor', 'libusb_get_device_list', 'libusb_get_max_iso_packet_size', 'libusb_get_string_descriptor_ascii', 'libusb_init', 'libusb_interrupt_transfer', 'libusb_kernel_driver_active', 'libusb_open', 'libusb_ref_device', 'libusb_release_interface', 'libusb_reset_device', 'libusb_set_configuration', 'libusb_set_debug', 'libusb_set_interface_alt_setting', 'libusb_set_iso_packet_lengths', 'libusb_submit_transfer', 'libusb_unref_device']
I made a workarround for get_speed property..
https://github.com/walac/pyusb/pull/109
Someone can check it?
Regards!
Alan


From: ***@hotmail.com
To: pyusb-***@lists.sourceforge.net
Date: Sat, 15 Aug 2015 22:57:08 -0300
Subject: [pyusb-users] Problem with Ubuntu 10.04




Hi,
I now that Ubuntu 10.04 (Lucid) has end their support, but I have to mantaina program for it.The problem I don't know where is, but is a recent change.The tag "1.0.0b2" works fine but the latest commit of master git not works.
d = usb.core.find()Traceback (most recent call last): File "<stdin>", line 1, in <module> File "usb/core.py", line 1252, in find return _interop._next(device_iter(k, v)) File "usb/_interop.py", line 60, in _next return next(iter) File "usb/core.py", line 1221, in device_iter d = Device(dev, backend) File "usb/core.py", line 728, in __init__ desc = backend.get_device_descriptor(dev) File "usb/backend/libusb1.py", line 722, in get_device_descriptor dev_desc.speed = self.lib.libusb_get_device_speed(dev.devid) File "/usr/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__ func = self._FuncPtr((name_or_ordinal, self))AttributeError: /lib/libusb-1.0.so.0: undefined symbol: libusb_get_device_speed
Seems that this version of LibUSB has not implemented get_device_speed ??
Regards!
Alan






------------------------------------------------------------------------------
Xiaofan Chen
2015-08-16 12:06:06 UTC
Permalink
On Sun, Aug 16, 2015 at 10:54 AM, Alan Jhonn Aguiar Schwyn
Post by Alan Jhonn Aguiar Schwyn
Hi again,
2:1.0.6-1.
I made a workarround for get_speed property..
https://github.com/walac/pyusb/pull/109
Someone can check it?
Why not just upgrade libusb to the latest release
under Ubuntu 10.04?
--
Xiaofan

------------------------------------------------------------------------------
Loading...