There are several options for connecting to an FTDI device from a Mac, depending on OS version and driver choice. Some of the techniques have been covered in other stackoverflow questions. One technique has not yet been covered (as far as I can tell), so I'm hoping someone can help with this last technique.
The current options for connecting are as follows:
- (pre-Mavericks only) Include the .dylib and header files from the FTDI driver directly in your Xcode project (no driver installation needed), as described in this question. This technique breaks under OSX Mavericks and later.
- (Mavericks & later) Use the pre-installed Apple FTDI driver. It's poorly documented, and seems a lot harder to use than the original FTDI driver. This technique won't work if you wish to support pre-Mavericks operating systems.
- (Mavericks & later) Unload the kext for Apple's Driver, and then use technique #1, above. Not a good option if you plan on distributing your app to non-tech-savvy customers. Also, it's not a permanent solution for Mavericks+ as the kext will have a tendency to re-appear.
- (Any mac version) Implement a codeless kext, that will have a higher match priority than the Apple's kext, thus, preventing Apple's driver from hijacking the connection to your device. Then use technique #1, above. This is one of the techniques suggested by Apple's documentation and by the comments in this stackoverflow answer. It's meant to be used for apps that use a custom connection solution, but it also works for those who just want to include FTDI's dylib and headers directly in their projects.
- (Any mac version) Install the original FTDI driver (as opposed to simply referencing the .dylib and headers in your project). This is, obviously, harder than technique #1, especially when it comes to building an installer for your app, but it has the benefit of working on any Mac version. Also, like #4, it is a technique supported by Apple's documentation.
Techniques 1-4 have been covered in other Stackoverflow questions (as noted inline). I'm trying to figure out how to do #5. According to the ReadMe that comes with the FTDI driver, "installing" simply means plopping the .dylib in the /usr/local/lib/ directory and the .h files in the /usr/local/lib/ directory. I've been able to get this technique to work, but ONLY if I also unload Apple's kext. However, according to Apple's documentation, I shouldn't need to unload Apple's kext when using this technique. From Apple's docs:
"the Apple driver intentionally sets a lesser probe score match to ensure that the FTDI Interface driver matches, when present"
So, apparently, "install the FTDI driver" means something different to Apple than it means to FTDI.
Does anyone know how to "install the FTDI driver" in the way that Apple's documentation intends, such that it will have a "higher probe score match" than Apple's kext and, thus, will not require me to unload Apple's kext?