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
4
votes
0 answers

How do I monitor pyusb events in the background on a windows machine

I have a PyUSB+PyQt script working on windows interfacing with a USB printer. I want to respond to printer connect/disconnect events. I am unsure on how to write the event loop to keep monitoring the USB port. I will also have some processing going…
Sandeep
  • 1,745
  • 3
  • 20
  • 30
4
votes
0 answers

pyusb assertion error - no usb out endpoint?

I'm trying to program (upload new messages to) a scrolling LED badge via python on Linux instead of via the windows exe. I've got a capture of a successful upload via the windows app that I'll use as a template, but at the moment I'm having trouble…
alexii
  • 41
  • 2
4
votes
2 answers

libusb on Mac OS X - "ValueError: No backend available"

I'm running Mac OS X 10.8 with python 2.7. I installed libusb with MacPorts and it does work (tested my importing usb.core & usb.util). However, each time I try to access a device, I get the following error: >>> dev=usb.core.find(idVendor=0x1d50,…
4
votes
3 answers

How to get data from a barcode reader using raw data mode and pyUSB?

I need to read a barcode data using a usb barcode reader (raw data mode). I already know that I can set the reader with the keyboard mode but it just doesn't fit my requirement because I'll be using 4 readers simultaneously and the text will…
Angelica Lim
  • 61
  • 1
  • 6
3
votes
1 answer

No USB traffic when reverse engineering game controller

I'm trying to make a Mac driver for an electronic drum/xbox controller ION Drum Rocker. Using usbmon/usbdump, I can get traffic on a normal USB keyboard just to see if it works. But there's not a single interrupt or message from the drum. I'm…
xster
  • 6,269
  • 9
  • 55
  • 60
3
votes
1 answer

How to mount an FTDI USB device to a docker container?

I would like to be able to access an FTDI serial-to-usb bridge device plugged into a host computer from within a Docker container. From there, I am using a Python script with the pyusb and libusb libraries to process the USB output. That way, I can…
3
votes
1 answer

PyUSB, No backend available. How to specify custom location of libusb?

System setup M1 Mac Brew installed libusb /opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.0.dylib Anacada python 3.10 The No backend available problem see be a known issue with newer python and ARM-based Macs. I am failing to arrive at a…
Vincent
  • 1,579
  • 4
  • 23
  • 38
3
votes
1 answer

Multiple reproducible errors with a Brecknell Scale

I'm working on getting a weight from a usb scale using python and PyUSB. Here's my code import sys import usb.core import usb.util from reports import \ ReportFactory, STATUSES, ZERO_WEIGHT, STABLE_WEIGHT, DATA_REPORT device =…
Rager
  • 746
  • 4
  • 25
3
votes
1 answer

libusb, pyusb and python-escpos on a windows machine

I am trying to work with Epson POS TM-82 printer on windows 7 (64 bit). I have installed the printer's driver. I have python 2.7.15 (64 bit) installed. To work with python I am using this package, python-escpos. After I have installed python-escpos,…
Kakar
  • 5,354
  • 10
  • 55
  • 93
3
votes
2 answers

Unable to get full VISA address that includes the serial number

I do not have any prior experience in Python and was trying to see if I can query information from a device with USB VISA address. I am running a Raspbian GNU/Linux 9 (stretch) with a Python 3.5.3 Shell. The VISA packages for python was installed…
Arun Kumar
  • 235
  • 3
  • 18
3
votes
0 answers

Python Flask stop processing a route when button is clicked

Hello I have a flask application along with a USB card swiper. The swiper's code is here. So the use case is whenever I go to my server and I click next there is a flask route that will start the swiper. Technically the swiper code will be in an…
3
votes
0 answers

PyUSB no backend available even with dll in path, explicitly loaded

I'm receiving a no backend error in pyusb despite the fact that I have LibUSB 1 installed, in the path, and loaded fine earlier in the code. My code is import usb.core import usb.util import usb.backend.libusb1 import sys class USBConnection: def…
bever
  • 33
  • 4
3
votes
1 answer

How to interact with USB device using PyUSB

I have so far gotten to the stage of finding the device, now I am ready to talk to the USB using the devices protocol laid out in the specification on page 22. libusb is installed on my machine and so is PyUSB. import usb.core import usb.util #…
Danny Cullen
  • 1,782
  • 5
  • 30
  • 47
3
votes
0 answers

Could not claim interface pyusb

I'm trying to use pyusb over usblib1.0 to read the data from an old Ps2 mouse using a Ps2 to USB adapter that represents it as a HID device. I am able to access the device, but when I try to send it the GET_REPORT request over control transfer, it…
idan stark
  • 61
  • 1
  • 6
3
votes
2 answers

PyUSB Stop Dymo scales from shutting down automatically

I am using a Dymo USB scale with PyUSB and everything is really great apart from the scale's automatic shutdown after three minutes. I would like to keep it running as long as my python program is running. Is there any way to do this using python? I…
zooombini
  • 143
  • 2
  • 12
1 2
3
17 18