NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with FTDI device on LinuxRTOS

I'm attempting to connect an FTDI based device to a cRIO-9045, flashed with LabVIEW 2017 RealTime OS. The device is a product which has worked with Windows for well over a decade and has a custom ProductID number registered with FTDI. Trying now to get it to work with Linux for the first time.

 

According to everything I see online this should work, but I've had no luck. I've read NI documentation and FTDI's documentation. According to FTDI, virtual com port support is built into the Linux kernel, so connecting the device should launch the appropriate module/drivers to register the device as a new serial port, such as ttyUSB0.

 

What I've tried:

Loading the ftdi_sio module, using modprobe ftdi_sio as described by NI here. Also, loading the dependency modprobe usbserial. But when I connect my device, although it appears under lsusb as a detected usb device, it's not identified/registered with the drivers (I don't think, how can I tell?). Calling dmesg|frep ftdi to search for messages regarding the device reveals nothing (other than an acknowledgement that I've registered ftdi_sio using modprobe earlier).

 

I've checked the list of adopted modules as presented by lsmod. Before inserting the device, and again after. That's supposed to show that a driver was launched to support the device, but there's no change to the listing.

 

Use lsusb to confirm the device is detected, and it is:

Bus 001 Device 006: ID 0403:d8b3

Note that ID 0403 is the Vendor ID for FTDI, and Product ID d8b3 is our product number, so I know this is our device.

 

But according to FTDI help, this should actually read more like Bus 001 Device 006: ID 0403:d8b3 Draeger RFID Link, the fact the description is missing is a difference that's concerning me that even this stage hasn't completely worked.

 

The only step I haven't taken yet is to modify and rebuild the ftdi_sio module, as described in this (rather old) guide from FTDI. I assume that's not necessary with the latest kernels as nobody seems to refer to the technique since 2008.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 1 of 4
(2,170 Views)

Hi Thoric,

 

How did you get this working? I am having the same issue with a real-time PXI and ftdi device. I am actually trying to use the d2xx drivers but they don't seem to find the device and I can't get the vcp driver to detect it either.

 

 

 

Jon Bowers
LabVIEW Architect, TestStand Architect
0 Kudos
Message 2 of 4
(1,587 Views)

Hi  Jon,

I did get this working, quite successfully. Multiple devices simultaneously connected through a USB hub, all individually addressable.

It was about two years ago and I've moved employer since so I'd have to dig deep to remember, but I do recall the solution wasn't so complex (thankfully).

Due to the device's unique Part Identifier code (PID) it is not auto-recognised by the OS driver therefore not mounted automatically as a new device (VCP).

I couldn't configure the driver to recognise the vendor/product ID pair, so ultimately I installed the ftd2xx dll onto the cRIO following notes from within a tarball from the ftdi site: https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.22.tgz

This might also be useful: https://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_000071).pdf

 

According to my notes, the instructions state to kill the default drivers that would normally associate with the FTDI USB connection, by calling rmmod ftdi_sio and rmmod usbserial, however in later testing this did not appear to be necessary. 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 4
(1,571 Views)

Thanks for the response.

 

I managed to get the d2xx driver working as long as I called the FT_SetVIDPID function first.

 

Jon

Jon Bowers
LabVIEW Architect, TestStand Architect
0 Kudos
Message 4 of 4
(1,567 Views)