Closed emanuelstanciu closed 9 years ago
OpenWRT was always on my list :-) The psutil is not necessary, it's just there for the control script to display CPU usage with the following command:
blinkstick --cpu-usage
You can download the zip file for the BlinkStick pip package, remove the psutil reference from the setup.py and remove it from bin/blinkstick file and you should be good to go. You would lack this feature, however.
If there was any way for me to detect that the setup.py script is being run inside OpenWRT, then I could easily add conditional code to disable the cpu usage feature for OpenWRT. Unfortunately I don't have an OpenWRT enabled router now to test this.
Oh, just remembered that we also have plans on removing the additional dependencies for third party pip packages only used in the control script. The idea is to make BlinkStick pip package lean and then add an option to download the script separately.
Solved this one as suggested, removed reference from the setup.py and bin/blinkstick. However, the system doesn't recognise the blinkstick now, and this might be the biggest problem ever. Do I need any sort of special drivers for OpenWRT? BlinkStick control script 0.7.0 (c) Agile Innovative Ltd 2013
Traceback (most recent call last):
File "/usr/bin/blinkstick", line 5, in group
and name
are yielded (in distribution order).
File "build/bdist.linux-mips/egg/pkg_resources.py", line 1348, in run_script
self.zipinfo = zipimport._zip_directory_cache[self.loader.archive]
File "/usr/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/EGG-INFO/scripts/blinkstick", line 308, in
File "/usr/lib/python2.7/site-packages/BlinkStick-0.7.0-py2.7.egg/EGG-INFO/scripts/blinkstick", line 231, in main
File "build/bdist.linux-mips/egg/blinkstick/blinkstick.py", line 397, in find_all File "build/bdist.linux-mips/egg/blinkstick/blinkstick.py", line 389, in _find_blicksticks File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find raise ValueError('No backend available') ValueError: No backend available
Also, the system is no displaying anything in /dev
This is actually a different issue. PyUSB is complaining that there is no backend available to interface USB device. Normally PyUSB uses libusb on Linux to access USB devices. Is it installed on OpenWRT? I've also read somewhere that this issue can happen when PyUSB can't find libusb on the system if it's installed in a non standard location.
I have PyUSB and libusb, everything is installed and communicating properly. The issue is that the usb connection is not working properly as it is not recognised in /dev root@ComputeNode:~# ls dev ls: dev: No such file or directory root@ComputeNode:~# ls /dev bus mem mtd2ro mtd5ro mtdblock5 ptmx shm ttyS11 ttyS3 ttyS9 console mtd0 mtd3 mtdblock0 network_latency pts tty ttyS12 ttyS4 urandom cpu_dma_latency mtd0ro mtd3ro mtdblock1 network_throughput random ttyATH0 ttyS13 ttyS5 watchdog full mtd1 mtd4 mtdblock2 null sda ttyS0 ttyS14 ttyS6 zero kmsg mtd1ro mtd4ro mtdblock3 port sda1 ttyS1 ttyS15 ttyS7 log mtd2 mtd5 mtdblock4 ppp sda2 ttyS10 ttyS2 ttyS8 root@ComputeNode:~# blinkstick BlinkStick control script 0.7.0 (c) Agile Innovative Ltd 2013
Traceback (most recent call last):
File "/usr/bin/blinkstick", line 340, in
But USB is recognised with dmesg when I plug the blinkstick: [ 324.390000] usb 1-1.5.4: USB disconnect, device number 7 [ 334.110000] usb 1-1.5.4: new low-speed USB device number 9 using ehci-platform
So I think it's a driver issue. I installed kmod-usb-core and kmod-usb-acm, acm which is recommended around the net for Arduino serial communication, but still no luck. Any other idea?
BlinkStick is a HID device, It acts more like a keyboard/mouse rather than Arduino. You probably need to ensure that HID devices are supported with the kernel module.
This might be a good place to start:
psutil is no longer a dependency since 1.0
I tried to install the blinkstick python on openwrt and everything installs fine (see PyUSB comment) except for psutil, which throws the following error: unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory error: Setup script exited with error: command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1 Unfortunately it's hard and complicated to install a cross-compiler on an openwrt and other set-ups need to be accommodated for. Can you either provide a compiled version or simpler, does the library actually makes use of psutil?