USB: Raw HID send with multireports

N

NicoHood

Guest
Hi!
I try to use the raw HID program on windows. Its working fine but if i use a multireport on the microcontroller side i cannot send data to it. receiving still works (with adding the reportid to the report).
https://www.pjrc.com/teensy/rawhid.html

I only get:
Code:
sending...
err 87: The parameter is incorrect.

What i changed was adding a hid report:
Code:
#ifdef HID_RAWKEYBOARD_ENABLE
	// RAW HID
	0x06, LSB(RAWHID_USAGE_PAGE), MSB(RAWHID_USAGE_PAGE),	// 30
	0x0A, LSB(RAWHID_USAGE), MSB(RAWHID_USAGE),

	0xA1, 0x01,								// Collection 0x01
	0x85, HID_REPORTID_RawKeyboardReport,   // REPORT_ID <---
	0x75, 0x08,								// report size = 8 bits
	0x15, 0x00,								// logical minimum = 0
	0x26, 0xFF, 0x00,						// logical maximum = 255

	0x95, RAWHID_TX_SIZE,					// report count TX
	0x09, 0x01,								// usage
	0x81, 0x02,								// Input (array)

	0x95, RAWHID_RX_SIZE,					// report count RX
	0x09, 0x02,								// usage
	0x91, 0x02,								// Output (array)
	0xC0,									// end collection
#endif

I need to say that i use a lufa environmet and a 16u2. however this doesnt matter. Adding this one line makes the code not work. I think its just how the windows library is written. Ive no linux/mac version to test it. Any idea hot to fix this? Or why this happens? Or any idea how i can access rawHID with other tools? Reading is always fine, just sending not for multiple reports.
 
Back
Top