Human Interface Device Service (HIDS)

Overview

This module implements the Human Interface Device Service with the corresponding set of characteristics. During initialization, it adds the Human Interface Device Service and a set of characteristics as per the Human Interface Device Service specification and the user requirements to the Bluetooth LE stack database.

If enabled, notification of Input Report characteristics is performed when the application calls one of the corresponding functions:

Configuration

Set the CONFIG_BLE_HIDS Kconfig option to enable the service.

The HID service can be configured by using the following Kconfig options:

Initialization

The service instance is declared using the BLE_HIDS_DEF macro, specifying the name of the instance. The service is initialized by calling the ble_hids_init() function. See the ble_hids_config struct for configuration details, in addition to the HID specification.

Usage

Events from the service are forwarded through the event handler specified during initialization. For a full list of events see the ble_hids_evt_type enum.

The application can send input reports by calling the ble_hids_inp_rep_send() function. Separate functions exist for sending boot keyboard and boot mouse input reports. See the ble_hids_boot_kb_inp_rep_send() and ble_hids_boot_mouse_inp_rep_send() functions, respectively. The application can get the current output reports by calling the ble_hids_outp_rep_get() function.

Usage of this service is demonstrated in the following samples:

Dependencies

This service has the following Bare Metal dependencies:

API documentation

Header file: include/bm/bluetooth/services/ble_hids.h
Source files: subsys/bluetooth/services/ble_hids/

Human Interface Device Service (HIDS) API reference