Hi All !
I have built USB communication between STM32 and Soft sample of Jan Axelson (generic_hid_cs_50).
I also use Report Descriptor that Mr.Jan support in Pic sample code.
And every thing is ok: receive/send data via control transfer with feature report or in/out report.
But when i use in/out report with interrupt transfer ,the host can't catch anything from my device (STM32),it announs
Time Out .
Host can send data to my device,and my device also send data to host correctly (i use Data center with Beagle tool to catch the packets.But if i use Advanced USB Port Monitor,it can't get anything).I can't make it clear.
So i guess that's something wrong with
AsyncCallback(GetInputReportData) to receive InputReport in code
:
fileStreamDeviceData.BeginRead(inputReportBuffer, 0, inputReportBuffer.Length, new AsyncCallback(GetInputReportData), inputReportBuffer);
Because when i debug,i found everything is ok.But this line didn't work right.
inputReportBuffer had no data,it received nothing.
I also change buffer size from 32 to 64 (fix with data size from device) but it doesn't work
.
I stuck with this issue for many hours.Any ideas?
Please check and help me .
Thanks and Best Regards
Ps:here's report:
0x06, 0xA0, 0xFF, // Usage page (vendor defined)
0x09, 0x01, // Usage ID (vendor defined)
0xA1, 0x01, // Collection (application)
// The Input report
0x09, 0x03, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95,0x3F, //63+1 byte report_count
0x81, 0x02, // Input (Data, Variable, Absolute)
// The Output report
0x09, 0x04, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (o)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95,0x3F, //63+1 byte report_count
0x91, 0x02, // Output (Data, Variable, Absolute)
// The Feature report
0x09, 0x05, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (o)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95,0x3F, //63+1 byte report_count
0xB1, 0x02, // Feature (Data, Variable, Absolute)
0xC0