# Perform Bluetooth HOGP functions

Source: [https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-hogp-functions.html](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-hogp-functions.html)

You can perform HOGP functions using the `bluetoothctl` options and
        evtest tool.

Before you begin, set up your device as described in [Set up device for HOGP functions](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-hogp.html#bluez-hogp__section_g4p_4rv_mcc_navyanka_08-25-24-1354-32-878).

## Connect a remote device

To connect a remote device, run the following command from the
                    `bluetoothctl`
                menu:

    connect <bt_address>Copy to clipboard

**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:49Copy to clipboard

**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 successfulCopy to clipboard

## 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.

Note: The evtest tool is not
                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](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-low-energy-gatt-client-functions.html#bluez-perform-bluetooth-low-energy-gatt-client-functions__section_oyf_kts_lcc_navyanka_08-21-24-1425-50-130) on the DUT for the Bluetooth wireless mouse.
3. [Connect the
                        DUT](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-hogp-functions.html#bluez-perform-bluetooth-hogp-functions__section_wtd_4x5_mcc_navyanka_08-25-24-1122-5-392) 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 that are 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>Copy to clipboard

**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:49Copy to clipboard

**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: noCopy to clipboard

**Parent Topic:** [Human Interface Device over GATT Profile](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-hogp.html)

Last Published: Dec 26, 2024

[Previous Topic
Human Interface Device over GATT Profile](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/bluez-hogp.md) [Next Topic
Advanced Audio Distribution Profile](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/bluez-a2dp.md)