unofficial-rev-port / node-expansion-hub-ftdi

MIT License
0 stars 0 forks source link

Add macOS and Linux FTDI D2XX libraries for compilation #1

Open garrettsummerfi3ld opened 2 months ago

garrettsummerfi3ld commented 2 months ago

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

NoahAndrews commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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