USB HID with different Report ID's
Posted: Sun Mar 02, 2008 11:22 pm
Hello,
Setup: Mega8 Low Speed
i'm currently building an USB IO device and have a question.
Here ist my HID Descriptor
I got this working with control transfer, because I can send my Report ID. My transfer rate is about 5kb/sek.
I try to implement an interrupt In too, that I don't have to poll the 40 Bytes again and again.
The problem is, that I want to let the computer poll only the report with ID 1, so that i must only send 1 Byte.
I checked it with an USB Analyser software, but it doesn't work. The computer send "get 40 bytes" and my controller answers with 2 bytes. (Report ID + data).
How can I tell the computer to poll the 2 Bytes for Report 1?
When I read and write over GetReport and SetReport it works, but not with Readfile.
Setup: Mega8 Low Speed
i'm currently building an USB IO device and have a question.
Here ist my HID Descriptor
Code: Select all
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x00, // USAGE (Undefined)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x02, // COLLECTION (Logical)
0x85, 0x01, // REPORT_ID (1)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x01, // REPORT_COUNT (1)
0x09, 0x00, // USAGE (Undefined)
0x81, 0x02, // INPUT (Data,Var,Abs)
0xc0, // END_COLLECTION
0xa1, 0x02, // COLLECTION (Logical)
0x85, 0x02, // REPORT_ID (2)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x27, // REPORT_COUNT (39)
0x19, 0x00, // USAGE_MIN (Undefined)
0x29, 0x00, // USAGE_MAX (Undefined)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x19, 0x00, // USAGE_MIN (Undefined)
0x29, 0x00, // USAGE_MAX (Undefined)
0x91, 0x02, // OUTPUT (Data,Var,Abs)
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
I got this working with control transfer, because I can send my Report ID. My transfer rate is about 5kb/sek.
I try to implement an interrupt In too, that I don't have to poll the 40 Bytes again and again.
The problem is, that I want to let the computer poll only the report with ID 1, so that i must only send 1 Byte.
I checked it with an USB Analyser software, but it doesn't work. The computer send "get 40 bytes" and my controller answers with 2 bytes. (Report ID + data).
How can I tell the computer to poll the 2 Bytes for Report 1?
When I read and write over GetReport and SetReport it works, but not with Readfile.