Hello,

Thanx to the help of gregkh I've figured out that the feature reports
I tried to generate are generating an EPIPE, which is a babble, which
means that I'm babbeling. Which is true.

The feature description says that I should send two bytes in a feature
report. According to the specifications of the device, sending (0x01,
0x00) in the report should result in the Max X coordinate being
returned in the feature report.
If I look at the data that is submitted in hid_submit_out, it contains
the values I've set.
However, sending the report itself ends with an EPIPE.

>From the BeOS developer I've heard that the report should also include
the report_id. Is that true, and, if so, is that automatically added?
(I was unsuccesful in following usb_submit_urb into the quadruple
indirection it contains).

I've attached the code that sets the two entries in the report, maybe
I'm overlooking something simple...

Thanx a lot,
EJ

   FEATURE(2)[FEATURE] 
     Field(0) 
       Physical(Digitizers.Stylus) 
       Usage(2) 
         Digitizers.003f 
         Digitizers.0040 
       Logical Minimum(0) 
       Logical Maximum(255) 
       Report Size(8) 
       Report Count(2) 
       Report Offset(0) 
       Flags( Variable Absolute ) 


        /* Get the report information first */
        memset(&rinfo, 0, sizeof(rinfo));
        memset(&uref, 0, sizeof(uref));
        rinfo.report_id = 2;
        rinfo.report_type = HID_REPORT_TYPE_FEATURE;
        if ((retval = ioctl(fd, HIDIOCGREPORTINFO, &rinfo)) < 0)
                goto error;

        fprintf(stdout, "Report (%d,%d)\n", rinfo.report_type,rinfo.report_id);
        if (get_report(fd, &rinfo)<0)
                goto error;

        /* Get the first usage, and then set it to cmd */
        uref.report_type = rinfo.report_type;
        uref.report_id = rinfo.report_id;
        uref.field_index = 0;
        uref.usage_index = 0;
        if (get_usage(fd, &uref)<0)
                goto error;
        fprintf(stdout, "Report (%d,%d)\n", uref.report_type,uref.report_id);

        uref.value = cmd;

        if (set_usage(fd, &uref)<0)
                goto error;

        /* Get and set the second usage */
        uref.usage_index = 1;
        if (get_usage(fd, &uref)<0)
                goto error;

        uref.value = arg;
        if (set_usage(fd, &uref)<0)
                goto error;

        /* Finalize the report */
        if (set_report(fd, &rinfo)<0)
                goto error;


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to