Skip to main content

Prerequisites

Before you begin, set up your device as described in Set up the device for HOGP functions.

Connect a remote device

To connect a remote device, run the following command from the bluetoothctl menu:
connect <bt_address>
Parameters <bt_address> is the Bluetooth address of the remote device. Example To connect to a paired remote device with <bt_address> 30:73:00:41:22:49, run the following command:
connect 30:73:00:41:22:49
Sample output
[bluetooth]# connect 30:73:00:41:22:49
Attempting to connect to 30:73:00:41:22:49
[CHG] Device 30:73:00:41:22:49 Connected: yes
[CHG] Device 30:73:00:41:22:49 Modalias: usb:v04E8p7021d0001
[CHG] Device 30:73:00:41:22:49 UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device 30:73:00:41:22:49 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 30:73:00:41:22:49 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 30:73:00:41:22:49 ServicesResolved: yes
[CHG] Device 30:73:00:41:22:49 WakeAllowed: yes
Connection successful

Verify HOGP functionality

The evtest tool is an open-source tool used to verify HOGP functionality. It monitors and queries device events of an input device, such as a mouse or keyboard.
The evtest tool isn’t available in the user build. To verify HOGP functionality, compile the tool from open-source and push it to the DUT.
Example To verify the functionality of a Bluetooth wireless mouse, do the following:
  1. Switch on the Bluetooth wireless mouse.
  2. Run a Low Energy scan on the DUT for the Bluetooth wireless mouse.
  3. Connect the DUT to the Bluetooth wireless mouse.
  4. Run the evtest tool in SSH.
  5. Select the Bluetooth wireless mouse from the list of connected input devices that appears on the screen.
  6. Use the mouse and perform different actions such as clicking, scrolling, dragging, and moving.
  7. Verify the events printed on the screen for each action.

Disconnect a remote device

To disconnect a remote device, run the following command from the bluetoothctl menu:
disconnect <bt_address>
Parameters <bt_address> is the Bluetooth address of the remote device. Example To disconnect a paired remote device with <bt_address> 30:73:00:41:22:49, run the following command:
disconnect 30:73:00:41:22:49
Sample output
[MyBTkeyboard]# disconnect 30:73:00:41:22:49
Attempting to disconnect from 30:73:00:41:22:49
[CHG] Device 30:73:00:41:22:49 ServicesResolved: no
Successful disconnected
[CHG] Device 30:73:00:41:22:49 Connected: no