Hello Kevin,
First of all thank You for your extensive reply, I think there is a reasonable amount of information to move on.
MacOS actually has two separate USB access libraries. The original API is IOUSBLib, which is a C library built on COM. It is both very old (introduced in 10.0) and relies on a compatibility layer built into the kernel. I would strongly recommend you not use it.
It's replacement was the IOUSBHost framework, which is an ObjectiveC framework we created when when we rewrote our USB stack. Note that as you look at our USB APIs, "IOUSB<>" is the legacy API/compatibility layer, while "IOUSBHost<>" is the modern driver stack.
If you're new to our platform you might prefer to use C over ObjectiveC, but my personal recommendation would be to strongly prefer the IOUSBHost framework over IOUSBLib. Frankly, ObjectiveC is nicer to pick up than you might think, a sentence no one on earth has ever said about COM.
The main reason to work with C it's because we are upgrading an application for which the control SW was initially developed using C, to run on both Mac/Win/Linux. The idea is to maintain this philosophy as much as possible.
If Objective-C API framework environment is the preferred and most supported by Apple, it is likely we will use it for USB communication.
I actually don't know the required steps to link together Objective-C and C compiled binaries, it might be not so easy to accomplish, but not impossible of course.
The basic question here is "what's actually going on and what do you want to happen"?
Yep. Of course I have no idea why the OS keep the device in busy state. I suspect a driver is actually keeping it busy, how and why is out of my understatement right now. I have to investigate.
Thanks again!
Simon
Topic:
App & System Services
SubTopic:
Core OS
Tags: