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
0
votes
1 answer

Pyusb Windows error:USBError: [Errno None] libusb0-dll:err [claim_interface] could not claim interface 1, win error: The requested resource is in use

I am trying to read data from USB using pyusb in python.I am able to get all the configuration of devices but when i am trying to read data .I am getting the below error: USBError: [Errno None] libusb0-dll:err [claim_interface] could not claim…
Chirag Dhingra
  • 128
  • 2
  • 17
0
votes
0 answers

Polling USB mouse Events

I need to poll USB mouse movement and have the code run only when the mouse is moving. Firstly I've taught myself Python in about 5 days so apologies if the coding is bad. Secondly I'm using PyUSB on a Raspberry Pi running Stretch. I've written some…
0
votes
1 answer

How can I improve the pyusb reading speed?

I use python3.7 pyusb1.0.2 and libusb-win32-devel-filter-1.2.6.0 in windows 10. My FPGA send data to my computer in 10MB/s through USB interface after it received 0x1111. It lasts ten seconds. I found my python program just can receive part of data,…
0
votes
1 answer

On macOS, is it possible to reserve input from an HID for a python program?

I want to give exclusive access to the input coming from a LASER barcode (point and trigger type) reader to a Python 3.6 program; that is, no other program should get input from the reader, regardless of UI focus (because the python program has…
Jonathan Acosta
  • 89
  • 1
  • 10
0
votes
0 answers

Writing to multiple identical devices, python USB, no serial number on device

I am working on controlling some relay cards from Python. I can configure and control an individual relay card just fine (pyusb, python3.6 ubuntu 16.04). Using the standard methods to identify and configure the USB device. dev =…
0
votes
1 answer

Unable to read information from USB with PyUSB in Windows 10. (Connects ok)

I am running Python 3 with Anaconda in a Windows 10 machine. I am trying to connect to a usb barcode scanner in order to read barcodes and store them in variables in other python routine. I have found an example using PyUSB library and tried it.…
0
votes
1 answer

USB communication with Python (Newport Instrument)

I´m currently trying to make USB communication to the laser controler TLB 6700 (New Focus - Newport) with python. https://www.newport.com/f/velocity-wide-&-fine-tunable-lasers This is my first python task, and I´ve been having several troubles. So,…
Guillermo
  • 1
  • 2
0
votes
1 answer

Migrate a Pygtk application with GLADE files, working under Debian, into MS Windows10. HOWTO?

I would like to migrate a PyGtk (&PyUSB) application using GLADE and CSS files from a Debian9 (linux) PC into a Windows10 PC. What would be the recommendation? a) rewrite in PyQt? b) rewrite in C++ & Qt? c) .. just implement a Python and Gtk…
floppy_molly
  • 175
  • 1
  • 10
0
votes
1 answer

Issues with python hex()

I have json file as follows { "devices" :[ { "Manufacturer name": "Sony", "vendor_id":"8087" , "product_id" : "07da" }, { …
cgoma
  • 47
  • 2
  • 13
0
votes
1 answer

PyUSB how to specify the type and the buffer size of the endpoint

There are four different ways to send data across USB: Control, Interrupt, Bulk, and Isochronous. book ref 1 From the book book ref 1 page 330: ... Bulk endpoints transfer large amounts of data. These endpoints are usually much larger (they can…
Valentyn
  • 659
  • 1
  • 7
  • 28
0
votes
0 answers

Extract data from Nike+ Sportband with PyUSB on Debian

I have an old Nike+ Sportband (image here). Nike has decided to remove support for this product. I would like to extract the data and then decode it. Someone wrote a code in C that works (link download). I want to do it in Python, so I have decided…
Luigi
  • 11
  • 3
0
votes
1 answer

PyUSB Timeout when Reading Endpoint

I'm using PyUSB to access an Ocean Optics Spectroscopy Unit and collect data. Previously, I had thought the primary access was through an FTDI chip, but after using Wireshark to USB sniff the commands sent via the proprietary software on a different…
A. Hudson
  • 51
  • 1
  • 10
0
votes
0 answers

Drive letter from device ID on Windows with Python

I have the device ID of a removable drive. How can I use this to identify the drive letter of the device on windows with Python? Non python answers may help.
Pyroadrian
  • 13
  • 5
0
votes
1 answer

Pyusb isn't working

I got Pyusb with pip install pyusb but when I try to import usb.core I get: Traceback (most recent call last): File "", line 1, in import usb.core File "C:\Users\Owner\Desktop\usb.py", line 1, in import…
CMLSC
  • 113
  • 1
  • 3
  • 13
0
votes
0 answers

PyUSB: USB Scanner read fails on CENTOS 7

I'm trying to implement driver mechanism for usb barcode scanner on Centos. Using PyUSB, Here is high-level code. I am trying to achieve is to be able to read QR-Codes and BarCodes when someone scans and send it to message queue without user…
SrujanSreepathi
  • 91
  • 1
  • 1
  • 6