FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support

New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Linux: Some ports of quad chip FT4232H with d2xx other with ftdi_sio_  (Read 372 times)


  • Newbie
  • *
  • Posts: 2
    • View Profile

I don't have much experience with the FT4232H. It is quad a port device. I want to configure some of the ports as SPI, other as UART and GPIO

I have started experimenting with the SPI . In the official documentation it says that if ftd2xx and libMPSSE are used one have to remove the standard kernel modules ftdi_sio and usbserial so I did it.

My question: In Linux can I have all 4 port configured arbitrary as SPI/UART/I2C/GPIO as each port uses possibly different driver in the PC? As far as I know the driver is loaded based on the PID/VID. It is unique for the FT4232H which has 4 ports, so how this can be done? Any thought about this is welcome.

I also want to share my current (one day) experience with the libMPSSE. Unfortunately kind of negative. I have downloaded the source code for the latest libMPSSE-rev0.6 from the official FTDI web site. I was surprised to see that no provisioning for compilation under Linux. There is no Makefile for the libMPSSE. I have made a simple one which is not a big deal but then I found out it does not compile out of the box. I got "undefined type byte" at one location. After building the library I have done a simple test application which behaved strange. I was sending 8 bytes on the SPI but with the oscilloscope I was observing 7 8bit clock packets then 100us pause and finally the last 8 bit packet. The MOSI also was incorrect in the last packet.(I was sending all 0 but got two bits high at the end) Luckily I found https://www.mathworks.com/matlabcentral/answers/518039-ftdi-libmpsse-0-6-spi_readwrite-weird-behaviour-loadlibrary-calllib . Fixing that made my transfer looks OK. It looks to me FTDI have not done even a basic check of libMPSSE

I can not understand how FTDI so popular chips can have that low quality software library. Probably ftd2xx is OK and issues are only in the higher layer libMPSSE? Anyone using libMPSSE? Should I expect more issues?
Any thoughts about FTDI solution stability under Linux is welcome.

Thanks Dimitar


  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Linux: Some ports of quad chip FT4232H with d2xx other with ftdi_sio_
« Reply #1 on: December 21, 2020, 11:00:56 AM »

While waiting for approval I did some more research

It seems under Linux I can "unbind" a given FT4232H port from the ftdi_sio driver so I can access it using d2xx. Like:
sudo echo -n "1-1:1.0" > /sys/bus/usb/drivers/ftdi_sio/unbind

The rest seems to be functioning fine as ttyUSBx serial devices based on ftdi_sio

Anyone to comment if this is the way to go?
Thank you!