Skip to content

Refactor HID - #815

Merged
zxzxwu merged 1 commit into
google:mainfrom
zxzxwu:hid
Oct 23, 2026
Merged

zxzxwu merged 1 commit into
google:mainfrom
zxzxwu:hid

Conversation

@zxzxwu

@zxzxwu zxzxwu commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@zxzxwu
zxzxwu force-pushed the hid branch 3 times, most recently from 75ca0db to 49a11d2 Compare September 13, 2026 17:03
@zxzxwu
zxzxwu requested a review from barbibulle September 29, 2026 08:50
@zxzxwu
zxzxwu marked this pull request as ready for review September 29, 2026 08:50
@zxzxwu zxzxwu changed the title [WIP] Refactor HID Refactor HID Sep 29, 2026
Comment thread bumble/hid.py Resolved
Comment thread bumble/hid.py Resolved
- 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
@zxzxwu
zxzxwu merged commit e1fe43c into google:main Oct 23, 2026
34 checks passed
@zxzxwu
zxzxwu deleted the hid branch October 23, 2026 08:44
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.

2 participants