mikeobrien / HidLibrary

This library enables you to enumerate and communicate with Hid compatible USB devices in .NET.
MIT License
585 stars 228 forks source link

Reading multiple reports (USB-HID-KBE) #122

Open minrajnepali opened 3 years ago

minrajnepali commented 3 years ago

Hi,

I have a device which is configured as USB-HID-KBE. It has two reports with report Ids as 0x01 and 0x02. 0x01 is designated as keyboard report ,0x02 is output report which i use to move data out from and to the device. Using "HidDevices.Enumerate(VendorId_KBE, ProductId_KBE).FirstOrDefault();" i can only read report 0x00 which actually is not present , I cannot write to or read from report Id 0x02. what might have been the reason?

This is the report structure ; / Keyboard page here HID_Usage(0x06),
HID_ReportID (0x01),
/ HID_UsagePageVendor(0x00 ), HID_Usage (0x01 ), HID_Collection ( HID_Application ), HID_ReportID (0x02), HID_LogicalMin ( 0 ), / value range: 0 - 0xFF / HID_LogicalMaxS ( 0xFF ), HID_ReportSize ( 8 ), / 8 bits / HID_Usage (0x1A), HID_ReportCount (HID_DECODE_STATUS_BYTE), HID_Input (HID_Data | HID_Variable | HID_Absolute ), HID_Usage (0x1B), HID_ReportCount (HID_OUTPUT_REPORT_BYTES_VENDOR), HID_Output (HID_Data | HID_Variable | HID_Absolute | HID_Array), HID_EndCollection

amullins83 commented 3 years ago

@mikeobrien Can chime in if he wants, but I don't believe this library is intended to be used with a keyboard, as those are handled differently by the operating system.