LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   FTDI driver installation issues (http://www.linuxquestions.org/questions/showthread.php?t=4175461951)

astralmaster 05-14-2013 01:21 PM

FTDI driver installation issues
 
Hi, I am trying to install a VCP driver for FT232R chip from ftdichips.com. Unfortunatey there is no installation manual/guidelines for linux driver available. When I try to build the source of the driver by
PHP Code:

sudo make 

it outputs the following error:

PHP Code:

fatal error: /lib/modules/3.0.0-12-generic/build/include/linux/modversions.hNo such file or directory 

I think it might be because I have my linux headers in diffrent directory installed? In which case I would have to create a symlink?

Thank you

cyent 05-14-2013 04:23 PM

Guess one, the kernel by default usually has support for ftdi chips available as a module. It may be as simple as plugging the thing in and modprobe ftdi

On my box....
locate /modversions.h
/usr/src/linux-headers-3.5.0-27-generic/include/config/modversions.h
/usr/src/linux-headers-3.5.0-28-generic/include/config/modversions.h

ie. That file is part of the linux-headers package, so install that.

greenleaf 05-17-2013 08:23 AM

ftdi usb/serial driver
 
Hi,

I am using kernel 3.7.9 here. You can find out which you have got using
uname -a

I also have an FTDI usb/serial converter which is identified by lsusb as:
Bus 004 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

It works quite well.
The extra modules that are loaded when it is attached are ftdi_sio and usbserial.

These modules should get loaded automatically when the device is connected if they have been built as modules in the first place. It can happen that they are not so loaded because the module dependencies are out of date, in which case running depmod (as super user) might do the trick.

Alternatively they may already be compiled-in, in which case there is no need to load them, and you do not need to build any code.

It might be an idea to check the config file for your kernel source, and see whether these drivers are enabled. If they are not, then a possible solution is to rebuild the kernel with them enabled. If you have not done any kernel building before, then some careful reading is called for. But once you get the hang of it, it really is very useful to know how.

Some time ago I managed to get an FTDI device going by means of a few simple tweaks to the kernel source. However its best to avoid this unless you have an urgent problem (as I did at the time).

riddim55 05-18-2013 02:41 AM

Hey astralmaster,

I had the same problem. I changed the line CFLAGS += -DMODVERSIONS -include $(KERNELDIR)/include/linux/modversions.h to
CFLAGS += -DMODVERSIONS -include /lib/modules/3.7.0-10.dmz.1-liquorix-amd64/build/include/config/modversions.h

Now I get the error by opening the c-file and included kernel header files 'make' does not find them:

from ftdi_sio.c:251:
In file included from /lib/modules/3.7.0-10.dmz.1-liquorix-amd64/build/include/linux/kernel.h:6:0
/lib/modules/3.7.0-10.dmz.1-liquorix-amd64/build/include/linux/linkage.h:5:25: fatal error: asm/linkage.h: No such file or directory

Do you know how to solve this? I think make does not find the right path because its a relative path.
locate asm/linkage.h
/usr/src/linux-headers-3.7.0-10.dmz.1-liquorix-amd64/arch/x86/include/asm/linkage.h

greenleaf 05-18-2013 10:14 AM

Hi astralmaster and riddim55,

I strongly suspect that you do not need to compile that code. The FTDI virtual com port drivers have been in the kernel distributions for a while. Have you done a simple sanity check - that is to look in /dev to see whether a device node appears when you insert the FTDI based device?

Leave the device unconnected and do
ls /dev > dnodes.1

then connect the device and do
ls /dev > dnodes.2

Then do
diff dnodes.1 dnodes.2

If you get a non-null difference then there is a device node being created, which means the kernel has recognised the device and told udev, and udev has created a corresponding node. In that case the hard part may have already been done, and the device file you get from the difference is what you need for the com port.

If you get a null difference, then probably all that you need to do is update the kernel so that it includes the relevant drivers, and install it. It should give a more reliable result than trying to link drivers that were not included in the kernel source to begin with.


All times are GMT -5. The time now is 09:27 PM.