Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Flakiness connecting to Ledger on Mac OS due to multiple HID devices

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
embedded-iot

Research direction

Start at ledgerblue/comm.py around line 357 and inspect how HID devices from hid.enumerate() are filtered, especially usage_page values 65440 and 61904. Reproduce the connection attempt on Mac OS with the Ethereum app open, then verify that the intended Ledger device is selected consistently and the flaky connection no longer occurs.

Written by the indexing model from the issue text.

Description

We have observed a lot of flakiness with connecting to the Ledger on Mac OS, specifically in this code from the ledgereth library which bottoms out here in ledgerblue.

We found that when the Ethereum app is opened on the Ledger device, another HID entry shows up on the Mac. It is identical to the original HID entry except that usage_page is 61904 instead of 65440. The order of hid.enumerate() is not deterministic, so sometimes you get the original, good device, and sometimes you get the second, bad device. Hence the flakiness.

I'm not knowledgeable about the HID spec but I was wondering if changing the or condition in this line to an and condition would be appropriate. It would fix our problem at least because it would enforce that the device has a usage page of 65440, which would exclude the second, bad device.

Dominant language
Python
Stars
125
Forks
75
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LedgerHQ/blue-loader-python

All issues in LedgerHQ/blue-loader-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.