Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS and Linux FTDI D2XX libraries for compilation #1

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

garrettsummerfi3ld
Copy link
Member

macOS has IOKit and Linux has this driver already in the kernel.

macOS has IOKit and Linux has this driver already in the kernel.
@garrettsummerfi3ld garrettsummerfi3ld self-assigned this Aug 13, 2024
@NoahAndrews
Copy link

Does IOKit have support for the CBUS Bit Bang Mode (which is really all this package even uses)?
https://www.ftdichip.com/Support/Knowledgebase/index.html?cbusbitbangmode.htm

@garrettsummerfi3ld
Copy link
Member Author

Does IOKit have support for the CBUS Bit Bang Mode (which is really all this package even uses)? https://www.ftdichip.com/Support/Knowledgebase/index.html?cbusbitbangmode.htm

The few mentions of this driver in IOKit is in the form of an old Apple Developer Technical Note which specifies what the kext is and how to implement. Which is not a library and we would have to use DriverKit to even do that, and then that gets into writing a driver and its all a huge mess unless I am missing something. Back to the original CBUS Bit Bang Mode, no clue.

I was thinking at this rate to write a kext or something to extend into this but I fell into several camps of this was not what I was looking for and kexts are not really recommended by Apple anymore and Apple silicon Macs are now a pain to load Kexts.

Looking more and more into this it seems like the better way forward to pull directly from FTDI and use that without issues of whatever we are doing.

@NoahAndrews
Copy link

Looking more and more into this it seems like the better way forward to pull directly from FTDI and use that without issues of whatever we are doing.

If you mean use FTDI's D2XX library, I agree. I'm pretty sure the built-in driver wouldn't expose CBUS functionality, and FTDI recently updated their downloads page to say this:

With the latest Apple developed VCP driver, both the FTDI D2XX and the Apple VCP driver will work together without conflict.

Previously, they provided a gross D2xxHelper application that you had to run to disable Apple's built-in driver 🤮

@NoahAndrews
Copy link

It's also worth noting that we may want to just re-implement node-expansion-hub-ftdi purely in node.js code, by making use of this library that didn't exist when I created node-expansion-hub-ftdi: https://github.com/motla/ftdi-d2xx

Added libraries for all platforms, including macOS universal binaries, Linux ARM flavors, and renamed existing directories to properly match architecture and platform.
All builds were broken with how conditionals were laid out. This is now resolved.
@garrettsummerfi3ld garrettsummerfi3ld linked an issue Aug 24, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement FTDI D2XX drivers for all platforms
3 participants