Bluetooth HID Protocol Notes
Bluetooth HID Protocol Notes

Bluetooth HID Protocol Notes

1. Overview

The Human Interface Device (HID) defines the protocols, features and usage procedures of Bluetooth in human interface devices. Typical applications include Bluetooth mouse, Bluetooth keyboard, Bluetooth gamepad, etc. This protocol was adapted from the USB HID Protocol.

2. Some concepts
(1) HID Reports: Bluetooth HID devices support three kinds of Reports: Input, Output, and Feature.
(2) HID establishes two channels, Control Channel and Interrupt Channel. Reports can be transmitted on these two channels. The reports transmitted on the Control channel are called synchronous reports; the reports transmitted on the Interrupt channel are called asynchronous reports.
(3) Feature reports are always transferred synchronously using GET_REPORT or SET_REPORT requests.
(4) Report Protocol Mode and Boot Protocol Mode. Bluetooth HID Hosts support at least one, and Bluetooth HID Device needs to support Report Protocol Mode, and Report Protocol Mode is the default Mode of Bluetooth HID Device.

3. Bluetooth HID Protocol Messages
These messages cannot exceed the MTU of L2CAP, and messages whose size exceeds the MTU will be ignored.
The format of the Message Header is as follows:

(1) HANDSHAKE
This Message is used to acknowledge SET_REPORT, SET_IDLE and SET_PROTOCOL requests. Only transmitted on Control Channel, only by Bluetooth HID device.
The Parameter section is defined as follows:

(2) HID_CONTROL
Controls the Bluetooth HID device to change state.
The Parameter section is defined as follows:

(3) GET_REPORT
The Bluetooth HID Host is used to request the transmission of the Bluetooth HID device.
Defined as follows:

(4) SET_REPORT
The Bluetooth HID Host is used to initiate transmission to the Bluetooth HID device.
The format is as follows:

(5) GET_PROTOCOL
Used to obtain the Protocol Mode of the Bluetooth HID device, and then the Bluetooth HID device responds with a DATA payload indicating the current Protocol Mode.
The format is as follows:

The format of GET_PROTOCOL Data Definition is as follows:

(6) SET_PROTOCOL
The Bluetooth HID device used to set the Bluetooth HID device. The format is as follows:

(7)DATA
Represents a HID payload. The format is as follows:

4.Transfers
Transported in the form of HID Protocol messages.
(1) Control Channel Transfers
Divided into Acknowledged and Unacknowledged, the format is as follows:

(2) Interrupt Channel Transfers
There are two types of Interrupt IN and Interrupt OUT, which can be sent at any time. 【Interrupt】

5. Requirements for HID in other layers
The interaction between HID and L2CAP is as follows:

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link
Powered by Social Snap