>
From: Kevin Horton <khorton01@xxxxx> - 2006-11-03 14:29
>
For the archives, for the next time that someone has a similar problem:
>
>
The pointer to kernel extensions was the clue that I needed. I tried
>
moving the AppleUSBCDCACMData kernel extension aside, rebuilding the
>
kernel cache and restarting, but that did not solve the problem.
>
Then I moved the whole IOUSBFamily.kext aside, as I couldn't think of
>
anything else that could need it, rebuilt the cache and restarted -
>
big mistake, as I discovered that my USB keyboard and mouse were
>
dead. ssh and VNC saved the day.
>
I used kextunload to unload the kext after I plugged in the GPS -
>
"sudo kextunload AppleUSBCDC.kext ", and now python can claim the
>
interface to the GPS.
Since I've come across the problem as well, and now spent a few
days tracking down a reasonable solution, I thought I'd better
add it to the mail archive.
Possible solutions are:
Use the class interface these drivers create instead of Libusb
(ie. typically serial, modem etc. interface). This then looses a lot
of the portability advantage of Libusb.
Write an OS X kernel driver to driver the device, and don't use Libusb
(could be a lot of OS X specific work).
Manually unloading the offending driver may work, although
with AppleUSBCDC there are a lot of bits to it, and it will
probably break any device that you do want this driver to operate with.
The solution I've used is to implement a codeless kernel extension.
This effectively uses an existing driver to claim the particuar device,
by adding another personality to it, preventing the class drivers from
claiming it.
Basically you create this minimum extension by (somewhere convenient)
creating an extension directory :- ie. LibusbSheild.kext,
and creating in it one file called Info.plist, containing the following:
----------------- cut here ---------------------
<?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>CFBundleGetInfoString</key> <string>Libusb USB device
Shield</string>
<key>CFBundleIdentifier</key> <string>com.libusb.USB_Shield</string>
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
<key>CFBundleName</key> <string>Libusb USB device Shield</string>
<key>CFBundlePackageType</key> <string>KEXT</string>
<key>CFBundleSignature</key> <string>????</string>
<key>CFBundleVersion</key> <string>6.0</string>
<key>IOKitPersonalities</key>
<dict>
<key>HCFR</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleUSBComposite</string>
<key>IOClass</key> <string>AppleUSBComposite</string>
<key>IOProviderClass</key> <string>IOUSBDevice</string>
<key>idVendor</key> <integer>1243</integer>
<key>idProduct</key> <integer>91</integer>
</dict>
</dict>
<key>OSBundleCompatibleVersion</key> <string>1.8</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kernel.iokit</key> <string>6.0</string>
</dict>
</dict>
</plist>
----------------- cut here ---------------------
The device I'm protecting is called "HCFR", but you can expand the
personalities list with a number of devices if you want to, giving each
a different name, and setting the vendor and product id's appropriately.
You then need to install it by using:
sudo cp -R LibusbSheild.kext /System/Library/Extensions
supplying the appropriate root password when prompted.
You can test if you've setup the extension correctly
by using:
sudo kextload -n -t /System/Library/Extensions/LibusbSheild.kext
and then reboot the system to activate the extension.
Hope this is useful to someone,
Graeme Gill.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV