pyusb

Listing usb devices using pyusb doesn't work

馋奶兔 提交于 2021-02-11 09:47:05
问题 I am trying to list USB devices on my windows 7 pc. I installed this ahead: https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-devel-filter-1.2.6.0.exe The code below does not print anything. Is there something else to be done to get the device info? import usb.core import usb.util dev = usb.core.find(find_all=True) for d in dev: print(usb.util.get_string(d,128,d.iManufacturer)) Edit: Solved This comes close to what I need Retrieve list of USB items

Listing usb devices using pyusb doesn't work

a 夏天 提交于 2021-02-11 09:44:02
问题 I am trying to list USB devices on my windows 7 pc. I installed this ahead: https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-devel-filter-1.2.6.0.exe The code below does not print anything. Is there something else to be done to get the device info? import usb.core import usb.util dev = usb.core.find(find_all=True) for d in dev: print(usb.util.get_string(d,128,d.iManufacturer)) Edit: Solved This comes close to what I need Retrieve list of USB items

PyUSB: Why are bus.dirname and dev.filename empty string?

允我心安 提交于 2021-02-10 23:19:42
问题 I am very new to using PyUSB. I have some USB devices connected to my machine and am trying to get some of their properties. Based on what I have learnt from other examples using PyUSB, I have produced a short program in Linux. Here is a snip of the program: busses = usb.busses() for bus in busses: devices = bus.devices for dev in devices: print dev.filename print bus.dirname print dev.idProduct When I checked the output, both dev.filename and bus.dirname are empty string for all the devices.

Device Not Available on PyUSB

醉酒当歌 提交于 2021-02-09 11:18:53
问题 Playing around with PyUSB a bit to see if it offers some insight as to why a WebUSB library I'm using isn't finding my device. I installed libusb1 on the Mac via Homebrew with brew install libusb . Ran lsusb -vv to get device details. Also set a couple of environment variables for PyUSB: export PYUSB_LOG_FILENAME=pysubdebug.log and export PYUSB_DEBUG=debug import usb VENDOR_ID = 0x0483 PRODUCT_ID = 0x5740 DATA_SIZE = 1 device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID) >>>

Device Not Available on PyUSB

倖福魔咒の 提交于 2021-02-09 11:17:07
问题 Playing around with PyUSB a bit to see if it offers some insight as to why a WebUSB library I'm using isn't finding my device. I installed libusb1 on the Mac via Homebrew with brew install libusb . Ran lsusb -vv to get device details. Also set a couple of environment variables for PyUSB: export PYUSB_LOG_FILENAME=pysubdebug.log and export PYUSB_DEBUG=debug import usb VENDOR_ID = 0x0483 PRODUCT_ID = 0x5740 DATA_SIZE = 1 device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID) >>>

Get USB device address through python

纵然是瞬间 提交于 2021-01-28 09:01:04
问题 For test purposes, I want to connect a USB device and want to check what is the speed (HS/FS/LS). I am able to access to Device Descriptor, Endpoint descriptor, interface descriptor but I would like to know the device address which has been allocated by the OS (windows 7) My code so far : import usb busses = usb.busses() for bus in busses: for dev in bus.devices: if dev.idVendor == vendor_id and dev.idProduct == product_id: print ("Test vehicle %s device FOUND!" %protocol) print (

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

依然范特西╮ 提交于 2021-01-04 09:01:58
问题 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 files and it clearly has a folder named "backend" and inside has the correct files. Here's all of my code: import usb.core import usb.util import sys backend = usb.backend.libusb01.get_backend(find_library=lambda C: "Users\absolute\Desktop\libusb

Raspberry Pyusb gets Resource busy

不打扰是莪最后的温柔 提交于 2020-12-31 04:47:31
问题 I'm trying to connect my Raspberry PI to Pic4550 via USB. (Pic function is ok with windows c# program!). So I have installed rpi 2, pyusb, and tried to communicate with the help of [https://github.com/walac/pyusb/blob/master/docs/tutorial.rst][1] I get connected to the USB device, lsusb shows: Bus 001 Device 006: ID 04d8:0080 Microchip Technology, Inc. The python prog finds the device! Gets the right config but cannot write message: usb.core.USBError: [Errno 16] Resource busy I tried to run

PyUSB: reading from a USB device

帅比萌擦擦* 提交于 2020-03-04 05:43:13
问题 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 correctly since the device is found and I get some response from print(dev) (see below). From this I can see that the output endpoint address is 0x3 and the input endpoint address is 0x81 According to the Oscilloscope manual, I'm supposed to send