arvydas / blinkstick-python

BlinkStick Python interface to control devices connected to the computer
Other
135 stars 52 forks source link

Error on synology #21

Open koen01 opened 10 years ago

koen01 commented 10 years ago

I get an error when trying my blinkstick on a Synology D213j. See the python error below; Dmesg shows this: [366402.501085] usb 1-1: new low-speed USB device number 3 using ehci_marvell [366402.742338] Get empty minor:104 [366402.764126] generic-usb 0003:20A0:41E5.0002: hiddev0: USB HID v1.01 Device [Agile Innovative Ltd BlinkStick] on usb-ehci_marvell.0-1/input0

Any ideas as to resolve this?

DiskStation> blinkstick --pulse --set-color blue BlinkStick control script 0.7.0 (c) Agile Innovative Ltd 2013

Traceback (most recent call last): File "/usr/local/bin/blinkstick", line 5, in pkg_resources.run_script('BlinkStick==0.7.0', 'blinkstick') File "/usr/local/packages/@appstore/Python/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 499, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/packages/@appstore/Python/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 1235, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/packages/@appstore/Python/usr/local/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/EGG-INFO/scripts/blinkstick", line 340, in sys.exit(main()) File "/usr/local/packages/@appstore/Python/usr/local/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/EGG-INFO/scripts/blinkstick", line 248, in main sticks = blinkstick.find_all() File "/usr/local/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/blinkstick/blinkstick.py", line 397, in find_all return [BlinkStick(device=d) for d in _find_blicksticks()] File "/usr/local/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/blinkstick/blinkstick.py", line 35, in init self.open_device(device) File "/usr/local/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/blinkstick/blinkstick.py", line 358, in open_device if self.device.is_kernel_driver_active(0): File "/usr/local/packages/@appstore/Python/usr/local/lib/python2.7/site-packages/usb/core.py", line 704, in is_kernel_driver_active return self._ctx.backend.is_kernel_driver_active(self._ctx.handle, interface) File "/usr/local/packages/@appstore/Python/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/packages/@appstore/Python/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

arvydas commented 10 years ago

Does it have libusb installed?

koen01 commented 10 years ago

I think it does, there are libusb.so files in /lib/ Op 25 mrt. 2014 22:11 schreef "Arvydas Juskevicius" < notifications@github.com>:

Does it have libusb installed?

Reply to this email directly or view it on GitHubhttps://github.com/arvydas/blinkstick-python/issues/21#issuecomment-38621293 .

koen01 commented 10 years ago

I just got home and libusb is installed and the blinkstick is detected by libusbtest: DiskStation> ./testlibusb Dev #1: Linux 3.2.40 ehci_hcd - Marvell Orion EHCI Dev #1: Linux 3.2.40 ehci_hcd - Marvell Orion EHCI Dev #2: Agile Innovative Ltd - BlinkStick

Does this give you any idea in which direction to look? I hope it's just not kernel related... Maybe pyusb?

arvydas commented 10 years ago

It's something related to pyusb as it's complaining that it can't find is_kernel_driver_active function. What version of Python and what version of PyUSB do you have installed?

koen01 commented 10 years ago

Python 2.7.3 pyusb 1.0.0b1

i reinstalled blinkstick, pyusb and libusb, and now get the no backend error.. but the mac os fix doesn't seem to work on synology.

I have libusb symlinks in /lib/ /usr/lib/ and /usr/local/lib/ is there a env variable perhaps that is wrong/missing?

arvydas commented 9 years ago

@koen01 can you please check if this issue still persists with the latest version of BlinkStick library for Python?

arvydas commented 9 years ago

Closing this as I haven't heard back

koen01 commented 9 years ago

Yeah sorry, am away on travels for 4 weeks sorry Op 3 okt. 2014 20:11 schreef "Arvydas Juskevicius" <notifications@github.com

:

Closing this as I haven't heard back

— Reply to this email directly or view it on GitHub https://github.com/arvydas/blinkstick-python/issues/21#issuecomment-57832778 .

arvydas commented 9 years ago

No problem. Just let me know if it's still an issue and I will reopen.

fxlv commented 9 years ago

Hey,

looks like the same or similar issue on a RaspberryPi (mode b+)

[fx@wipi ~]$ sudo blinkstick --info
Traceback (most recent call last):
  File "/usr/local/bin/blinkstick", line 308, in <module>
    sys.exit(main())
  File "/usr/local/bin/blinkstick", line 206, in main
    sticks = blinkstick.find_all()
  File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 1470, in find_all
    result.extend([BlinkStick(device=d)])
  File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 206, in __init__
    self.open_device(device)
  File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 722, in open_device
    if self.device.is_kernel_driver_active(0):
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 992, in is_kernel_driver_active
    interface)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/__init__.py", line 363, in is_kernel_driver_active
    _not_implemented(self.is_kernel_driver_active)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/__init__.py", line 79, in _not_implemented
    raise NotImplementedError(func.__name__)
NotImplementedError: is_kernel_driver_active

Installed stuff by following http://www.blinkstick.com/help/raspberry-pi-integration

What more debugging info can I provide in order to solves this?

arvydas commented 9 years ago

I have a B+ model. Will test this and will let you know. What OS are you using with RPi?

fxlv commented 9 years ago

It runs Raspbian 7.6 and BlinkStick control script 1.1.4

arvydas commented 9 years ago

Thanks for the info.

gfountis commented 9 years ago

Hello, just got my BlinkStick and I'm experiencing the same issue under debian wheezy, with the latest BlinkStick library (1.4) and libusb 1.0.0 :-(

root@athena:~# blinkstick Traceback (most recent call last): File "/usr/local/bin/blinkstick", line 308, in sys.exit(main()) File "/usr/local/bin/blinkstick", line 206, in main sticks = blinkstick.find_all() File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 1470, in find_all result.extend([BlinkStick(device=d)]) File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 206, in init self.open_device(device) File "/usr/local/lib/python2.7/dist-packages/blinkstick/blinkstick.py", line 722, in open_device if self.device.is_kernel_driver_active(0): File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 992, in is_kernel_driver_active interface) File "/usr/local/lib/python2.7/dist-packages/usb/backend/init.py", line 363, in is_kernel_driver_active _not_implemented(self.is_kernel_driver_active) File "/usr/local/lib/python2.7/dist-packages/usb/backend/init.py", line 79, in _not_implemented raise NotImplementedError(func.name) NotImplementedError: is_kernel_driver_active root@athena:~# root@athena:~# root@athena:~# tail -f /var/log/messages Nov 5 16:01:57 athena kernel: [ 26.605378] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Nov 5 16:01:58 athena kernel: [ 27.297313] postgres (3286): /proc/3286/oom_adj is deprecated, please use /proc/3286/oom_score_adj instead. Nov 5 16:06:47 athena rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2147" x-info="http://www.rsyslog.com"] rsyslogd was HUPed Nov 5 19:14:34 athena kernel: [11584.540101] usb 4-1: new low-speed USB device number 2 using uhci_hcd Nov 5 19:14:34 athena kernel: [11584.725137] usb 4-1: New USB device found, idVendor=20a0, idProduct=41e5 Nov 5 19:14:34 athena kernel: [11584.725146] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Nov 5 19:14:34 athena kernel: [11584.725153] usb 4-1: Product: BlinkStick Nov 5 19:14:34 athena kernel: [11584.725158] usb 4-1: Manufacturer: Agile Innovative Ltd Nov 5 19:14:34 athena kernel: [11584.725163] usb 4-1: SerialNumber: BS001353-1.4 Nov 5 19:14:34 athena kernel: [11584.768358] generic-usb 0003:20A0:41E5.0003: hiddev0,hidraw2: USB HID v1.01 Device [Agile Innovative Ltd BlinkStick] on usb-0000:00:1a.1-1/input0

arvydas commented 9 years ago

@gfountis I managed to reproduce it, looking for a solution now. Will let you know when as soon as I have one.

arvydas commented 9 years ago

There seems to be a regression in PyUSB 1.0.0b2 on some Linux based operating systems, downgrading to b1 should solve this issue.

If you already have BlinkStick Python package installed, please run the following commands:

sudo pip uninstall -y pyusb
sudo pip install pyusb==1.0.0b1

If you don't have BlinkStick Python package already installed on the system, run the following commands:

sudo pip install pyusb==1.0.0b1
sudo pip install blinkstick

Test by running the following command:

sudo blinkstick --info

If you don't want to run BlinkStick command script with sudo, please follow these instructions:

https://github.com/arvydas/blinkstick-python#permission-problems-in-linux-and-mac-os-x

I will try to find a solution to permanently add a workaround for BlinkStick pip package.

gfountis commented 9 years ago

Thanks alot arvydas! it's working now :-)

arvydas commented 9 years ago

@gfountis thanks for letting me know :-)

Conan-Kudo commented 8 years ago

@arvydas is this still an issue with pyusb 1.0.0rc1? It was recently released and it'd be good to know if it's still an issue...