FTDI, D2XX and Linux: Overcoming the big problem!

Summary of FTDI, D2XX and Linux: Overcoming the big problem!


FTDI USB chips offer excellent bandwidth and cross-platform drivers. While Windows handles certification easily, Linux presents a challenge where the kernel auto-mounts devices as VCP, blocking D2XX access. The article discusses overcoming this issue without preventing other FTDI VCP devices from functioning, specifically referencing the ScanaPLUS project.

Parts used in the ScanaPLUS project:

  • FTDI chip
  • D2XX driver
  • VCP (Virtual Com Port) driver
  • Windows drivers
  • Linux Kernel

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.
FTDI D2XX and Linux  Overcoming the big problem!
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 ScanaPLUS. 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.

The 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.
 
For more detail: FTDI, D2XX and Linux: Overcoming the big problem!

Quick Solutions to Questions related to ScanaPLUS:

  • Why is the D2XX library unusable on Linux?
    The Linux kernel automatically mounts the device using the VCP driver, making it undetectable by the D2XX library.
  • What happens when you try to use FT_Open() on Linux?
    The function fails even though the device is connected and fully functional because the VCP driver blocks it.
  • Does the FTDI solution prevent other virtual COM ports from working?
    Yes, the standard solution prevents any other FTDI device from being detected as a VCP, which is considered unacceptable collateral damage.
  • Are Windows drivers for FTDI certified?
    Yes, the Windows drivers are already certified by Windows, so no time-consuming development is needed.
  • What advantage does the D2XX driver have over VCP mode?
    D2XX allows direct access to USB device ports in a completely transparent fashion compared to VCP.
  • Is there a problem with launching cross-platform products using FTDI?
    Yes, there is one big problem on Linux platforms regarding device detection and driver mounting.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top