LibUSB on Mac OS X 10.5.x
Lately I have been working on two projects to integrate USB hardware with my SerialChannel software. Both of these pieces of hardware have drivers written against libusb. Libusb was born into Linux and provides a portable usb api accross multiple platforms including Windows. On OS X however, it has been a moving target over the years with no central project to keep it going. This has been true until I recently discovered that the folks that maintain the SANE port for various platforms including OS X have also maintained a libusb port as part of their software. The best part is they provide it in a nice and neat SDK package for the various versions of OS X to include Leopard. It takes very little effort to get it going and working in an OS X project. If you are developing software for a usb device that is recognized by the system as an HID device it will be necessary to create a dummy kext file to prevent OS X HID driver from capturing the device. When creating the info.plist file do not use IOProbeScore in USB …. EVER or you will get error 2c7. The libusb download link is here. Remember to set environment variable
prompt$ export DYLD_LIBRARY_PATH=”usr/include/lib:$DYLD_LIBRARY_PATH”
January 19, 2009
|
Posted by tom
Categories:
Tags:
You have written: “The best part is they provide it in a nice and neat SDK package for the various versions of OS X to include Leopard. It takes very little effort to get it going and working in an OS X project.”
Do you have examples of how to load and call the libusb routines in the Mac environment. I have use it in Linux, but there appears to be missing .h files (I loaded the libs and SDK from the TWAIN-SANE site).
Thanks.
You wrote : If you are developing software for a usb device that is recognized by the system as an HID device it will be necessary to create a dummy kext file to prevent OS X HID driver from capturing the device.
I am running excatly into this problem. How should I do this?
Thanks