fix: handle BLE LongTermKey in device info parsing - #34
Conversation
|
Cross-linking a related writeup from the linux-surface project: linux-surface/linux-surface#2060 — it adds a standalone Python helper ( The main things I found while doing this manually that aren't in the current diff here:
None of this is criticism of the existing diff — it's a solid fix for the immediate Happy to take ownership of a more complete follow-up PR if the maintainers are open to it, but the upstream activity here suggests it might end up as a fork — so the immediate path for affected users is the linked linux-surface helper and writeup. |
Problem Statement
When using bt-dualboot on a Surface Pro 7 dual-booting Arch Linux and Windows 10,
bluetooth devices (particularly Microsoft Modern Mouse) failed to sync between OSes.
The tool threw
configparser.NoSectionError: No section: 'LinkKey'because BLE devicesuse LongTermKey instead of traditional LinkKey for pairing credentials.
Solution
The key modification implements fallback mechanism for different pairing key types:
extract_info()inbt_linux/bluetooth_device_factory.pythrough AI-assisted implementation[LinkKey]and[LongTermKey]sequentiallyImplementation Notes
Validation
After only initial verification, it can now recognize my mouse.
Notes
As a first-time contributor to open-source projects, I appreciate any feedback on
implementation details or testing requirements. Please let me know if additional
changes are needed.
In fact, this PR is also mostly generated by AI