HID

The HID profile is a generic implementation of HID, this gives better control of the HID capabilities and the supported hid descriptors.

HID host will connect to any HID device, and to identify the HID device, it is possible to use HID_READ {BD ADDR} command to read the HID descriptor of the remote device.

In HID device mode, Audio Agent starts with the default descriptor. The default descriptor is for a simple keyboard without any extra keys (e.g. media keys).

To modify the descriptor, the HID_DESC {size} command should be used.

>DESC {size}
>{binary data}

Size is the number of octets of binary data following. Make sure you set the descriptor before opening the HID connection.

When HID reports are received over hid, an event will be received:

>RECV HID {size} {data}

Size is the number of octets of binary data following. Audio Agent simply outputs the received data without processing. It is the responsibility of the host to handle it.

To send data:

>SEND {link id} {size}
>{binary data}

“link id” is the id of the HID connection (can be retrieved by sending STATUS command). “size” is the length of binary data to send. Similarly to receive data, any data sent is not parsed or processed by Audio Agent, only sent to the remote device.