Skip to content

Conversation

@chengkai15
Copy link
Contributor

@chengkai15 chengkai15 commented Nov 18, 2025

depends-on: [open-vela/external/pull/39 open-vela/frameworks_bluetooth/pull/274 open-vela/vendor_openvela/pull/29]

Summary

add HID profile feature

Impact

HID profile

Testing

local test HID connect/send etc pass

@chengkai15 chengkai15 requested a review from hyson710 as a code owner November 18, 2025 06:45
@CLAassistant
Copy link

CLAassistant commented Nov 18, 2025

CLA assistant check
All committers have signed the CLA.

@openvela-robot
Copy link
Contributor

@openvela-robot
Copy link
Contributor

@openvela-robot
Copy link
Contributor

@openvela-robot
Copy link
Contributor

@openvela-robot
Copy link
Contributor

@openvela-robot
Copy link
Contributor

CI failure.
PR list is .
CI url: https://github.com/open-vela/external/actions/runs/19610331028

@openvela-robot
Copy link
Contributor

bug: v/78803

Add foundational HID device profile implementation:
- Defines standard API:
  • bt_hid_device_register
  • bt_hid_device_connect etc
- Establishes dual L2CAP channels:
  • Control channel (PSM=0x11) for HID commands
  • Interrupt channel (PSM=0x13) for report data
- Manages connection lifecycle:
  • Handles pairing/bonding procedures
  • Tracks connection state transitions
- Implements state reporting via callback:
  • bt_hid_device_register
- Provides resource initialization system:
  • Dynamic context allocation
  • Protocol stack configuration

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

This commit introduces several key components for HID Device support:
1. A shell tool is implemented to interact with the HID Device layer,
   allowing for debugging via command line.
2. Registration of HID Device state callbacks, enabling the application
   to receive connection state changes.
3. Registration of HID SDP service records to support legacy Bluetooth
   devices that use SDP for HID device discovery.
Future work will include the implementation of HID report data
transmission and reception handling.

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

Add handling of incoming data on the HID Control and Interrupt channel.
The received data is parsed according to the HID specification
and passed to the application via the registered HID event callback.
Key changes:
1. Handle HID output reports and control commands.
2. handle HID interrupt data.

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

Add HID device shell module with data reception and send handle.

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

Add robust connection handling for HID device profile:
- Local-initiated connections: bt_hid_connect(addr)
- Local disconnections: bt_hid_disconnect(dev)
- Remote connection handling
- Remote disconnection handling:
- State machine supporting
- Event reporting: disconnected/connected/vc_unplug

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

Implement shell operations for active connection management and
transmission capabilities:
- `hid_device connect`: Initiate connection to peer
- `hid disconnect`: Terminate current connection
- `hid send`: Send HID test data

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

add hid unplug and API prefix
fix reasonable API doc

Signed-off-by: Kai Cheng <[email protected]>
bug: v/78803

remove CONTAINER_OF struct null check

Signed-off-by: Kai Cheng <[email protected]>
@openvela-robot
Copy link
Contributor

@openvela-robot
Copy link
Contributor

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.

5 participants