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: Preventing IOUSBHIDDriver From Claiming a Device



Brandon,

The solution is to implement a Codeless Kext. This is a Kernel Extension which has only a plist - which would be something like follows here. In the following, I present a codeless kext which keeps the white apple keyboard from matching to the default HID driver. In the following, I've set the IOClass of the device to IOService which is the superclass for all devices which will not try to open the device. This leaves it available for your user land driver to be able to access the device.

You will need to ensure that the codeless kext gets installed into the /System/Library/Extensions folder and that you touch the Extensions folder so that the kexts will be re-enumerated on restart.

best wishes.
rich kubota

<?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>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.MySoftwareCompany.driver.HIDNoMatchWhtApplKb</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<key>IOKitPersonalities</key>
<dict>
<key>White AppleKeyboard</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kernel.iokit</string>
<key>IOClass</key>
<string>IOservice</string>
<key>IOProviderClass</key>
<string>IOUSBInterface</string>
<key>bConfigurationValue</key>
<integer>1</integer>
<key>bInterfaceNumber</key>
<integer>1</integer>
<key>bcdDevice</key>
<integer>290</integer>
<key>idProduct</key>
<integer>516</integer>
<key>idVendor</key>
<integer>1452</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOUSBFamily</key>
<string>1.8</string>
</dict>
</dict>
</plist>



I am trying to get my Linux application that uses libusb to work under
OSX.  Unfortunatly the USB device it uses is defined as a HID, and
libusb cannot claim it because IOUSBHIDDriver already has.

But, I found one thread that gives hope that I can get IOUSBHIDDriver to
let go of the device:
http://lists.apple.com/archives/usb/2004/Mar/msg00064.html

It suggests using a kext with a higher probe score to keep
IOUSBHIDDriver from grabbing the device.  Today is the first time I have
ever used a Mac for development and kernel extensions seem like a huge
topic.  So if someone can point me in the right direction it would be
greatly appreciated.

Thank You,
Brandon Philips

-- Sincerely, Rich Kubota email@hidden (408) 974-6212 _______________________________________________ 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: 
 >Preventing IOUSBHIDDriver From Claiming a Device (From: Brandon Philips <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.