Questions tagged [pyusb]

PyUSB is a Python library allowing easy USB access. Make sure to provide all relevant details like exact versions of the operating system, PyUSB library and libusb backend you are trying to use.

PyUSB is a Python library allowing easy USB access. It has the following features:

  • Support for libusb 0.1, libusb 1.0 and OpenUSB.
  • Easy API to communicate with devices.
  • Support for custom library backends.
  • Isochronous transfer type support.
  • 100% written in Python by ctypes.
  • It runs on any Python version >= 2.4 (this includes Python 3).
259 questions
43
votes
12 answers

Pyusb on windows - no backend available

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,…
user634340
  • 431
  • 1
  • 4
  • 3
10
votes
3 answers

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

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…
ewall
  • 27,179
  • 15
  • 70
  • 84
10
votes
1 answer

How can I get raw USB keyboard data with Python?

I am using PyUSB in Python as I will have to listen an USB port to retrieve data from an electronic card. For the moment, I have to train myself by reading direct input from a small keyboard (USB-connected) connected to a Raspberry-Pi. Of course, I…
Guillaume Leseur
  • 140
  • 1
  • 1
  • 15
9
votes
4 answers

python pyusb import usb.core doesn't work

I am following the tutorial(http://pyusb.sourceforge.net/docs/1.0/tutorial.html) I am on windows xp sp3, my python version is 2.7 and I downloaded and installed the pyusb-1.0.0-a1.zip and libusb-win32-bin-1.2.4.0.zip import usb works fine but…
kim taeyun
  • 1,837
  • 2
  • 24
  • 49
9
votes
3 answers

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

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…
Bomin
  • 1,619
  • 5
  • 24
  • 39
9
votes
1 answer

How to reverse engineering USB/HID/BlueTooth dongle. What tools to use?

Need to reverse engineering bluetooth usb mouse dongle, and use mouse board to measure distance, and plot them with matplotlib I've found these tools that can help with this…
user1630938
8
votes
2 answers

pyusb: cannot set configuration

I am trying to make a script (on linux) that can turn a light in my mouse on or off. This is the code I have so far: import usb.core import usb.util import sys interface = 0 dev = usb.core.find(idVendor=0x1532, idProduct=0x0017) def main(): …
Jim
  • 995
  • 2
  • 11
  • 28
8
votes
3 answers

USB Device Release

I am currently working on PyUSB. As I am new to USB, I don’t know, how can I do the following. I have successfully connected to my USB Device hardware from Python PyUSB. In the code I required to reset the USB Device hardware. Which I did by sending…
user977601
  • 503
  • 2
  • 7
  • 16
7
votes
5 answers

Get string descriptor using PyUSB usb.util.get_string()

I am having trouble getting the string descriptor of a USB device. What I'm looking for is the human friendly Manufacturer and Product names. I am using libusb-1.0 as backend and am able to get the Manufacturer name using the provided libusb test…
smattmyers
  • 215
  • 1
  • 3
  • 10
7
votes
5 answers

PyUSB: SCPI communication with OWON Oscilloscope

This is an updated and shortened question. Communicating with a USB-device should be easy via PyUSB. So, I'm trying to read from a USB-device (oscilloscope) using PyUSB under Win10. Apparently, the USB-driver (libusb-win32 v1.2.6.0) is installed…
theozh
  • 22,244
  • 5
  • 28
  • 72
7
votes
3 answers

Pyusb on Windows 7 cannot find any devices

So I installed Pyusb 1.0.0-alpha-1 Under Windows, I cannot get any handles to usb devices. >>> import usb.core >>> print usb.core.find() None I do have 1 usb device plugged in(idVendor=0x04d8, idProduct=0x0042), and I tried…
Ponkadoodle
  • 5,777
  • 5
  • 38
  • 62
7
votes
1 answer

Pyusb - Errno 13 Access denied for Control Transfer - Mac OS X

I am trying to send a control transfer command through pyusb over a Mac OS: dev.ctrl_transfer(0x21,0x09,0x0200,0x0,0x1) I get the error: Traceback (most recent call last): File "./main.py", line 21, in
Vinoth
  • 301
  • 5
  • 12
7
votes
2 answers

PyUsb USB Barcode Scanner

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…
Michael
  • 891
  • 2
  • 16
  • 32
6
votes
5 answers

I want to connect my program to image scanner

I want to write program with python which can get input from scanner and save as jpg. I don't have any idea how to start. please help.
Aryan
  • 159
  • 1
  • 2
  • 6
5
votes
2 answers

Control the power of a usb port in Python

I was wondering if it could be possible to control the power of usb ports in Python, using vendor ids and product ids. It should be controlling powers instead of just enabling and disabling the ports. It would be appreciated if you could provide…
Anthony
  • 146
  • 1
  • 9
1
2 3
17 18