mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-22 20:42:03 +00:00
webusb: check if a device is functional when enumerating
this fixes issue #223 on Windows, where a device would be returned in two copies, only one of which works
This commit is contained in:
parent
f75b90d260
commit
9f2583f893
@ -101,7 +101,16 @@ class WebUsbTransport(Transport):
|
||||
continue
|
||||
if not is_vendor_class(dev):
|
||||
continue
|
||||
devices.append(WebUsbTransport(dev))
|
||||
try:
|
||||
# workaround for issue #223:
|
||||
# on certain combinations of Windows USB drivers and libusb versions,
|
||||
# Trezor is returned twice (possibly because Windows know it as both
|
||||
# a HID and a WebUSB device), and one of the returned devices is
|
||||
# non-functional.
|
||||
dev.getProduct()
|
||||
devices.append(WebUsbTransport(dev))
|
||||
except usb1.USBErrorNotSupported:
|
||||
pass
|
||||
return devices
|
||||
|
||||
def find_debug(self):
|
||||
|
Loading…
Reference in New Issue
Block a user