# Re: HID Output and Feature Reports

- List: linux-input
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-input/2012/05/8919609/t

## Re: HID Output and Feature Reports

- From: Joao Paulo Rechi Vita \<hidden\>
- Date: 2012-05-29 22:14:47 
- Message: https://ratatoskr.run/linux-input/2012/05/8919609.md

```text
Hello David,

On Sat, May 26, 2012 at 7:44 AM, David Herrmann
[ref] wrote:
> Hi Joao
>
> I CC'ed Jiri as he is the HID maintainer.
>
> On Fri, May 25, 2012 at 10:51 PM, Joao Paulo Rechi Vita
> [ref] wrote:
>> Hello all,
>>
>> I'm working to support HID over GATT (HoG), which is HID over
>> Bluetooth Low Energy links, both on kernel and userspace. Traffic
>> coming from the remote peripheral through a L2CAP socket will be
>> handled in usespace, where the HID input reports are decapsulated from
>> GATT and injected back into the kernel through the new uHID module
>> written by David Herrmann. This module works similar to uinput, but
>> dealing with HID traffic.
>>
>> The input part is working without problems and now I looking how to
>> support Output and Feature reports. Doing some basic testing it seems
>> we don't support Output reports very well. A basic use-case for that
>> is synchronizing keyboard leds (CAPS, NUM, etc) when there is more
>> than one keyboard connected, and I couldn't get this to work on my
>> tests. I didn't try to test feature reports since it's still not very
>> clear to me when they're used. The HID spec says that they exist for
>> setting values/controls on the peripheral that are not visible to the
>> user, but I haven't discovered any real-world use case for them. What
>> is the current state for these reports, do we support them somehow?
>
> I think my last revision of uhid added support for feature-reports.
> However, they are not used by the generic hid-input driver. If there
> is currently no specialized bluetooth-LE HID driver, you also do not
> need to worry about it.
>

Yes, I've seen the new event types for them, what I'm looking for is
how to trigger them.

> I think the new generic HID battery-detection code uses the
> feature-reports. However, its disabled by default if I remember
> correctly.
>

I will check this out, thanks for the hint.

> About output-reports: Do you correctly receive the UHID_OUTPUT_EV
> request in user-space? Do you send the packet to the device? How do
> you format it?
>

I was correctly receiving it with the previous version of your patch.
With this new version I still receive an event coming from the host,
but with ev.type value out of the enum range (different values like
this: 2062073856).

What is the difference between UHID_OUTPUT_EV and UHID_OUTPUT events?
Should both of them be written to the device?

>> Also, I've found usbhid-dump by Greg K-H, but it doesn't seem to dump
>> data coming from the host to the device. Is this on the plans for this
>> tool? I can try to send a patch for it, if someone can guide me on how
>> this whole output/feature reports thing should work.
>
> Regards
> David

-- 
João Paulo Rechi Vita
Openbossa Labs - INdT
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```

## Re: HID Output and Feature Reports

- From: Jiri Kosina \<hidden\>
- Date: 2012-06-08 08:26:40 
- Message: https://ratatoskr.run/linux-input/2012/06/8919664.md

```text
On Tue, 29 May 2012, Joao Paulo Rechi Vita wrote:

> > I think the new generic HID battery-detection code uses the
> > feature-reports. However, its disabled by default if I remember
> > correctly.
> 
> I will check this out, thanks for the hint.

Yes, battery power level is one place where feature reports are currently 
being used.

There are also several devices that need specific feature report to be 
sent to them in order to be able to use them at all (initialization). 
Magicmouse, to name another example, uses feature report to switch it 
between singletouch and multitouch modes. Etc.

-- 
Jiri Kosina
SUSE Labs
```
