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
3
votes
2 answers

PyUSB not recognizing particular USB device

I am writing software in python to detect cosmic muons using a USB-connected radiation detector. I am trying to use the PyUSB module to interact with the device, but PyUSB is not finding my radiation detector in particular. The device itself has a…
zh1
  • 231
  • 2
  • 8
3
votes
0 answers

Integrate pyusb device into poll() loop

I'm using pyusb-1.0.0b2. I'm converting some multi-threaded code to instead use a select.poll() loop, as below: p = select.poll() p.register(...) while True: for fd,evt in p.poll(): ... There is code which currently runs in its own…
Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
3
votes
5 answers

Why can't I call the PyUSB function dev.read() repeatedly without getting a timeout error?

I have a USB connection between a Macbook Air and a microcontroller sensor that streams hex data continuously. I'm trying to use PyUSB in Python to acquire the data. I used PyUSB to connect to microcontroller like so: import usb dev =…
dimachidy
  • 110
  • 1
  • 4
  • 9
3
votes
1 answer

ImportError: No module named usb.core (Working in terminal, not in Eclipse)

I'm trying to get the pyUSB to work on my Ubuntu 14.04 distribution, more specifically in Eclipse. I've installed the package several times using different methods, and the last one combined with some magic did the trick! It is working in the…
3
votes
1 answer

Error trying to call the backend module in pyusb. "AttributeError: 'module' object has no attribute 'backend'"

I recently installed pyusb for this project, which is trying to attempt at writing to a USB LED Message Board and received this error: AttributeError: 'module' object has no attribute 'backend' I don't know why this is, I checked the pyusb module…
user2565454
3
votes
4 answers

How to install pyusb on ubuntu?

I tried this link, but got the following message on shell: sudo apt-get install python-pip : vineet@vineet:~$ sudo pip install --upgrade pyusb Downloading/unpacking pyusb Could not find a version that satisfies the requirement pyusb (from versions:…
Flame of udun
  • 2,136
  • 7
  • 35
  • 79
3
votes
2 answers

PyUSB dev.set_configuration()

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 =…
Amjad
  • 1,950
  • 5
  • 26
  • 41
3
votes
0 answers

PyUSB - "usb_claim_interface: couldn't claim interface" error on OS X 10.7.4

The exact error is: usb.core.USBError: [Errno None] usb_claim_interface: couldn't claim interface I'm using pydev 1.0 (with libusb 1.0.9) to interface with a sensor. I've tried fiddling with various things but have had no luck (running my code as…
Chironex
  • 809
  • 3
  • 10
  • 28
3
votes
2 answers

Sending data via USB using PyUSB

I need to send data via USB using Python, I'm using PyUSB (http://sourceforge.net/apps/trac/pyusb/) I look for any USB port available, and I tried to send a message: devList = usb.core.find(find_all=True) for dev in devList: for cfg in dev: …
Bibix
  • 335
  • 2
  • 4
  • 13
2
votes
1 answer

nxt-py no backends error

i am trying to run one of the example scripts for nxt py library using pyusb. whenever i try to run the examples i get the following error: USB module unavailable, not searching there Bluetooth module unavailable, not searching there Traceback (most…
user1130772
  • 427
  • 1
  • 6
  • 10
2
votes
3 answers

PyUSB Can't find device

I am running OS X 10.5 and am trying to connect to a USB device via PyUSB with the following code. import usb.core, time, usb dev = usb.core.find(idVendor=0x054c,idProduct=0x0155) if dev is None: raise ValueError('Device not found')…
Robert
  • 2,222
  • 2
  • 21
  • 36
2
votes
1 answer

controlling mouse with pyusb

I have to make a application, that do the followings: disable that the given usb mouse move the pointer in the screen (just the given, not all mouses). get the coordinates of the mouse pointer change the y coordinate of the mouse pointer I've…
bikmak
  • 147
  • 1
  • 1
  • 7
2
votes
1 answer

`pyusb` fails to find `libusb` when using `pyinstaller`

Problem My application works well when in python-only and on my machine. I am attempting to deploy to a machine which has lesser privileges. The basic script that I am attempting to run at the moment: import logging import…
slightlynybbled
  • 2,408
  • 2
  • 20
  • 38
2
votes
1 answer

How to claim USB interface using address

I'm connecting to 2 identical microphone arrays using the pyusb library, but they have the same idVendor and idProduct numbers. The only way to differentiate the 2 devices is by address, but I'm unable to figure out how to connect using address. Is…
a_person
  • 21
  • 2
2
votes
1 answer

How to write to Control Endpoint with PyUSB

I have a USB device for which the following code import usb.core import usb.util device = usb.core.find(idVendor=0xC251, idProduct=0x2201) print(device) produces DEVICE ID c251:2201 on Bus 002 Address 020 ================= bLength …
user171780
  • 2,243
  • 1
  • 20
  • 43