Bluetooth: HID: Implement HID Device profile #95
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.
Implementation Summary
This PR adds full HID Device protocol support to Zephyr's Bluetooth stack, enabling Zephyr devices to function as Bluetooth HID peripherals (e.g., keyboards, mice). The implementation includes:
Core Protocol Infrastructure
Dual L2CAP channel management (Control PSM=0x11, Interrupt PSM=0x13)
Connection manager
Resource initialization system (bt_hid_device_init)
Standardized API for device registration and callbacks
Data Handling
Control channel command processing (SET_REPORT/GET_REPORT)
Interrupt channel report transmission
Input report reception with validation
Support for all HID report types (Input/Output/Feature)
Shell Tool
shell
Connection management
br connect DC:41:A9:XX:XX:XX
hid_device register
hid_device connect
hid_device disconnect
Data operations
hid_device send # Send mouse report
Security & Compliance
HID Spec v1.1.1 compliance
BR/EDR and BLE dual-mode support
Bonding and pairing integration