Ports and Interfaces > USB

help with a simple report design change

<< < (2/2)

ulao:
Ok ignore that I was not seeing the real picture. I didnt know a get descriptor was being issue before get report. So I though it was sending the wrong controller type. What really is going on is, using the 17(get) report or 18(set) report < 128 is not showing up. Any thing > 128 is.

example
0xa1, 0x01,                    // COLLECTION (Application)
        0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
        0x26, 0xff,                    //   LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //   REPORT_SIZE (8)
   
        0x85, 0x11,                    //   REPORT_ID (17)
         0x96, 0x02, 0x00,               //   REPORT_COUNT (512)
        0x09, 0x00,                    //   USAGE (Undefined)
        0xb2, 0x02, 0x00,              //   FEATURE (Data,Var,Abs,Buf)
   
        0x85, 0x12,                    //   REPORT_ID (18)
        0x96, 0x02, 0x00,              //   REPORT_COUNT (512)
        0x09, 0x00,                    //   USAGE (Undefined)
        0xb2, 0x02, 0x01,              //   FEATURE (Data,Var,Abs,Buf)
    0xc0,                           // END_COLLECTION

 device.GetFeatureReport(inputReportBuffer, 200); //shows up when sniffing

 device.GetFeatureReport(inputReportBuffer, 100);//does not show up.

Why, I can not figure that out? I want my report 17 to be 512 and request the size I need. I also tried to set it to 64 and request 64 but still my get report request is not showing up. It almost has to be the hid library but I find that extremely hard to believe.

Jan Axelson:
If the report size is 512 bytes, you can't request < 512 bytes.

ulao:
 I also tried to set the descriptor  64 and request 64 so they match but still my get report request is not showing up. 

0xa1, 0x01,                    // COLLECTION (Application)
        0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
        0x26, 0xff,                    //   LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //   REPORT_SIZE (8)
   
        0x85, 0x11,                    //   REPORT_ID (17)
        0x96, 0x40                      //   REPORT_COUNT (512)
        0x09, 0x00,                    //   USAGE (Undefined)
        0xb2, 0x02, 0x00,              //   FEATURE (Data,Var,Abs,Buf)
   
        0x85, 0x12,                    //   REPORT_ID (18)
        0x96, 0x40                    //   REPORT_COUNT (512)
        0x09, 0x00,                    //   USAGE (Undefined)
        0xb2, 0x02, 0x01,              //   FEATURE (Data,Var,Abs,Buf)
    0xc0,                           // END_COLLECTION

 device.GetFeatureReport(inputReportBuffer, 200); //shows up when sniffing

 device.GetFeatureReport(inputReportBuffer, 100);//does not show up.

and of course I tried
device.GetFeatureReport(inputReportBuffer, 64); //but anything less then 128 fails.

Though if I change the ReportID to 3 (one of my other reports) any size will work.  It gets more data then I needed, and junk data at that but at least it works. I''m so confused why this report in particulate will not allow me to send less then 128. I understand what you mean, per documentation they must match. Though even if I match it still never shows up. It's like the report does not exist.

ulao:
Never mind, moron error.  I was not flashing the right hex file.

Navigation

[0] Message Index

[*] Previous page

Go to full version