Skip to content

fix: handle BLE LongTermKey in device info parsing#34

Open
Hans-Kerman wants to merge 1 commit intox2es:masterfrom
Hans-Kerman:fix/linkkey-section-error
Open

fix: handle BLE LongTermKey in device info parsing#34
Hans-Kerman wants to merge 1 commit intox2es:masterfrom
Hans-Kerman:fix/linkkey-section-error

Conversation

@Hans-Kerman
Copy link
Copy Markdown

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 devices
use LongTermKey instead of traditional LinkKey for pairing credentials.

Solution

The key modification implements fallback mechanism for different pairing key types:

  1. Updated extract_info() in bt_linux/bluetooth_device_factory.py through AI-assisted implementation
  2. Added section validation checking both [LinkKey] and [LongTermKey] sequentially
  3. Introduced error handling for missing key sections

Implementation Notes

  • Core logic was developed with guidance from AI tools
  • Code has been manually validated but requires expert review
  • Limited maintenance capability from submitter (Linux novice) - future maintenance welcome

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant