Sergey, I think you are right about the bug.
> This looks like a bug/misfeature in hiddev(output) - it does not support
items
> with Report Count > 1 (when the number of usages for a data item is less
than the
> number of values).
When I add this logic to the hid-core.c( to .hid_add_field() ), I can get it
to output the data to my device correctly (using the usage index. ie 5
usages for 5 values).
usages = parser->global.report_count;
This ofcourse is not a proper solution because the hid-core is actually
reading my report descriptor incorrectly (as usages never equals the report
count in my descriptor). It's almost like 2 wrongs make a right.
However, it shows that if I had the number of usages >= the number of
values, I could output. But I don't, so I can't :P :) And as you
explained, the hid spec allows for usages < values.
Thanks,
Jackson
> -----Original Message-----
> From: Sergey Vlasov [mailto:[EMAIL PROTECTED]
> Sent: June 23, 2003 10:18 AM
> To: Jackson Chan
> Cc: [EMAIL PROTECTED]
> Subject: [BUG] hiddev does not support Report Count > 1 (Re: HID &
> Hiddev troubles (write))
>
>
> 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