Thanks for your help! What I'm ultimately trying to do is reset the
device, but it looks like pyusb has a .reset() method so I'm gonna give
that a try to see if it has the same effect as the usb_modeswitch hack
that we're using.
Again, thanks so much! I'm not a great programmer so I kinda ju
Mike,
It might depend on the backend, but your device object should have
.bus , .address and .port_number members.
Regards,
Tormod
On Mon, May 7, 2018 at 2:26 AM, Soultanian, Mike wrote:
>
> The last two items I can't figure out how to get are the bus and the dev# as
> displayed in the usb-devi
Tormod,
Thank you for your assistance - that helped immensely! I wrote the
following and it works:
dev = usb.core.find(find_all=True)
for cfg in dev:
print "Product:", str(usb.util.get_string(cfg, cfg.iProduct))
print "Manufacturer:", str(usb.util.get_string(cfg,
cfg
Hi Mike,
The numbers you get from the configuration are indexes to the string
descriptors. You can use get_string() to retrieve the strings from the
device. If nowhere else, it is documented in the usb/util.py source
code.
Note that the configuration indexes are cached by the operating
system, an
Hi,
We have a problem at work where my coworkers are manually (visually)
parsing through the output of "usb-devices" to find information (bus,
vendor, prodid, manufacturer, serialnumber, etc) and then using that
information to fix problematic devices using that information. I'd like
to write