On Fri, 20 Jun 2003 14:22:10 -0600
Jackson Chan <[EMAIL PROTECTED]> wrote:

> > > Secondly, I am trying to write a single output report to my device
> > > that contains 5 bytes of data{0x13,0x13,0,0,0} through the Control
> > > (0) endpoint via a SetReport command.  I tried using hidiocsusage
> > > and hidiocsreport, but could not(& don't know how to) get it
> > > working.
> > 
> > What does this mean (in terms of the report data items)?
> > Please show the HID descriptor for your device - what report fields
> > does it have?
> 
> dmesg shows this:
> 
>   OUTPUT[OUTPUT]
>     Field(0)
>       Usage(1)
>         Digitizers.0000
>       Logical Minimum(0)
>       Logical Maximum(255)
>       Report Size(8)
>       Report Count(5)
>       Report Offset(0)
>       Flags( Variable Absolute BufferedByte )
> 
> So Count = 5 and each values size = 8. {0x13,0x13,0x00,0x00,0x00}

This looks like a bug/misfeature in hiddev - it does not support items
with Report Count > 1.

hiddev_usage_ref::usage_index is treated as an index of a usage in the
selected data item (and limited by hid_field::maxusage), and also used
as an index into the hid_field::value array. However, the number of
usages for a data item may be less than the number of values - see the
HID spec 1.11, page 40 (50):

        While Local items do not carry over to the next Main item, they
        may apply to more than one control within a single item. For
        example, if an Input item defining five controls is preceded by
        three Usage tags, the three usages would be assigned
        sequentially to the first three controls, and the third usage
        would also be assigned to the fourth and fifth controls. If an
        item has no controls (Report Count = 0), the Local item tags
        apply to the Main item (usually a collection item).

So the configuration with one usage and 5 values (as seen in the report
descriptor above) is legal. However, the current hiddev API does not
have a way to work with such devices.


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to