[WIP] Refactor HID - #815
Draft
zxzxwu wants to merge 1 commit into
Draft
Conversation
zxzxwu
force-pushed
the
hid
branch
2 times, most recently
from
September 13, 2026 13:44
237e11d to
75ca0db
Compare
- Replace legacy HID implementation with structured Message classes, Device/Host roles, and Delegate pattern from bumble_ext. - Add DeviceSdpRecord dataclass with to_service_attributes, from_service_attributes, and find classmethods. - Support get_idle and set_idle control messages on both Host and Device. - Serialize concurrent Host control transactions with asyncio.Lock and abort pending futures on disconnect/malformed PDUs. - Fix GET_REPORT buffer_size truncation to account for Report ID prefix. - Unify EVENT_CONTROL_DATA payload format across Device and Host. - Handle empty PDUs, truncated/malformed report requests, and reserved handshake result codes (0x05..0x0D) safely. - Refactor run_hid_device.py and run_hid_host.py examples to use the new API. - Add comprehensive unit test suite in tests/hid_test.py. TAG=agy CONV=f1437e84-a8c3-4577-abb4-c0f287986a23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.