Mailing Lists: Apple Mailing Lists

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

Problems with USB matching an EZ-USB based USB device!



Hi all,

i have a device that uses a EZ-USB chip. When my driver loads, he checks if the product-id is the unenumerated device, uploads the code and closes the device. If the product-id is the enumerated device he just goes further with normal driver process. If i test my driver with just kextload and kextunload mac os x always matches my driver no matter if my device is in a enumerated state or not. The problem ocurrs in the deployment version. When my kext is installed in /System/Extensions/ it only gets loaded at startup if the device is in a unenumerated status. If I boot my computer and the device attached ( during startup ) is already enumerated my driver never gets loaded, unless i disconnect and connect the usb-cable from the computer ( sometime after boot process ). Why doesn't mac os x match my enumerated driver at startup by itself?

I suspect it has something to do with my wierd looking Info.plist file. I used the trick to have two IOKitPersonalities. Here's a copy ( names changed, comments added ):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>SampleUSBDriver</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.mycompany.driver.SampleUSBDriver </string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.0.3a2</string>
<key>IOKitPersonalities</key>
<dict>
<key>SampleUSBUnenumerated</key>
<dict>
<key>SampleUSBSettings</key> // these are some internal properties used by my driver ( changed )
<dict>
<key>SampleUSBWelcomeMessage</key>
<string>Hello World!</string>
<key>DebugFlag</key>
<true/>
</dict>
<key>CFBundleIdentifier</key>
<string>com.mycompany.driver.SampleUSBDriver</string>
<key>IOClass</key>
<string>com_mycompany_driver_SampleUSBDriver</string>
<key>IOProviderClass</key>
<string>IOUSBDevice</string>
<key>bcdDevice</key>
<integer>0</integer>
<key>idProduct</key>
<integer>1</integer> // unenumerated product-id
<key>idVendor</key>
<integer>1234</integer>
</dict>
<key> SampleUSBEnumerated </key>
<dict>
<key>SampleUSBSettings</key> // is there a way to not have this double?
<dict>
<key>SampleUSBWelcomeMessage</key>
<string>Hello World!</string>
<key>DebugFlag</key>
<true/>
</dict>
<key>CFBundleIdentifier</key>
<string>com.mycompany.driver.SampleUSBDriver</string>
<key>IOClass</key>
<string>com_mycompany_driver_SampleUSBDriver</string>
<key>IOProviderClass</key>
<string>IOUSBDevice</string>
<key>bcdDevice</key>
<integer>0</integer>
<key>idProduct</key>
<integer>2</integer> // enumerated product-id
<key>idVendor</key>
<integer>1234</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOUSBFamily</key>
<string>1.8</string>
<key>com.apple.iokit.IOAudioFamily</key>
<string>1.1fc6</string>
</dict>
</dict>
</plist>


Greetings from Germany

Fabian Renn

_______________________________________________
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


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.