-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devices enumeration: workaround for MacOS #6
Devices enumeration: workaround for MacOS #6
Conversation
Thanks for the PR @andreibancioiu! We'll need some time to test it on a proper device, but it'll definitely be integrated then. |
Co-authored-by: François Beutin <[email protected]>
Hello @andreibancioiu , sorry about this the CI is failing.. Can you take a quick look please? I'll do it next week otherwise |
Hello @fbeutin-ledger, Thanks for the note 🙏 Fixed the linting issues:
|
Merged into LedgerHQ:fbe/merge_mac_support |
On MacOS >= 13.3.1, device enumeration produces more records, e.g.
The order of the enumeration is not deterministic, and, sometimes,
HID.enumerate_devices(self.vendor_id)[0]
might pick an unusable record (not the actual device). In this PR, we implement the device picking logic as a new function,_decide_device_path
, which handles the behavior of MacOS >= 13.3.1, as well.The logic of
HID.enumerate_devices()
is left untouched - in case downstream applications were actually relying on the results being a collection of paths, instead of a single path.How to test
Clone the repository and, while having a device connected (with the MultiversX app open - as an example), run the following command:
It should work with no error (on all operating systems). Output should be similar to:
Extra references: