Post

Replies

Boosts

Views

Activity

Reply to HID reports issue migrating from IOKit.hid to CoreHID
I'll look deeper when I get home, but i do see one key difference; the buttons i'm trying to capture on the G600 is a 3x4 grid of 'macro' buttons use many times in MMORPGs, labels G9 to G20. I'm specifically un-mapping them from any standard inputs. As a result, the reports are not coming from the standard page/usage as in your code: HIDUsage(page: 0x01, usage: 0x06) I can get HID reports from the mouse and keyboard Input reports without issue with my mouse. So where there are no standard mouse and keyboard reports coming from these buttons now, the mouse still does send a HID report under the 'Vendor Defined' Usage Page of 0xFF80(note, that unlike your standard keyboard and mouse usage pages, this is a TWO byte value), and the usage of 0x80 (still one byte). Looking at your mouse, you might want to see if you have a similar entry in your HID report descriptor, as it does have extra buttons on the side 'G4' and 'G5'. My latest post above is a modified IOKit code that looks to use the standard input reports, showing they are in fact being generated
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
Now that I"m at the computer with the mouse, the primary HIDUsage from my last comment isn't the issue, that needs to be 0x01, 0x06 because the second usage page is under that primary usage. The issue is when I change your code fromdispatchGetReportRequest(type: .input, id: HIDReportID(rawValue: 1) to a rawValue: 0x80, then i get the following error: dispatchGetReportRequest failed: unknown(-536850432) And if you look at the last IOKit code, i did update that to use IOHIDManagerRegisterInputReportWithTimeStampCallback and it gets the report just fine.
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
I cannot see anything that is saying this shouldn't work. My guess is this is bug in CoreHID, most likely because the UsagePage in question is two bytes long instead of the usual one byte: 0x06, 0x80, 0xFF, // Usage Page (Vendor Defined 0xFF80) If you or anyone else has other ideas to try, I would definitely appreciate them.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
I'll look deeper when I get home, but i do see one key difference; the buttons i'm trying to capture on the G600 is a 3x4 grid of 'macro' buttons use many times in MMORPGs, labels G9 to G20. I'm specifically un-mapping them from any standard inputs. As a result, the reports are not coming from the standard page/usage as in your code: HIDUsage(page: 0x01, usage: 0x06) I can get HID reports from the mouse and keyboard Input reports without issue with my mouse. So where there are no standard mouse and keyboard reports coming from these buttons now, the mouse still does send a HID report under the 'Vendor Defined' Usage Page of 0xFF80(note, that unlike your standard keyboard and mouse usage pages, this is a TWO byte value), and the usage of 0x80 (still one byte). Looking at your mouse, you might want to see if you have a similar entry in your HID report descriptor, as it does have extra buttons on the side 'G4' and 'G5'. My latest post above is a modified IOKit code that looks to use the standard input reports, showing they are in fact being generated
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
Now that I"m at the computer with the mouse, the primary HIDUsage from my last comment isn't the issue, that needs to be 0x01, 0x06 because the second usage page is under that primary usage. The issue is when I change your code fromdispatchGetReportRequest(type: .input, id: HIDReportID(rawValue: 1) to a rawValue: 0x80, then i get the following error: dispatchGetReportRequest failed: unknown(-536850432) And if you look at the last IOKit code, i did update that to use IOHIDManagerRegisterInputReportWithTimeStampCallback and it gets the report just fine.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
And forgot to attach the full output: Output changing just the reportId from 1 to 0x80
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
OK, I don't know what all changed, but I went back from monitoring for the report event to the element update and it's working now. I'm still wondering why the report isn't picking up, but i can read the element and get the information I need now. Thanks again for your help, Kevin! You definitely helped fill a couple holes in knowledge for me in this.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
Yeah, I'm beginning to understand that gap between the intention and implementation. I'm still baffled how the Input Reports can work in IOKit as well as Windows.Net code but CoreHID is still giving that error, and it's gonna keep bugging me :P. But I'll look at that deeper after I get the functionality done in my utility. Thanks again!
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’25