FTDI in C: Ladvien's LabSetting Up the GCC CompilerI setup a C environment as basic I could. There may be easier ways to go about this, but I wanted to use GCC to compile. To setup the environment: I downloaded and setup MinGW32. Installing FTDI Drivers on Linux systems Note: The screen shot in this tutorial is from Ubuntu 12.04 using Oracle VM VirtualBox.The process should be very similar, if not exactly the same, for other versions/variations of this operating system.
I use Ubuntu 16.04 LTS just freshly installed.
What kind of serial terminal will work best with a virtual-COM-Port cable that uses an FTDI-Chip?
What do I have to do for additional installations like virtual comport-driver, connecting hardware to 'linux-files' like '.../usb0' etc?
I'm new to Linux so I need detailed guidance. A link to a tutorial 'using USB-2-serial-adapters for dummies' would also help.
jokerdino♦33.2k2121 gold badges122122 silver badges188188 bronze badges
StefanL38StefanL38
closed as primarily opinion-based by David Foerster, Ravexina, waltinator, Anwar, user364819 May 1 '17 at 10:45
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
1 Answer
The FTDI chip should be supported out-of-the box. Just connect the device and it will be available. The commands
lsusb
and dmesg | tail
(directly after plugging in the device) are your friends here.Serial COM Ports are addressed as
/dev/tty*
(hardware serial COM ports) while USB serials (like the FTDI chip) appear as /dev/ttyUSB*
when they are connected.Personally I like
moserial
which is available in the repository. Install it like so:There you can configure your connection and read/write to the device.
Zanna52.1k1414 gold badges145145 silver badges246246 bronze badges
M-BabM-Bab
Not the answer you're looking for? Browse other questions tagged driversusb or ask your own question.
I am using FTDI D2XX driver API to communicate with a FTDI device. It gives me some information about the device like locid, serialnumber, description but it is not enough.
How can I get the device number (
/dev/ttyUSBXX
) or bus or port with this API.thanks
GLamprosGLampros
1 Answer
As the D2XX Programmer's Guide tells in the Introduction:
For Linux, Mac OS X (10.4 and later) and Windows CE (4.2 and later) the D2XX driver and VCP driver are mutually exclusive options as only one driver type may be installed at a given time for a given device ID.
The problem is that your Linux may automatically loads the VCP driver (
ftdi_sio
) and therefore you cannot use D2XX driver. Type the following into your terminal to make sure, the ftdi_sio
is loaded:By this article I succesfully overcame the problem. My working solution is to create two text files under the
/etc/udev/rules.d/
. The first unbinds my device from the ftdi_sio
driver and the second adjusts the permissions for my device. Let assume the first file which unbinds my device is named to 98-my-device.rules
and has the following content:Now let assume the second file which makes my device usable without root rights is named to
99-my-device.rules
and has the following content:These rules will be active from the next restart or they can be applied by:
The device's attributes (vendor id, product id and the product description) can be obtained by the
sudo lsusb -v
command but this will show too much information. You can filter the results with something like this:After you succesfully prevented the Linux to load the
AkiraAkiraftdi_sio
driver for a specific device, you can use the D2XX API. To get informations from all connected devices try the example code of function FT_GetDeviceInfoDetail
from the D2XX Programmer's Guide.3,73033 gold badges1818 silver badges3535 bronze badges