Hiya,

I'm trying to write a user-space tool for a simple HID device.  All this
 device wants is to either receive or send 8 bytes in 'Report 0'. 

Is there a way to do this via the hiddev interface?  Ideally, I'd like 
 to skip all the field and usage parsing, and just be able to say "here
 is the 8 bytes for the report, send it" or "give me the 8 bytes received
 in the report".

Alternatively, if someone could point me in the right direction for 
 achieving this via getting/setting usages, I'd be content.  However,
 I get the feeling that the configuration information emitted by this
 device might conflict with how the data actually needs to be parsed.

Appended to the end of this message is the debugging output produced
 by the hiddev module (via dmesg), as well as a dump of what user-space
 sees (via a little device-walking program I wrote).  I'm concerned by
 the "logical minimum = -128" line --- that seems to make the hid-core
 want to do arithmetic conversions.  I really just want to send my bytes.

Thanks for any suggestions,
-matt m.

---------------------------
Here is what hiddev says about the device in the kernel (2.4.22):

hub.c: new USB device 00:09.0-2, assigned address 4
hid-core.c: HID probe called for ifnum 0
hid-core.c: reading report type 1 id 0 failed len 8 read -32
Application(ffa0.0001)
  INPUT[INPUT]
    Field(0)
      Physical(ffa0.0002)
      Usage(2)
        ffa1.0003
        ffa1.0004
      Logical Minimum(-128)
      Logical Maximum(127)
      Physical Minimum(0)
      Physical Maximum(255)
      Report Size(8)
      Report Count(8)
      Report Offset(0)
      Flags( Variable Absolute )
  OUTPUT[OUTPUT]
    Field(0)
      Physical(ffa0.0002)
      Usage(2)
        ffa1.0005
        ffa1.0006
      Logical Minimum(-128)
      Logical Maximum(127)
      Physical Minimum(0)
      Physical Maximum(255)
      Report Size(8)
      Report Count(8)
      Report Offset(0)
      Flags( Variable Absolute )

---------------------------
And, here is what user-space is allowed to see about the device:

hiddev driver version is 1.0.4

vendor 0x0cc2 product 0xd700 version 0x0308 
  has 1 application 
  and is on bus: 2 devnum: 3 ifnum: 0

Application 0 is 0xffa00001 (Unknown page - needs to be added)

Report Info:
Report Type INPUT (0x1), ID 0x0:  fields = 1
  Field 0: 
    field index 7
    max usage 2
    flags 0x2
    physical usage 0xffa00002
     logical usage 0x0
    applicat usage 0xffa00001
    log min -128
    log max 127
    phy min 0
    phy max 255
    unit exp 0
    unit  0
   Usage 0:  code 0xffa10003
   Usage 1:  code 0xffa10004

Report Type OUTPUT (0x2), ID 0x0:  fields = 1
  Field 0: 
    field index 7
    max usage 2
    flags 0x2
    physical usage 0xffa00002
     logical usage 0x0
    applicat usage 0xffa00001
    log min -128
    log max 127
    phy min 0
    phy max 255
    unit exp 0
    unit  0
   Usage 0:  code 0xffa10005
   Usage 1:  code 0xffa10006


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to