Skip to content

Commit 3f0bacc

Browse files
committed
dongle: usb env var to select specific port
1 parent 1f85c17 commit 3f0bacc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ledgerblue/comm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ def getDongle(debug=False, selectCommand=None):
310310
) or ("usage_page" in hidDevice and hidDevice["usage_page"] == 0xFFA0):
311311
hidDevicePath = hidDevice["path"]
312312

313+
usb_port = os.getenv("LEDGER_PROXY_USB_PORT")
314+
if usb_port:
315+
hidDevicePath = usb_port.encode()
313316
if hidDevicePath is not None:
314317
dev = hid.device()
315318
dev.open_path(hidDevicePath)

0 commit comments

Comments
 (0)