Browse Source

fix ledger: nano s did not work reliably since last fw update

follow LedgerHQ/btchip-python@6e985b558f22d1fc0367f5c1730822750337cf94
3.2.x
SomberNight 7 years ago
parent
commit
cd19f788cc
  1. 11
      plugins/ledger/ledger.py

11
plugins/ledger/ledger.py

@ -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)

Loading…
Cancel
Save