FTDI, D2XX and Linux: Overcoming the big problem!

FTDI chip provides really excellent USB chips, that will handle all the USB communication for you with really excellent bandwidth performance. FTDI provide an exhaustive documentation for their cross platform driver. In contrast with the VCP (Virtual Com Port) mode, the D2XX driver allows direct access to the USB device ports in a completely transparent fashion. The Windows drivers are already certified by Windows, so you can just pick your favorite chip from FTDI, and use it in your product without having to worry about time consuming driver development and certification.
All those arguments make FTDI a very good choice if you are willing to launch a cross platform USB based product as we did for Scana PLUS. However, be warned, there is One Big Problem you will face on Linux platforms. This short post is all about this problem, and the solution we found to overcome it in a nice, transparent and beautiful way.
FTDI D2XX and Linux Overcoming the big problemThe problem
When you connect an FTDI device on a Linux system, most of the time, the Kernel will automatically mound this device using the VCP driver, making your device completely undetectable and unusable  by the D2XX library. More practically, when you try to open your device from within your program using the function FT Open(); it will fail even though the device is connected to the computer and is fully functional.
The Big Problem: collateral damage.
The big problem in the solution provided by FTDI is that it will prevent any other FTDI device to be detected as VCP. This can be quite a concern: Imagine if your product prevents any other FTDI based virtual COM port from functioning. This in deed is not acceptable, and can be a serious show stopper.
The complex, long, time consuming solution
The first solution that comes to mind is to use other, proprietary PID/VID. Although this instantly solves the problem for Linux, it will require you to completely start over the windows driver part. Since changing PID or VID voids the Windows certification of the driver given by FTDI, you will have to go through the hole driver certification circuit. Doing a certification once is not the worst part. The worst part is that each time you want to update the driver you have to go through the certification process again. If you’re a free lancer or a small/medium sized company like us, a time consuming process like that is your enemy! Besides, having to take care about the driver would make no sense, if you’re choice of using FTDI was to have peace of mind regarding the whole driver maintenance part.

Read More: FTDI, D2XX and Linux: Overcoming the big problem!

Leave a Comment

Your email address will not be published. Required fields are marked *