FTDI Community

General Category => Discussion - Drivers => Topic started by: lordcape on December 11, 2017, 03:03:13 PM

Title: Unique tty number enumeration to a specific FTDI device
Post by: lordcape on December 11, 2017, 03:03:13 PM
Hi. In my application I have three FT4232H connected to a hub. The hub is connected to a PC with Linux. Each FT4232H shows four tty that I use as UARTS. Each FTDI has a hardware device (the same) connected to it. Each of these devices uses each UART to send messages with a different protocol between them four. The problem is that when I connect the hub, the host PC can ennumerate in different ways the ttys between power shutdown of the PC. And I can confuse the UARTS so I can confuse of the device I'm listening.

My question is if there is any possibility to know, before listening the UARTS,which tty is connected with which FTDI. Also, to know which tty is connected to the hardware FTDI port (A,B,C or D).

Now I'm solving this by trial and error, what is time wasting and very uncomfortable for the user.

I hope you can understand my poor english. Thanks and regards

SR

Title: Re: Unique tty number enumeration to a specific FTDI device
Post by: FTDI Community on April 11, 2018, 03:15:30 PM
Hello,

It will be hard to determine which order an OS may enumerate connected devices, especially if these are connected through an hub.

You should be able to use the devices serial number to determine which device has enumerated with which ports. For example we can check where a device have enumerated on the USB tree with the 'lsusb -t' command. Once we have established this we can check the '/sys/bus/usb/devices/usb{x}/{x}-{x}' folder for the serial number of that device. Finally we can run a quick check using 'find -name dev' to see what interfaces have which ports assigned to them.

Best Regards,

FTDI Community