Post

Replies

Boosts

Views

Activity

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'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
My line for notifications is: for try await notification in await deviceClient!.monitorNotifications(reportIDsToMonitor: [] , elementsToMonitor: [] ) { ... which sound like it should grab both reports and elements. I get NO reports from that usage. My windows test code looks to be getting an input report, making me think that i SHOULD be getting a report from CoreHID as well. And in my CoreHID test code, i also have a second attempt using HIDDeviceClient.RequestElementUpdate requesting that Element, and that also returns the kUSBHostReturnPipeStalled error.
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
Ah, the 4th digit information is what I was missing. Thank you for that information; that at least gives me something more to look into. I'm trying to solve that 0xE0005000 issues, as I'm trying to clean up the code and switch it to CoreHID. But as I have code that works using IOKit.hid and windows, and as the configuration for CoreHID looks pretty straight forward with minimal options or lower level access, I really don't have an Idea of a direction to go. I can get standard mouse events (movement and standard mouse buttons) just fine with the HIDDeviceClient.monitorNotifications() method. When asking for this usage, it doesn't get any events at all (no errors that i can see, just no events).
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
And I can confirm that input reports are being received just fine through a Windows app using the code attached. So there is something in CoreHID that is giving an error when trying to get this report. (using dispatchGetReportRequest in CoreHID just doesn't get any reports). C# Windows 10/11 example that works. Example C# output showing input reports working.
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
OK, broke it down with two simple examples. Note that on first run you need to enable Input Monitoring for the application under Privacy settings. For CoreHID, i tried two different ways, both error with the same result. For IOKit, it works just fine. Also attached is the full Device report descriptors for the mouse. Logitech G600 Gaming Mouse HID Report Descriptors HIDExample_CoreHID - errors HIDExample_IOKit.swift - Works
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to HID reports issue migrating from IOKit.hid to CoreHID
More troubleshooting: running the following line: let report = try await deviceClient!.dispatchGetReportRequest(type: .input, id: HIDReportID(rawValue: 0x80)) gives me an error of type CoreHID.HIDDeviceError.unknown with error code of 0xE0005000. I cannot find at all what that specific code corresponds to, and the error description is the generic unknown error text.
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’25
Reply to DriverKit code signing/driver loading issues.
Started from scratch one more time noting every small detail. Initially after adding the driverkit target, the signing profile was not set; building gave the error error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's. Looking at the settings, the Provisioning profile is set to Xcode Managed Profile with Signing Certificate set to None. I unchecked and re-checked the 'Automatically manage signing` and set my developer profile to fix this. Was this the correct way to proceed? @sscmith_c: Since you have a working setup do you mind telling what are your signing settings are set to for the DriverKit extension?
Topic: App & System Services SubTopic: Drivers Tags:
Oct ’22