HID Host
This section presents the implemented profiles and services, user interactions, and testing methods for the HID Host application.
Implemented profiles and services
The HID Host application implements a GATT client or server for the following profile and service.
HID over GATT Profile v1.0
Battery Service v1.0
Device Information Service v1.1
The application behaves as a GAP central node. It enters the GAP Limited Discovery Procedure and searches for HID devices to connect to. After connecting with the peripheral, it configures notifications and displays the received HID reports on a terminal connected to the UART port. The application uses pairing with bonding by default. When connected with the HID Device application, it sends the 999999 passcode to the host stack by default.
Parent topic:HID Host
Supported platforms
The following platforms support the HID Host application:
KW45B41Z-EVK
K32W148-EVK
FRDM-MCXW71
KW47-EVK
MCXW72-EVK
FRDM-MCXW72
Parent topic:HID Host
User interface
After flashing the board, the device is in idle mode (all LEDs flashing). To start scanning, press the SCANSW button. When in GAP Limited Discovery Procedure, CONNLED is flashing. When the central node connects to the peripheral, CONNLED turns solid. To disconnect the node, hold the SCANSW button pressed for 2-3 seconds. The node then re-enters GAP Limited Discovery Procedure.
See User interface below for hardware references.
Platform |
SCANSW |
CONNLED |
---|---|---|
KW45B41Z-EVK / K32W148-EVK |
SW2 |
LED2 |
FRDM-MCXW71 |
SW2 |
Blue LED |
KW47-EVK / MCXW72-EVK |
SW2 |
LED2 |
FRDM-MCXW72 |
SW4 |
Blue LED |
Parent topic:HID Host
Usage
The application is built to work only with the HID Device application presented in HID Device (Mouse). It supports up to 2 peripherals connected at the same time.
Open a serial port terminal and connect it to board, in the same manner described in Testing devices. The start screen is displayed after the board is reset.
To start scanning for devices, press the SCANSW button on the HID Host board. To make it enter discoverable mode, perform the same step on the HID device board. The host connects with the board after it sees it advertise the HID service, connects to it, and configures report notifications. The device then starts sending HID reports, as shown in Figure 1.
To connect a second HID device, press again the SCANSW button on the HID Host board to start scanning for devices. Do the same on the second HID device board to make it enter discoverable mode. The host connects with the board after it sees it advertise the HID service, connects to it, and configures report notifications. The device then starts sending HID reports. The console displays reports from both devices, as shown in Figure 2.
Parent topic:HID Host
Parent topic:Bluetooth LE stack and demo applications