|
|
@ -523,8 +523,15 @@ class LedgerPlugin(HW_PluginBase): |
|
|
|
|
|
|
|
def get_btchip_device(self, device): |
|
|
|
ledger = False |
|
|
|
if (device.product_key[0] == 0x2581 and device.product_key[1] == 0x3b7c) or (device.product_key[0] == 0x2581 and device.product_key[1] == 0x4b7c) or (device.product_key[0] == 0x2c97): |
|
|
|
ledger = True |
|
|
|
if device.product_key[0] == 0x2581 and device.product_key[1] == 0x3b7c: |
|
|
|
ledger = True |
|
|
|
if device.product_key[0] == 0x2581 and device.product_key[1] == 0x4b7c: |
|
|
|
ledger = True |
|
|
|
if device.product_key[0] == 0x2c97: |
|
|
|
if device.interface_number == 0 or device.usage_page == 0xffa0: |
|
|
|
ledger = True |
|
|
|
else: |
|
|
|
return None # non-compatible interface of a nano s or blue |
|
|
|
dev = hid.device() |
|
|
|
dev.open_path(device.path) |
|
|
|
dev.set_nonblocking(True) |
|
|
|