I am trying to open the CommunicationControl class IOUSBHostInterface in my USB driver, but it only seems to open on iPad Airs and not iPad Pros. I'm calling
ivars->interruptInterface->Open(this, 0, NULL);
After retrieving the interruptInterface from the device's InterfaceIterator. I try and open this, but on iPad Pros it returns kIOReturnNotOpen. I've tried closing and reopening the IOUSBHostDevice, closing and reopening the Interface, AbortDeviceRequests before opening, etc. but it just seems to work on iPad Air and not iPad Pro.
I've tried on both iPadOS 17.6.1 and 18.2
Has anyone else seen this?
I am trying to open the CommunicationControl class IOUSBHostInterface in my USB driver, but it only seems to open on iPad Airs and not iPad Pros. I'm calling ivars->interruptInterface->Open(this, 0, NULL);
After retrieving the interruptInterface from the device's InterfaceIterator. I try and open this, but on iPad Pros it returns kIOReturnNotOpen.
So, the place to start here is by understanding what's actually happening in the IORegistry. This is easy on the mac* (you can use IORegistryExplorer or ioreg) but on iPadOS you'll need to collect a sysdiagnose and extract the data from there.
*Feel free to file an enhancement request asking for better IOKit diagnostic tools, as I think IORegistryExplorer for iPadOS could be quite useful.
Inside the sysdiagnose, you'll find a directory called "ioreg" and the file IOService.txt is what you're actually looking for. The files in that directory are the same output you'd get running the this command on macOS command:
ioreg -l -p <plane>
At that point, it's basically a matter of finding your device/driver in the registry and "seeing what you find". My guess is that there is some other driver other driver/issue involved.
I'd also recommend reproducing the failure a few time before you collect the sysdiagnose, which will then let you search the console log to see what was logged by the kernel driver. kIOReturnNotOpen is used for several different issues in inside IOUSBHostInterface, but most of them also log describing what the failure actually is.
Lastly, on this point:
...but it just seems to work on iPad Air and not iPad Pro.
I would use the same technique above to grab a sysdiagnose from the iPad Air, probably pulling two different ones:
-
When you driver has matched but before it's own the interface.
-
After the interface is open.
If the issue isn't immediately clear from the individual ioreg snapshot, comparing a the failing configuration to a working configuration will often make the issue obvious.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware