Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: USB Interface driver matching



Alec,
It might be a good idea if you could provide the USB Bus Probe output from you're device so we could see what interfaces it has and what is in each one.

Russ
------------------------
On Oct 11, 2005, at 8:44 AM, Alec Carlson wrote:

Russ,

Thanks for the info. I have combined the Control driver and the Data driver into a single interface driver and gotten rid of the Control driver altogether. This fixed my problem of not being able to access the control endpoint from the Control interface driver if the EP was part of the Data interface. However, now I have the opposite problem. If I have the following USB configuration:
Interface 0:Control,  Interface 1:Data and I match against interface 1 to get my Data driver loaded, the Data driver does the following:

       // We need to look for CDC control interfaces
        for( fControlInterface = NULL; ; )
        {
            req.bInterfaceClass      = kUSBCommunicationControlInterfaceClass;
            req.bInterfaceSubClass   = kUSBCommAbstractSubClass;
            req.bInterfaceProtocol   = kIOUSBFindInterfaceDontCare;
            req.bAlternateSetting    = kIOUSBFindInterfaceDontCare;
            if( (fControlInterface = fpDevice->FindNextInterface(fControlInterface, &req)) == NULL )
            {
                ALERT(0, 0, "commStart - no control interface found");
                return false;
            }

            intSubClass = fControlInterface->GetInterfaceSubClass();
            if (intSubClass == kUSBCommAbstractSubClass)        // Just to make sure...
                break;
        }
    }

    // Open the control interface
    if (!fControlInterface->open(this))
    {
        XTRACE(this, 0, 0, "commAllocateResources - open comm interface failed.");
        return false;
    }

The open() always fails. Any ideas on this one ? Is it possible that since the driver matched against a different interface that IOService is not allowing me to open the unmatched interface ? I don’t see any reason why this would fail and open() just returns bool so there is no error code to decipher.

Thanks -

Alec

on 10/10/05 12:15 PM, Russ Winsper at email@hidden wrote:

> Alec,
> All the Control driver really does is handle the interrupt pipe. You  
> can just move that code into the Data driver and then you wouldn't  
> need the Control driver. The only reason the Control Interface driver  
> is there is because the USB CDC "standard" defines the interrupt pipe  
> in a separate interface, rather silly really.
>
> Russ
> ----------------------
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >Re: USB Interface driver matching (From: Alec Carlson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.