Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Composite Device Question Addition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Composite Device Question Addition




I looked into this a bit further and found this in my console log when plugging in my device:

1/12/10 1:06:32 PM kernel 0        0 AppleUSBCDCACMControl: start - Failed to find the CDC driver
1/12/10 1:06:33 PM kernel 0        1 AppleUSBCDCACMData: start - Find CDC driver for data interface failed

This seems like good and bad news at once.  The Apple driver is trying to load, but succeeding.  This may relate to a previous message at:


But I am not exactly sure if what I describe is considered IAD (I don't believe so).  Also, this was a year ago so I am not sure if things have changed.  A cursory search on the public bug list didn't show any matches at all for CDC so I can't see if there have been changes.

My matches in the USB prober log are:

14312.694 [5] Finding driver for interface #0 of Widget, matching personality using com.apple.iokit.IOUSBUserClient, score: 104999, wildCard = 5
14312.694 [6] Matched: idVendor (65520) idProduct (10) bcdDevice (256) bConfigurationValue (1) bInterfaceNumber (0) 
14312.694 [6] Didn't Match: nothing
14312.709 [5] Finding driver for interface #0 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMControl, score: 50000, wildCard = 0
14312.709 [6] Matched: bInterfaceClass (2) bInterfaceSubClass (2) 
14312.709 [6] Didn't Match: nothing
14312.755 [5] Finding driver for interface #0 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMControl, score: 50000, wildCard = 0
14312.755 [6] Matched: bInterfaceClass (2) bInterfaceSubClass (2) 
14312.755 [6] Didn't Match: nothing
14312.858 [5] Finding driver for interface #0 of Widget, matching personality using com.apple.iokit.IOUSBUserClient, score: 104999, wildCard = 5
14312.858 [6] Matched: idVendor (65520) idProduct (10) bcdDevice (256) bConfigurationValue (1) bInterfaceNumber (0) 
14312.858 [6] Didn't Match: nothing
14312.873 [5] Finding driver for interface #0 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMControl, score: 50000, wildCard = 0
14312.873 [6] Matched: bInterfaceClass (2) bInterfaceSubClass (2) 
14312.873 [6] Didn't Match: nothing
14312.874 [6] +IOUSBUserClientInit[0x14ffb980]::MergeDictionary(0x11a4d3c0)IntoProvider(0x1cccd900)
14312.874 [6] IOUSBUserClientInit[0x14ffb980]::MergeDictionaryIntoProvider  merging "IOCFPlugInTypes"
14312.874 [6] IOUSBUserClientInit[0x14ffb980]::MergeDictionaryIntoProvider  source dictionary had IOCFPlugInTypes as a dictionary (0x11a4d400)
14312.874 [6] IOUSBUserClientInit[0x14ffb980]::MergeDictionaryIntoProvider  setting property IOCFPlugInTypes
14312.874 [6] IOUSBUserClientInit[0x14ffb980]::MergeDictionaryIntoProvider  merging "IOUserClientClass"
14312.874 [6] IOUSBUserClientInit[0x14ffb980]::MergeDictionaryIntoProvider  setting property IOUserClientClass
14312.874 [6] -IOUSBUserClientInit[0x14ffb980]::MergeDictionaryIntoProvider(0x1cccd900, 0x11a4d3c0)  result 1
14312.877 [5] Widget[0x1cccdd00]::SetConfiguration  matching to interface(1): 0x1ccc2200 
14312.979 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.iokit.IOUSBUserClient, score: 104999, wildCard = 5
14312.979 [6] Matched: idVendor (65520) idProduct (10) bcdDevice (256) bConfigurationValue (1) bInterfaceNumber (1) 
14312.979 [6] Didn't Match: nothing
14312.994 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMData, score: 50000, wildCard = 0
14312.994 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14312.994 [6] Didn't Match: nothing
14313.089 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMData, score: 50000, wildCard = 0
14313.089 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14313.089 [6] Didn't Match: nothing
14313.194 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.iokit.IOUSBUserClient, score: 104999, wildCard = 5
14313.194 [6] Matched: idVendor (65520) idProduct (10) bcdDevice (256) bConfigurationValue (1) bInterfaceNumber (1) 
14313.194 [6] Didn't Match: nothing
14313.209 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMData, score: 50000, wildCard = 0
14313.209 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14313.209 [6] Didn't Match: nothing
14313.210 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCECMData, score: 50000, wildCard = 0
14313.210 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14313.210 [6] Didn't Match: nothing
14313.303 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCECMData, score: 50000, wildCard = 0
14313.303 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14313.303 [6] Didn't Match: nothing
14313.405 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.iokit.IOUSBUserClient, score: 104999, wildCard = 5
14313.405 [6] Matched: idVendor (65520) idProduct (10) bcdDevice (256) bConfigurationValue (1) bInterfaceNumber (1) 
14313.405 [6] Didn't Match: nothing
14313.421 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCACMData, score: 50000, wildCard = 0
14313.421 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14313.421 [6] Didn't Match: nothing
14313.421 [5] Finding driver for interface #1 of Widget, matching personality using com.apple.driver.AppleUSBCDCECMData, score: 50000, wildCard = 0
14313.421 [6] Matched: bInterfaceClass (10) bInterfaceSubClass (0) 
14313.421 [6] Didn't Match: nothing
14313.422 [6] +IOUSBUserClientInit[0x158fcb80]::MergeDictionary(0x11a4d3c0)IntoProvider(0x1ccc2200)
14313.422 [6] IOUSBUserClientInit[0x158fcb80]::MergeDictionaryIntoProvider  merging "IOCFPlugInTypes"
14313.422 [6] IOUSBUserClientInit[0x158fcb80]::MergeDictionaryIntoProvider  source dictionary had IOCFPlugInTypes as a dictionary (0x11a4d400)
14313.422 [6] IOUSBUserClientInit[0x158fcb80]::MergeDictionaryIntoProvider  setting property IOCFPlugInTypes
14313.422 [6] IOUSBUserClientInit[0x158fcb80]::MergeDictionaryIntoProvider  merging "IOUserClientClass"
14313.422 [6] IOUSBUserClientInit[0x158fcb80]::MergeDictionaryIntoProvider  setting property IOUserClientClass
14313.422 [6] -IOUSBUserClientInit[0x158fcb80]::MergeDictionaryIntoProvider(0x1ccc2200, 0x11a4d3c0)  result 1
14313.427 [5] Widget[0x1cccdd00]::SetConfiguration  matching to interface(2): 0x1cccd700 

Here is how my device reports in Bus Probe:

    Device Descriptor   
        Descriptor Version Number:   0x0200
        Device Class:   0   (Composite)
        Device Subclass:   0
        Device Protocol:   0
        Device MaxPacketSize:   64
        Device VendorID/ProductID:   0xFFF0/0x000A   (unknown vendor)
        Device Version Number:   0x0100
        Number of Configurations:   1
        Manufacturer String:   1 "Acroname Inc."
        Product String:   2 "Widget"
        Serial Number String:   3 "00000011"
    Configuration Descriptor   
        Length (and contents):   90
        Number of Interfaces:   3
        Configuration Value:   1
        Attributes:   0xC0 (self-powered)
        MaxPower:   0 ma
        Interface #0 - Communications-Control   
            Alternate Setting   0
            Number of Endpoints   1
            Interface Class:   2   (Communications-Control)
            Interface Subclass;   2
            Interface Protocol:   1
            Comm Class Header Functional Descriptor   
                Raw Descriptor (hex)   0000: 05 24 00 10 01 
            Comm Class Call Management Functional Descriptor   
                Raw Descriptor (hex)   0000: 05 24 01 01 01  (have tried 05 24 01 03 01 as well)
            Comm Class Abstract Control Management Functional Descriptor   
                Raw Descriptor (hex)   0000: 04 24 02 02 
            Comm Class Union Functional Descriptor   
                Raw Descriptor (hex)   0000: 05 24 06 00 01 
            Endpoint 0x81 - Interrupt Input   
        Interface #1 - Communications-Data/Unknown Comm Class Model   
        Interface #2 - Vendor-specific   

Also, to clarify, I am doing this on 10.6 with current updates.

Finally, my original message contents:

Forgive me if this is rehash.  I have looked over the list for the past couple of years and don't see an answer here.  I have an embedded project that I would like to have support a CDC/ACM interface pair and one or more other interfaces (user defined).  

I can reduce my firmware's device descriptor to just a device class of communication (bDeviceClass = 0x02) and then I add two interfaces for CDC/ACM.  This then matches against the Apple CDC/ACM drivers and works great.  It creates a /dev/tty.usbmodemXXXX device node that I can then open, change line settings, read/write, etc.  This also works on Windows and Linux with the expected .INF and modprobe calls.

In addition, I can change the firmware device descriptor to bDeviceClass = 0xFF for vendor specific and then include only my other interface (simple BULK IN/OUT for now which I will call the LINK).  This requires my own driver which is a .kext that does some work and matches, loads, and succeeds using a IOUSBDevice provider.

So far, so good when things are separate.  Now, I want to put these together under a composite device.  

In my actual device firmware, I change my main device descriptor to be bDeviceClass = 0x00 for composite.  I then include 3 interfaces (CDC, ACM, and my other LINK interface) in the configuration descriptor and everything checks out in usbprobe when looking at the basic descriptors.  Using the composite bDeviceClass gets recognized (matched) and the usbprobe log shows what looks similar to a USB hub instantiation for the basic device and then it enumerates and tries to match the individual interfaces of which I have three. This makes sense so far.

Here are my various trials for matching/drivers... none of which seems to work properly:

1.   Under IOKitPersonallties I have three devices in my .plist file with a IOUSBInterface provider for each since I am now matching interfaces.  I set up the various properties in the info.plist so that each firmware interface matches my .kext but I set the IOClass to AppleUSBCDCACMControl for the first interface, AppleUSBCDCACMData for the second, and my other interface class for the third LINK interface.  This successfully matches on all three interfaces to my driver and the third, LINK device class comes up fine and builds my driver connection point, etc.  Just no tty.usbmodemXXXX which I hoped would show up.  The problem here is probably that the Apple classes are not in my driver executable so the CDC/ACM classes don't subclass and do the proper work.  I tried setting the CFBundleIdentifiers for the first two interfaces to com.apple.driver.AppleUSBCDCACMControl and com.apple.driver.AppleUSBCDCACMData but that doesn't make sense either since I believe the CFBundleIdentifier must match the Bundle Identifier in the plist.

2.  On a lark, I tried making all the settings in the first two interfaces of my plist exactly wrong so that my device explicitly wouldn't match on those interfaces.  This has the desirable effect of not matching at all on the first two interfaces and instead matching the Apple built-in versions match.  But still no tty.usbmodemXXXX shows up.  No errors or other indications either of what is going wrong in logs, etc.  My third LINK interface still matches, shows up, and works so the kernel extension seems ok at some level.

I believe some combination will work and that I am close.  Any ideas on how to get both the CDC/ACM interfaces working using the built-in Apple drives as well as my vendor-specific device driver working on the third interface would be a huge win.

My assumptions about switching from IOUSBDevice IOProviderClass for the single, working case of my LINK driver and the second, composite case with three IOUSBInterface IOProviderClasses in the IOKitPersonalities may be tripping me up, but since my LINK device works in both cases (with the appropriate changes to my driver code), I don't think this is the problem.

I can include .plist and log files but didn't want to over-share if there is something obvious from my description above.

Steve Richards
Acroname Inc.
720-564-0373 x711



 _______________________________________________
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



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.