Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: unable to open interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unable to open interface

The question and symptoms raised by Tim sounds like a situation where Classic is active and the code demonstrates the "User Mode USB Device Arbitration" symptoms under 10.1.x. This problem is discussed in depth in the document

/Developer/Documentation/IOKit/usb/Classic USB Device Ar#14DC2.rtf

As for Joe's question, is the control interface which is being accessed, one for which an Apple driver has already matched to or not (assuming classic is not active). For an audio device, there is the control interface and the audio interface which normally get matched by the Apple Audio Class driver. If the intention is to access the control portion of the device, the issue may be different as the Apple class driver already has exclusive access to the device. If as is indicated, there are not the API's to access the additional functionality, then it would see that a vendor specific driver would have to be implemented. Note that I'm not an audio class driver expert, but maybe those on the list who are, can provide additional comment.

rich kubota

At 10:52 AM -0500 2/26/02, Tim Hosking wrote:
on 25/2/02 7:01 am, Joe Chang (???) at email@hidden wrote:

 I'd like to access my USB audio interface using IOKit
 because not all settings of the audio interface can be controllable
 using Core-Audio functions.

 Because I'm very new to this kind of things,
 first I'm exploring the sample code in
 /Developer/Examples/IOKit/usb/USBSimple Example.

 In the code, I replaced the vendor ID and product ID with mine.
 When it runs, USBInterfaceOpen() returns the result code "e00002c5"
 which means "exclusive access and device already open".

 I'm wondering if USB audio interface is automatically open
 by the system when connected, and thus I can't access it using IOKit

 Well, actually I'm wondering if this is the right way to control my USB
 audio interface.
 I need your advice.

I was hoping someone would answer this as I have exactly the same problem accessing a USB printer from userspace code. More precisely, it only works every second time, as if my first attempt at closing & releasing the interface didn't quite cut it. It goes something like this:

    Open interface - OK
    Dump data to pipe - OK
    Close Interface - OK
    Release Interface - OK

    Open Interface - fails with e00002c5
    Release Interface OK

    Open interface - OK
    Dump data to pipe - OK
    ... and so on ...
usb mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.

 >Re: unable to open interface (From: Tim Hosking <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.