Control HID USB Device from iPad?

I have a custom HID USB device that I can control on Mac with IOKit via the default HID MacOS driver. I am using IOHIDManager to detect it and send reports to it. I would like to extend this capability to iPad but the full IOKit framework is not supported on iOS/iPadOS.

I saw that USBDriverKit is now supported on iPads with an M1 chip or newer. But, both MacOS and Windows can operate the device with their generic HID driver. As such, having to create a whole custom driver to interact with an HID device on iOS is really overkill.

Would registering it in the MFi Program and operating it with the External Accessory framework be the correct route to take here? Or is there another framework for controlling HID devices on iPad over USB that I am not aware of?

Accepted Reply

it seems that HIDDriverKit isn't available on iPadOS. But you can write your own code to detect your custom device (using USBDriverKit) and your own routines to read and write reports, which are usually pretty simple control pipe writes and interrupt pipe reads. If your device isn't horrendously complicated, this is easier than using EA, and you don't need to deal with MFi licensing.

  • I started creating a simple driver using USBDriverKit and a demo app to test the system extension using OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: , queue: ). The app has the .dext included and the system extension entitlement/capability. When I try to run it, I get: "extension failed category property check: extensions belonging to the com.apple.system_extension.driver_extension category require a later version of DriverKit to launch". Any ideas?

Add a Comment

Replies

it seems that HIDDriverKit isn't available on iPadOS. But you can write your own code to detect your custom device (using USBDriverKit) and your own routines to read and write reports, which are usually pretty simple control pipe writes and interrupt pipe reads. If your device isn't horrendously complicated, this is easier than using EA, and you don't need to deal with MFi licensing.

  • I started creating a simple driver using USBDriverKit and a demo app to test the system extension using OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: , queue: ). The app has the .dext included and the system extension entitlement/capability. When I try to run it, I get: "extension failed category property check: extensions belonging to the com.apple.system_extension.driver_extension category require a later version of DriverKit to launch". Any ideas?

Add a Comment