We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
dig around with/for HID reports, i ran into a strange problem within a WinXP test application that i wrote.
Following configuration: 1 (non compound) device with 1 config with 1 interface (HID) with 2 endpoints wheras 1 interrupt in (ep1) and 1 interrupt out (ep2)
Setting and requesting the reports through control transfer (ep0) works like a charme, but with interrupt transfers the host application first sets an report without any problem, but the request of the following in interrupt leads to a problem. I figured out that the in interrupt terminates on the wrong (ep2) endpoint. within the win api i used readfile in an overlapped mode, but there is no chance to define a endpoint. why isn't the interface interpreted correctly by the hostapp? or is there something to define elsewhere?
thx & kr
> .) during enum host gets HID CAPS and therefore adds one byte (why? i though the 64 is with id)
For this report descriptor (copied from the trace), HidP_GetCaps return these size, HIDP_CAPS.InputReportByteLength = 64 (= 1 ID + 63 body) bytes HIDP_CAPS.OutputReportByteLength = 1024 (= 1 ID + 1023 body, the greatest) bytes
Interface 0 HID Report Descriptor Vendor-Defined 1 Item Tag (Value) Raw Data Usage Page (Vendor-Defined 1) 06 00 FF Usage (Vendor-Defined 1) 09 01 Collection (Application) A1 01 Logical Minimum (0) 15 00 Logical Maximum (255) 26 FF 00 Report Size (8) 75 08 Report ID (1) 85 01 Report Count (63) 96 3F 00 Usage (Vendor-Defined 1) 09 01 Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 Usage (Vendor-Defined 1) 09 01 Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02 Report ID (2) 85 02 Report Count (1023) 96 FF 03 Usage (Vendor-Defined 1) 09 01 Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 End Collection C0
> .) the device writes data into the ep fifo and signals readiness (TX_READY). when data is smaller then the max packet size of the ep nothing has to be done. fine.
> if data is bigger than maxp also nothing has to be done. Don't write greater size than endpoint wMaxPacketSize to the endpoint. The rest is written when the next IN endpoint interrupt comes.
> only when the data size is a multiple of the maxp an aditional ZLP has to be sent. When you send the input report of shorter size, it's fine. For the greatest size report, ZLP is not required.
> .) host writing report id in the first byte of buffer and readfile() from device. No. Host can't specify coming report. Host always passes a buffer of the greatest size (+ report ID). When ReadFile returns, the first byte shows the report ID of received report.
Tsuneo