Hi Damien,
I think you have the same problem as me.
My descriptor:
> 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 )
I wanted to write 5 values with one usage. But I can't. I think it is a
bug in hiddev write.
======================================================
Sergey Vlasov [EMAIL PROTECTED] wrote:
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 is legal. However, the
current hiddev API does not have a way to work with such devices.
===================================================
The only way I managed to get it to write was to have the hid-core change my
usage to 5 and use the usage_index as an index of a usage in the selected
data item (passing one value at a time). Several people tried to help me
find a better solution, including Brad(he is a really good guy), but I was
unsuccessful. Let me know if you have any other questions or if you figure
out a better way to get it to work.
Thanks,
Jackson
> -----Original Message-----
> From: McGivern, Damien [mailto:[EMAIL PROTECTED]
> Sent: July 30, 2003 2:59 AM
> To: 'Brad Hards'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [linux-usb-devel] Simple write/read example
>
>
>
>
> >-----Original Message-----
> >From: Brad Hards [mailto:[EMAIL PROTECTED]
> >Sent: 27 July 2003 12:13
> >To: McGivern, Damien; 'Charles Lepple'
> >Cc: '[EMAIL PROTECTED]'
> >Subject: Re: [linux-usb-devel] Simple write/read example
> >
> >
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >On Mon, 21 Jul 2003 20:26 pm, McGivern, Damien wrote:
> >> I've search through the list archives and the web but
> still haven't
> >> been able to find a suitable example for what I need to
> do. Douglas
> >> Roberts had sort of the same problem as myself last year but never
> >> seemed to get it sorted either. All the examples I've seen
> so far only
> >> write input_event structures to the device which don't
> allow you to
> >> send an array of unsigned char's.
> >Are you trying to do kernel driver, or use the hiddev
> interface, or use the
>
> >input interface?
> >
> >Brad
>
> Hi Brad,
> my device control code has to be in user space and uses the hiddev
> interface.
> From what I've gathered so far I can only use the
> hiddev_usage_ref to send
> data
> to the device
>
> struct hiddev_usage_ref {
> unsigned report_type;
> unsigned report_id;
> unsigned field_index;
> unsigned usage_index;
> unsigned usage_code;
> __s32 value;
> };
>
> but this only allows a single int value to be sent as data
> (__s32 value;).
> If you look
> Through the archive you'll see that there's a couple of
> people that have
> been asking this question
> for a while but without success.
>
>
> Damien
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet
> _072303_01/01
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel