NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO Linux FTDI D2XX

Solved!
Go to solution

Hello there,

I'm trying to use the FTDI D2XX driver with the NI cRIO-6063 device.

I've installed the 1.3.6 ARMv7 hard-float library from here http://www.ftdichip.com/Drivers/D2XX.htm and followed the instructions here http://www.ftdichip.com/Support/Documents/InstallGuides.htm

so I have:

/usr/local/lib/libftd2xx.so

I've then called the ftdi FT_ListDevices function (which I'm familiar with using in LV on Windows) with the library path above.

However, at run time I get the error 'LabVIEW: Failed to load shared library libftd2xx.so...ensure the library is present on your system...'.

I see the file is listed in the RT dependencies folder with the warning that it has been deleted/renamed/moved so it knows it should be looking for it. From the files view, I see that it is looking in the correct place. If I add a call to /usr/lib/local/libvisa.so such that it is in the dependency tree it complains in the same way but then does load the library at run time, so this looks like a red herring.

If I ssh into the cRIO and  type the commands below then I see that the library is there:

ldconfig -p | grep d2 
libftd2xx.so (libc6,hard-float) => /usr/local/lib/libftd2xx.so

Anyone have an idea what I'm doing wrong please?

Thanks,

Martin

0 Kudos
Message 1 of 5
(4,016 Views)

I'm inadvertently cross-posting on the LabVIEW board as I can't figure out how to delete the post on there http://forums.ni.com/t5/LabVIEW/cRIO-Linux-FTDI-D2XX/m-p/3218183#M934705

0 Kudos
Message 2 of 5
(3,413 Views)
Solution
Accepted by topic author MartinMcD

The issue is that the NI Linux RT ARM controllers are soft-fp systems. The armv5 softfloat library should be able to load and be usable on your system, but I have not tried this myself.

Additionally, as roflk noted in the other forum thread, it seems that the library is going to want to dynamically load libusb-1.0 for working with the ftdi device.

0 Kudos
Message 3 of 5
(3,413 Views)

The issue is that the NI Linux RT ARM controllers are soft-fp systems. The armv5 softfloat library should be able to load and be usable on your system, but I have not tried this myself.

 

Additionally, as roflk noted in the other forum thread, it seems that the library is going to want to dynamically load libusb-1.0 for working with the ftdi device.


Why not just using the kernel driver and call it via the standard /dev/tty* devices ?

 

I fail to see any reason why anybody would want to use a some binary-only driver with a proprietary API (IOW: having to rewrite the application just for one particular device) and dealing with all the problems arising from binary-only crap. Except for extreme masochism.

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 4 of 5
(2,692 Views)

@metux wrote:

The issue is that the NI Linux RT ARM controllers are soft-fp systems. The armv5 softfloat library should be able to load and be usable on your system, but I have not tried this myself.

 

Additionally, as roflk noted in the other forum thread, it seems that the library is going to want to dynamically load libusb-1.0 for working with the ftdi device.


Why not just using the kernel driver and call it via the standard /dev/tty* devices ?

 

I fail to see any reason why anybody would want to use a some binary-only driver with a proprietary API (IOW: having to rewrite the application just for one particular device) and dealing with all the problems arising from binary-only crap. Except for extreme masochism.


Because the kernel driver supports the VCP mode of the FTDI chips only! Those chips can however do a lot more than just being an RS-232 or RS-485 interface converter. You can do I2C, SPI, old style parallel LPT and with bitbang mode just about any proprietary and non proprietary serial interface such as DMX, etc. But to access these feature you need a more low level interface than the Linux tty device interface. And the FTDI library provides that interface. Yes you even can implement your own RS-232/485 interface on top of the FTDI library but that would be indeed a huge waste of effort and require every application to interface to your specific API.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(2,040 Views)