1
votes

I am having a slightly weird problem relating to reading a USB device on the Mac. The device is a Amplifier so it passes audio and HID messages.

OSX 10.9.4 Using IOKit USB Debug logging library.

When plugging in and attempting to setup the USB device for reading and writing, it fails when opening the Interface with error 0xE00002D5.

I should say that this device has worked correctly on the Mac with a different ProductID. Changing the ID to any other value apart from it's original value causes the above error. Prior to this issue, the USB has worked correctly with three other devices for the past few years. If I change the ProductID back to one of the released values this works fine.

I am just a little confused about this sudden change of behavior. The USB device works well on the Windows platform.

I have traced the USB via logging enabled libraries and USB Prober, I'll include the failed log output (I'll apologize in advance for placing in question) I have removed the name of the amplifier and also the vendor and product id:

Feb 11 15:42:14.273  [6]    Finding device driver for [REMOVED], matching user client dictionary, score: 89000
Feb 11 15:42:14.273  [6]        Matched: idVendor ([REMOVED]) idProduct ([REMOVED]) 
Feb 11 15:42:14.273  [6]        Didn't Match: nothing
Feb 11 15:42:14.279  [5]    IOUSBDeviceUserClientV2[0xffffff80483a4c00]::initWithTask  Owning PID is 1009, name is TestUSB
Feb 11 15:42:14.279  [6]    +IOUSBDeviceUserClientV2[0xffffff80483a4c00]::start(0xffffff8048384b00)
Feb 11 15:42:14.279  [5]    CompositeDriverInterestHandler received kIOMessageServiceIsAttemptingOpen with argument: 0
Feb 11 15:42:14.279  [6]    [REMOVED][0xffffff8048384b00]::handleOpen - IOUSBDeviceUserClientV2[0xffffff80483a4c00] added to open set, _OPEN_CLIENTS count: 11
Feb 11 15:42:14.279  [6]    -IOUSBDeviceUserClientV2[0xffffff80483a4c00]::start
Feb 11 15:42:14.279  [6]    +IOUSBInterfaceUserClientV3[0xffffff80483a5000]::initWithTask
Feb 11 15:42:14.279  [5]    IOUSBInterfaceUserClientV2[0xffffff80483a5000]::initWithTask  Owning PID is 1009, name is TestUSB
Feb 11 15:42:14.279  [6]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::start(0xffffff803760f400)
Feb 11 15:42:14.279  [6]    IOUSBInterface[0xffffff803760f400]::open calling super::open with gate
Feb 11 15:42:14.279  [6]    IOUSBHIDDriver[0xffffff8037613400]::message type: 0xe0000101, argument = 0 isInactive = 0 
Feb 11 15:42:14.279  [6]    +IOUSBInterface[0xffffff803760f400]::handleOpen (device [REMOVED])
Feb 11 15:42:14.279  [6]    IOUSBInterface[0xffffff803760f400]::handleOpen - IOUSBInterfaceUserClientV3[0xffffff80483a5000] added to open set
Feb 11 15:42:14.279  [6]    -IOUSBInterfaceUserClientV2[0xffffff80483a5000]::start
Feb 11 15:42:14.279  [5]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::open isInactive: 0
Feb 11 15:42:14.279  [6]    IOUSBInterface[0xffffff803760f400]::open calling super::open with gate
Feb 11 15:42:14.279  [6]    IOUSBHIDDriver[0xffffff8037613400]::message type: 0xe0000101, argument = 0x20000 isInactive = 0 
Feb 11 15:42:14.279  [6]    +IOUSBInterface[0xffffff803760f400]::handleOpen (device [REMOVED])
Feb 11 15:42:14.279  [5]    IOUSBInterface[0xffffff803760f400]::handleOpen - [0xffffff80483a5000] is a IOUSBInterfaceUserClientV3, exclusiveOpen = TRUE
Feb 11 15:42:14.279  [6]    IOUSBInterface[0xffffff803760f400]::handleOpen - super::handleOpen returned 0x0
Feb 11 15:42:14.279  [2]    IOUSBInterface[0xffffff803760f400]::open super::open failed (0xe00002be)
Feb 11 15:42:14.279  [2]    IOUSBInterface[0xffffff803760f400]::open super::open failed (0x0)
Feb 11 15:42:14.279  [5]    IOUSBInterfaceUserClientV2[0xffffff80483a5000]::open fOwner->open() failed.  Returning kIOReturnExclusiveAccess
Feb 11 15:42:14.279  [5]    -IOUSBInterfaceUserClientV2[0xffffff80483a5000]::open - returning 0xe00002c5 (device is exclusive access)
Feb 11 15:42:14.279  [6]    IOUSBInterfaceUserClientV2[0xffffff80483a5000]::clientClose
Feb 11 15:42:14.279  [6]    IOUSBInterfaceUserClientV2[0xffffff80483a5000]::ClientCloseEntry  calling ClientCloseGated
Feb 11 15:42:14.279  [5]    +IOUSBInterfaceUserClientV3[0xffffff80483a5000]::ClientCloseGated  FNOTIFICATION_SET [0]
Feb 11 15:42:14.279  [5]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::ClientCloseGated  isInactive = 0, fOutstandingIO = 0, FOWNER_WAS_RELEASED: 0
Feb 11 15:42:14.279  [6]    IOUSBInterfaceUserClientV2[0xffffff80483a5000]::ClientCloseGated  calling fOwner(0xffffff803760f400)->release()
Feb 11 15:42:14.279  [5]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::ClientCloseGated  calling terminate()
Feb 11 15:42:14.279  [6]    IOUSBInterfaceUserClientV3[0xffffff80483a5000]::terminate  calling super::terminate
Feb 11 15:42:14.280  [6]    -IOUSBInterfaceUserClientV3[0xffffff80483a5000]::terminate
Feb 11 15:42:14.280  [6]    -IOUSBInterfaceUserClientV2[0xffffff80483a5000]::ClientCloseGated isInactive(1), fOutstandingIO (0)
Feb 11 15:42:14.280  [6]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::finalize(00000005), isInactive = 1, fOutstandingIO = 0, inGate: Yes
Feb 11 15:42:14.280  [6]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::stop(0xffffff803760f400), IsInactive: 1, outstandingIO: 0, inGate: Yes
Feb 11 15:42:14.280  [6]    -IOUSBInterfaceUserClientV2[0xffffff80483a5000]::stop(0xffffff803760f400)
Feb 11 15:42:14.280  [6]    IOUSBInterface[0xffffff803760f400]::handleIsOpen - IOUSBInterfaceUserClientV3[0xffffff80483a5000] has us open
Feb 11 15:42:14.280  [6]    IOUSBInterface[0xffffff803760f400]::close  called from an IOUSBInterfaceUserClientV2/V3 client that was not open exclusively, so no need to abort pipes
Feb 11 15:42:14.280  [6]    IOUSBInterface[0xffffff803760f400]::close calling super::close with gate
Feb 11 15:42:14.280  [6]    IOUSBInterface[0xffffff803760f400]::handleIsOpen - IOUSBInterfaceUserClientV3[0xffffff80483a5000] has us open
Feb 11 15:42:14.280  [6]    +IOUSBInterface[0xffffff803760f400]::handleClose
Feb 11 15:42:14.280  [6]    IOUSBInterface[0xffffff803760f400]::handleClose - IOUSBInterfaceUserClientV3[0xffffff80483a5000] removed from open set
Feb 11 15:42:14.280  [6]    -IOUSBInterface[0xffffff803760f400]::handleClose
Feb 11 15:42:14.280  [6]    IOUSBHIDDriver[0xffffff8037613400]::message type: 0xe0000110, argument = 0 isInactive = 0 
Feb 11 15:42:14.280  [5]    +IOUSBInterfaceUserClientV3[0xffffff80483a5000]::free
Feb 11 15:42:14.280  [6]    +IOUSBInterfaceUserClientV2[0xffffff80483a5000]::free
Feb 11 15:42:14.280  [5]    -IOUSBInterfaceUserClientV3[0xffffff80483a5000]::free

You may have guessed that I'm not a Mac expert, so any assistance would be greatly received.

Thank you.

1
First things first: is there a kext for this device, or is it driven entirely from users space? Do you have any source code for the software or is this someone else's software?pmdj
I am assuming this is using users space as nothing is installed relating to the USB device.I have source code, for both the USB device and the library (IOKit) The fact that ex: change productID to x0010 on the device - it all works, change productID to 0x0020, it fails. I'm using a wildcard '*' for the productID (IOServiceAddMatchingNotification). I can post snippets of the source here, however the fact that it works for the original productID and has been for several months; points to an OS issue (I think :-) ). I have only tried this on two Macs however, both having 10.9.4 installed. .Neil
Have you compared the two situations in IORegistryExplorer? (it's available as part of the I/O and Hardware Tools package on Apple's developer download site) My hunch is that something else is creating a user client and hogging the device when you change the product ID. You should see this (and see which process it is) in IORegistryExplorer.pmdj
Sigh ... many thanks for your help pmdj. I have just been talking to my friend about kexts, as I said I'm not a Mac developer, and ... our installer does install kexts for the devices. So, this has been the problem all along. I have certainly gained a better understanding and thank you for mentioning the magic word 'kext' that triggered the eureka moment. I will mark this as answered.Neil
Cool, glad you got it fixed!pmdj

1 Answers

0
votes

Missing kext for the USB Device.

Many thanks for all that have viewed this.

Thanks to pmdj, I found out that a new kext needed to be created and loaded on to the system. All functionality is now working between the device and our application.

I will now add this addition to the installer.