Replace kernel extension module (driver) in max osx using udev rule

2

0

I'm doing development on an embedded device using an FTDI Single RS232 chip for usb communications. I can communicate with the device just fine using the pylibftdi and libftdi libraries over libusb, on Linux, even on Windows; I've installed the libusb drivers on Window too.

But, on Apple Mac OS X, which I am unfamiliar with, the device is claimed by the apple FTDI driver (according to kextstat), and (py)libftdi tell me the device has already been claimed (error -5). If I unload the apple driver (listed as com.apple.FTDI... by kextstat) using kextunload -bundle-id com.apple.driver.AppleUDBFTDI after the device is plugged in, then (py)libftdi can communicate with it.

However, every time I plug the device in, I must unload the apple driver.

I would like to write a udev rule to do this, and I know I can just match the USB vendor and class IDs and run an external script, but it strikes me that this is what udev was designed to do, so surely there is a udev builtin to unload a kernel driver?

sirlark

Posted 2014-12-08T12:28:09.363

Reputation: 121

No answers