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
1
vote
0 answers

Issues with FTDI Driver using PyUSB/libusb

I'm running into issues reading from a USB device using PyUSB. If I run import usb.core dev = usb.core.find(idVendor=0x0403, idProduct=0x6001, serial_number="GAFR0000") if dev is None: raise ValueError('Not…
mugnuff
  • 37
  • 3
1
vote
0 answers

Ho to send a "BULK in" message with pyusb with python

I would like to recover data from my sound level meter Velleman Dem202 For that I have decided to use python pyusb to access from my Host to the Device To understand the protocol exchange used, I have scanned the message exchanges with wireshark usb…
1
vote
2 answers

Communication with a stepper motor controller through a USB COM?

I have a stepper motor controller that I can command through a USB COM on windows. The manufacturer provided a software but I want to create my own on python (In fact, I want to include the control of the stepper into a python code that control…
gtn_03
  • 11
  • 3
1
vote
0 answers

Is there a way to work with PyUSB under Windows (10) without changing drivers?

I tried to run PyUSB under Windows and in a first test simply wanted to read out all my USB devices with usb.core.find(find_all = True). But that failed with backends iibusb0 and libusb1. Meanwhile I read several times that I need to change the…
1
vote
1 answer

Python - getting SerialNumber of usb-devices with pyUsb in windows

I'm trying to create a list of alll usb mass storage devices with their VendorIf, the ProductId and the SerialNumber. Therefore I use the pyUsb module and run the following program. import sys import usb import usb.core import usb.util devs =…
hafisch
  • 13
  • 4
1
vote
1 answer

usb.core.USBError: [Errno 75] Overflow

I am very new to USB. I need to communicate with a laser controller and I want to use Python for this. I am now working in an Ubuntu 20.04 machine. I have this code: import usb.core import usb.util device = usb.core.find(idVendor=0xC251,…
user171780
  • 2,243
  • 1
  • 20
  • 43
1
vote
0 answers

Pyusb doesn't recognize usb devices (python 3.9.6 and windows)

I'm trying to use pyusb to enumerates all devices connected to my pc: >>> import usb.core >>> dev = usb.core.find(find_all=True) >>> for device in dev: print(device) >>> Why keyboard, mouse and other plugged devices are not…
mtre
  • 21
  • 4
1
vote
2 answers

Read and Write HID device with PyUSB (not HIDAPI)

I would like to implement the read and write calls of the python hidapi, in pysub. An example code using the python hidapi, looks like this: import hid hdev = hid.device() h = hdev.open_path( path ) h.write( send_buffer ) res = h.read( 64 ) …
DrM
  • 2,404
  • 15
  • 29
1
vote
1 answer

I keep getting "usb.core.USBError: [Errno 16] Resource busy" when trying to read from a USB device using pyusb

Im trying to communicate with this device with Python using the Pyusb module The device is a DualSense Ps5 controller and I'm running Rasbian Lite (no desktop env) My code so far is: import usb.core dev =…
Akliph
  • 15
  • 1
  • 4
1
vote
1 answer

I can't connect raspberry pi and sensor by USB

I connect raspberry Pi(CM3+) with sensor by USB. I download and install pyusb. I write the followig python codes.But, error massage appear. I wonder if you could give me advices. codes import usb.core import usb.util # find our device dev =…
hibari
  • 11
  • 4
1
vote
0 answers

Efficient USB bulk transfer to python shared memory

I am trying to stream data from a USB device to a python3 shared memory array with as little overhead as possible. Currently I am reading a 128KB packet from a usb device using pyusb. I have created a 2D (1024 x 128Kb) shared memory block from the…
jasony1
  • 11
  • 1
1
vote
1 answer

PyUSB trouble with windows

Pyusb works incorrectly with my PC. There isn't any topic about my problem on this forum. Details below. I'm trying to run a simple script that should show USB devices info: import usb.core import usb.util for device in…
eLencie
  • 11
  • 4
1
vote
0 answers

VSCode Python debugging - permission issues

I am developing a small usb application using python (pyUSB) under Win 10 and have the following problem. When I test basic commands under the python console, everything works fine. I can open the device, write bytes to it and read from it. Next, I…
ACBlue
  • 71
  • 1
  • 7
1
vote
1 answer

light up the mass storage's led

I have usb mass stroage with led I am trying to light on and off the led using usb packet sniffing tool USBlyzer, I can get the raw data 55 53 42 43 58 66 93 88 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 whose Request info…
kim taeyun
  • 1,837
  • 2
  • 24
  • 49
1
vote
0 answers

Python PyUSB modifying data and sending it as if it had come from the USB device itself

I'm trying to use PyUSB to capture data, change it and then send it to the PC as if it had come straight from the device in question. The device I am trying to connect to is a Wacom One tablet. So far I have been able to pull the data from the…