arvydas / blinkstick-python

BlinkStick Python interface to control devices connected to the computer
Other
136 stars 53 forks source link

Error at run blinkstick #41

Closed Inoku-anoza closed 8 years ago

Inoku-anoza commented 8 years ago

Hi,

I'm trying using a blinkstick nano, but when i run the blinkstick command using python i get an error.

OS CentOS 6.6 kernel 2.6.32-431 Pyton version 2.7.6 pyusb version 1.0.0.0b1

blinkstick usb on "/var/log/messages"

Jun 14 09:27:20 localhost kernel: usb 2-1.1: USB disconnect, device number 3 Jun 14 09:27:23 localhost kernel: usb 2-1.1: new low speed USB device number 4 using ehci_hcd Jun 14 09:27:23 localhost kernel: usb 2-1.1: New USB device found, idVendor=20a0, idProduct=41e5 Jun 14 09:27:23 localhost kernel: usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jun 14 09:27:23 localhost kernel: usb 2-1.1: Product: BlinkStick Nano Jun 14 09:27:23 localhost kernel: usb 2-1.1: Manufacturer: Agile Innovative Ltd Jun 14 09:27:23 localhost kernel: usb 2-1.1: SerialNumber: BS005425-3.0 Jun 14 09:27:23 localhost kernel: usb 2-1.1: configuration #1 chosen from 1 choice Jun 14 09:27:23 localhost kernel: generic-usb 0003:20A0:41E5.0002: hiddev96,hidraw0: USB HID v1.01 Device [Agile Innovative Ltd BlinkStick Nano] on usb-0000:00:1d.0-1.1/input0

This is what blinkstick return to screen when i execute it: Traceback (most recent call last): File "/usr/local/bin/blinkstick", line 332, in <module> sys.exit(main()) File "/usr/local/bin/blinkstick", line 221, in main sticks = blinkstick.find_all() File "/usr/local/lib/python2.7/site-packages/blinkstick/blinkstick.py", line 1497, in find_all result.extend([BlinkStick(device=d)]) File "/usr/local/lib/python2.7/site-packages/blinkstick/blinkstick.py", line 207, in __init__ self.open_device(device) File "/usr/local/lib/python2.7/site-packages/blinkstick/blinkstick.py", line 750, in open_device if self.device.is_kernel_driver_active(0): File "/usr/local/lib/python2.7/site-packages/usb/core.py", line 721, in is_kernel_driver_active self._ctx.get_interface(self, interface).bInterfaceNumber) File "/usr/local/lib/python2.7/site-packages/usb/backend/__init__.py", line 355, in is_kernel_driver_active _not_implemented(self.is_kernel_driver_active) File "/usr/local/lib/python2.7/site-packages/usb/backend/__init__.py", line 79, in _not_implemented raise NotImplementedError(func.__name__) NotImplementedError: is_kernel_driver_active

Thanks.

arvydas commented 8 years ago

Can you try this:

https://github.com/arvydas/blinkstick-python/wiki/NotImplementedError-is_kernel_driver_active-on-some-Linux-systems

Inoku-anoza commented 8 years ago

I made it and the same result.

arvydas commented 8 years ago

Ok, I'll see if I can reproduce this.

Inoku-anoza commented 8 years ago

If this info can help, the centOS is a minimal instalation where i installed de tools and libraries that i need for my proyect.

arvydas commented 8 years ago

Luckily I'm already downloading the minimal installation :). Will install it into a VM and hopefully should be able to reproduce your issue.

Inoku-anoza commented 8 years ago

Thank you, I remain to wait of answers :).

arvydas commented 8 years ago

Do you have libusb1 installed? If not, can you install it via this command:

yum install -y libusb1

and let me know if it solves your issue?

Inoku-anoza commented 8 years ago

This was the problem, i had libusb but not libusb1, issue solved. Thank you very much.

arvydas commented 8 years ago

Glad to hear this is sorted now. Thanks for spotting this and providing all the details to reproduce it :)