pyusb

PyUsb USB Barcode Scanner

纵饮孤独 提交于 2019-12-20 09:24:58
问题 I'm trying to output a string from a barcode or qrcode using a Honeywell USB 3310g scanner in Ubuntu. I have libusb and a library called metro-usb (http://gitorious.org/other/metro-usb) which are enabling my scanner to work. If i open gedit and scan, I successfully get the qrcode data fine! I need to be able to build this pragmatically and send the data to a web service. I've downloaded and instally pyusb and this seems to be the best solution best on my research. I have a script based on

PyUSB dev.set_configuration()

余生长醉 提交于 2019-12-19 09:24:44
问题 I am trying to send data to a usb stick using the python library PyUSB. The code I am using is the following: import usb.core import usb.util # find our devices #dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001) dev = usb.core.find(idVendor=0x090c, idProduct=0x1000) # was it found? if dev is None: raise ValueError('Device not found') # set the active configuration. With no arguments, the first # configuration will be the active one dev.set_configuration() # get an endpoint instance cfg =

PyUSB backend not accessible

倾然丶 夕夏残阳落幕 提交于 2019-12-19 07:49:34
问题 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 回答1: You need to install libusb-1.0, libusb-0.1, or openusb as a backend to pyusb. Is

PyUSB backend not accessible

本秂侑毒 提交于 2019-12-19 07:49:00
问题 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 回答1: You need to install libusb-1.0, libusb-0.1, or openusb as a backend to pyusb. Is

pyusb 2.7 windows install error

微笑、不失礼 提交于 2019-12-18 09:45:15
问题 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. 回答1: If you haven't installed VS 2008, don't. If you have installed VS

PyUSB 1.0: NotImplementedError: Operation not supported or unimplemented on this platform

ⅰ亾dé卋堺 提交于 2019-12-14 01:18:26
问题 I just began to use pyusb, and basically I'm playing with the sample code here. I'm using Windows7 64 bit, and downloaded the zip version from https://walac.github.io/pyusb/. Backend is libusb-1.0.19 that is downloaded the windows binary from http://libusb.info/. All of my code is: dev = usb.core.find(idVendor=3544, idProduct=9736) if dev is None: sys.stdout.write("No device found") return; print "deviceClass = " + str(dev.bDeviceClass); for cfg in dev: sys.stdout.write("configuration: " +

Pyusb on Windows 7 - NotImplemented Error :is_kernal_driver_active

放肆的年华 提交于 2019-12-13 09:14:34
问题 I am using escposprinter python library for printing my data in thermal printer. It depends on pyusb. the library is working fine in linux . While in windows 7 ,i get the it have some issues. Here are output i get. File "main.py", line 1, in <module> from app import app File "D:\freeth-in-erp-60ab8eb96fad\app\__init__.py", line 94, in <module> from .api_routes import * File "D:\freeth-in-erp-60ab8eb96fad\app\api_routes.py", line 44, in <module> from .printer import pos File "D:\freeth-in-erp

How can PyUSB be understood? [closed]

主宰稳场 提交于 2019-12-12 03:48:59
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I am unable to proceed on how PyUSB works. I am stuck for a week now. How do I proceed? 回答1: At first glance, documentation for PyUSB seems to be entirely absent. But not so. From a Python prompt you can: >>>

pyUSB read() always returns the same value

自作多情 提交于 2019-12-11 16:44:48
问题 I am using USB library in python. I can see the device, i can configure it. but when I read out of it I always get the same stuff array('B', [17, 96]). Note, even if I don't write into the endpoint output I still get the same result when I read; I can also read as many times as I want and still get the same result (see full code below) the lsusb command shows it is a FTDI USB device Bus 009 Device 008: ID 0403:faf0 Future Technology Devices International, Ltd in past, i was able to

pyusb reading operation always return '1'

六眼飞鱼酱① 提交于 2019-12-11 15:08:02
问题 I'm trying to create USB driver object using pyusb for my code, and the return from reading operation always return '1', I search the web for a while, and I couldn't find any solution, please try to help me understand what am I'm doing wrong. Environmental properties: Using python 3.7 with pycharm on windows 10. Imported all necessary packages (usb.core, usb.util) of course after installing the pyusb module. The object I'm trying to build: class UsbDev: def __init__(self, VID, PID): self