pyusb

PyUSB backend not accessible

…衆ロ難τιáo~ 提交于 2019-12-01 05:34:24
hey i am trying to run the simple script available in the tutorial;. the usb is getting imported but when i try to search the device i get the following error,please help >>> dev=usb.core.find() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\usb\core.py", line 819, in find raise ValueError('No backend available') ValueError: No backend available You need to install libusb-1.0, libusb-0.1, or openusb as a backend to pyusb. Is this a Windows machine? If so, you can download a simple installer here: http://www.craftedge.com/products

PyUSB send HID report

a 夏天 提交于 2019-12-01 00:58:08
UPDATE I managed it to send the data properly. For anyone how ran into the same problem, I used the following code: data=[0x00, 0x04, 0x04, 0xFF, 0xFF, 0xFF, 0x00, 0x00] result=dev.ctrl_transfer(0x21, 0x9, wValue=0x200, wIndex=0x00, data_or_wLength=data) (this is based on the answer posted here: link ) But I don't understand in detail, why I have to use bmRequestType=0x21 bRequest=0x9 wValue=0x200 If anyone could explain it in more detail, I would be grateful. I just want to learn. Initial request: I'm desperately trying to send a simple report to a HID-device using PyUSB. Using

Install pyUSB 0.4.3 on OSX Lion 10.7.3

倖福魔咒の 提交于 2019-11-30 20:27:30
问题 I'm trying to install pyusb 0.4.3 on Mac OS X Lion 10.7.3 running Xcode 4.3 (the new Mac App Store .app with command line tools installed). When I try to "python setup.py install" I get this long list of error ending with "error: command 'llvm-gcc-4.2' failed with exit status 1": http://pastebin.com/R8id7Qf7 pyUSB 1.0alpha2 installs fine. Any ideas? I'm a bit of Unix noob so please explain accordingly. Thanks 回答1: It looks like you don't have libusb installed. Try here: http://www.anyma.ch

PyUSB send HID report

徘徊边缘 提交于 2019-11-30 19:39:28
问题 UPDATE I managed it to send the data properly. For anyone how ran into the same problem, I used the following code: data=[0x00, 0x04, 0x04, 0xFF, 0xFF, 0xFF, 0x00, 0x00] result=dev.ctrl_transfer(0x21, 0x9, wValue=0x200, wIndex=0x00, data_or_wLength=data) (this is based on the answer posted here: link ) But I don't understand in detail, why I have to use bmRequestType=0x21 bRequest=0x9 wValue=0x200 If anyone could explain it in more detail, I would be grateful. I just want to learn. Initial

Why does PyUSB / libusb require root (sudo) permissions on Linux?

橙三吉。 提交于 2019-11-30 08:59:10
I have been toying around with PyUSB lately, and found that it works beautifully on Linux (Ubuntu has libusb 0.1 and 1.0, as well as OpenUSB )... but only if I run the program with root privileges (with sudo , of course). Can anyone tell me why it requires elevated privileges and, more importantly, if I can change the permissions somehow to make it work for normal user accounts? libusb allows you to manipulate arbitrary USB devices in arbitrary ways. You could format an external USB harddisk, for example. In general, all direct hardware access requires root privileges, although I guess that

pyusb 2.7 windows install error

不羁的心 提交于 2019-11-29 18:02:42
I know similar things have been asked, but none of the solutions work for me/I get different errors. I am trying to install PyUSB on a 64-bit Windows 7 VM, with Python 2.7. When I run the install from command line, i get error: Unable to find vcvarsall.bat. When I try to run the compiled executable to install, I get an error saying Python 2.7 was not found in the registry. Any help with this would be greatly appreciated. If you haven't installed VS 2008, don't. If you have installed VS 2008 and can't get extensions to compile, I would uninstall VS 2008 and remove the directory for it under

Why does PyUSB / libusb require root (sudo) permissions on Linux?

江枫思渺然 提交于 2019-11-29 12:51:18
问题 I have been toying around with PyUSB lately, and found that it works beautifully on Linux (Ubuntu has libusb 0.1 and 1.0, as well as OpenUSB)... but only if I run the program with root privileges (with sudo , of course). Can anyone tell me why it requires elevated privileges and, more importantly, if I can change the permissions somehow to make it work for normal user accounts? 回答1: libusb allows you to manipulate arbitrary USB devices in arbitrary ways. You could format an external USB

PyUSB ValueError: No backend available

与世无争的帅哥 提交于 2019-11-28 12:48:32
I am runing Python 2.7.8 at Win 7 operation system. I am trying to communicate a USB device (Numato 32 channel GPIO device) by PyUSB. I downloaded walac-pyusb-7071ad3 from URL: http://walac.github.io/pyusb I stop at receiving "ValueError: No backend available". Could any Python expert tell me where is wrong? Here is the code: import sys import usb import usb.core import usb.util import usb.backend.libusb1 backend = usb.backend.libusb1.get_backend(find_library=lambda C:'\Python27') numato = usb.core.find(idVendor=00000006,idProduct = 00000000, backend=backend) Here is Python error message:

PyUSB ValueError: No backend available

偶尔善良 提交于 2019-11-27 07:12:08
问题 I am runing Python 2.7.8 at Win 7 operation system. I am trying to communicate a USB device (Numato 32 channel GPIO device) by PyUSB. I downloaded walac-pyusb-7071ad3 from URL: http://walac.github.io/pyusb I stop at receiving "ValueError: No backend available". Could any Python expert tell me where is wrong? Here is the code: import sys import usb import usb.core import usb.util import usb.backend.libusb1 backend = usb.backend.libusb1.get_backend(find_library=lambda C:'\Python27') numato =

Pyusb on windows - no backend available

匆匆过客 提交于 2019-11-27 04:14:18
I'm trying to have my python application interface with an NFC device via USB. The best option seems to be pyusb, but I can't get it to connect to the libusb backend. I keep getting ValueError: No backend available I've looked at the stack trace, and found that usb/backend/libusb10.py (which is part of pyusb) is trying to load libusb-1.0.dll to use as the backend, but it can't find it. It's not that its not in my path, its not on my computer at all! I have installed libusb-win32 ( http://libusb.org/wiki/libusb-win32 ), but the resulting directory only seems to include libusb0.dll. Where is