KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice

Hi all ,
I have been trying to communicate with my device in my Big Sur, I am able to open IOUSBHostDevice in start function , But not getting Interface(IOUSBHostInterface),
IOUSBHostDevice ::CreateInterfaceIterator();
is returning Null value, Unable to use getchildIterator().

Any Help is appreciated
Answered by in 667784022
Interfaces are created when the device is configured. If you're matching on an IOUSBHostDevice you'll likely need to configure the device from your driver which will, in turn, create the interfaces. If you only require working with interfaces and you have a composite device (class/sub-class = 0) or interface association device (class = 239, sub-class = 2, protocol = 1) consider matching on the IOUSBHostInterface instead and allowing the Apple provided (AppleUSBHostCompositeDevice) driver to configure the device.
IOUserUSBSerial is going to expect a USB interface for your provider, not a device. This is most likely why your initialization is failing. Instead of opening the interface and making a device request, leave the interface as you find it without opening it, and use it in your call to Start instead of "provider." That should significantly change things, so let me know what it looks like after you do that.
Hi Drebadour ,

Since I am passing interface to IOUserUSBSerial , I am able to work with my device now thanks a lot , your support is invaluable.
KEXT to DEXT:Unable to getInterface of my IOUSBHostDevice
 
 
Q