SmartSnippets DA1459x SDK
HOGP Host

Overview

The application is a sample implementation of the HOGP Host of the HID Over GATT Profile, as defined by the Bluetooth Special Interest Group.

The application supports both the Boot Host and the Report Host modes.

It supports clients for:

  • the GATT Service
  • the HID Service
  • the Scan Parameters Service
  • the Device Information Service
  • the Battery Service

Features:

  • Browsing for supported services (the services are listed above)
  • Both Boot Host and Report Host roles are supported (configurable in build time in hogp_host_config.h)
  • The Report Host role supports reading and writing to Input, Output and Feature reports and notifications for Input reports
  • The Report Host role reads Report Map, HID Info and External Report References
  • The Boot Host role supports notifications for the Boot Mouse Input, the Boot Keyboard Input reports and reading/writing operations for all Boot Report characteristics
  • Most user interactions such as reports writing are exposed via console interface
  • Incoming report's values are printed out to a terminal

Installation procedure

The project is located in the projects/dk_apps/ble_profiles/hogp_host folder.

To install the project follow the General Installation and Debugging Procedure.

Suggested configurable parameters

  • the Host role: Set the CFG_REPORT_MODE macro in the hogp_host_config.h
  • the Connection parameters: Set the CFG_CONN_PARAMS macro in the hogp_host_config.h

PTS testing

The application can be easily used for executing HOGP and SCPP PTS test cases. User interaction might be triggered by using serial terminal.

Manual testing

  • Build the demo for an execution from the flash.
  • Download the hogp_host.bin binary to flash and execute.
  • Connect with the serial port terminal.
  • Debug logs are printed out to the console
  • In order to trigger commands, connect serial terminal

Available commands

<tt>get_protocol <hid_client_id></tt>

Get Protocol Mode command.

<tt>cp_command <hid_client_id> <command></tt>

Control Point Command.

<tt>boot_read <hid_client_id> <boot_report_type></tt>

Read Boot Report.

<tt>boot_write <hid_client_id> <boot_report_type> <data></tt>

Write Boot Report.

<tt>boot_notif <hid_client_id> <boot_report_type> <enable flag></tt>

Write Boot Report CCC descriptor.

<tt>boot_read_ccc <hid_client_id> <boot_report_type></tt>

Read Boot Report CCC descriptor.

<tt>report_read <hid_client_id> <report_type> <report_id></tt>

Read Report.

<tt>report_write <hid_client_id> <report_type> <report_id> <confirm_flag> <data></tt>

Write Report.

<tt>report_notif <hid_client_id> <report_id> <enable></tt>

Write Input Report CCC descriptor.

<tt>report_read_ccc <hid_client_id> <report_id></tt>

Read Input Report CCC descriptor.

<tt>scan <start|stop> [any]</tt>

Start and stop scanning procedure.

Type scan start to start scanning for devices with the HIDS service. Only devices which include UUID_SERVICE_HIDS (0x1812) in their advertising data will be listed.

To list any device found type scan start any instead.

The returned list of devices includes an index, a device address and a device name (if available).

Once the desired device is found, type scan stop to stop scanning.

<tt>connect <address> [public|private]</tt>

Connect to peripheral device.

The address type is searched on the found devices list (if present) or assumed to be public if not found. It can be however specified manually by typing connect <address> public or connect <address> private for public and private address type respectively.

<tt>connect <index> [public|private]</tt>

Connect to peripheral device which is matched to the index.

<tt>connect cancel</tt>

Cancel ongoing connection attempt.

<tt>disconnect</tt>

Disconnect first peripheral on list of connected devices.