LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-14-2013, 01:21 PM   #1
astralmaster
LQ Newbie
 
Registered: May 2013
Posts: 5

Rep: Reputation: Disabled
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

Last edited by astralmaster; 05-14-2013 at 01:33 PM.
 
Old 05-14-2013, 04:23 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
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.
 
Old 05-17-2013, 08:23 AM   #3
greenleaf
Member
 
Registered: Feb 2004
Location: Chester, UK
Distribution: Linux From Scratch. 64 bit. Kernel 5.8.3. Fluxbox.
Posts: 53

Rep: Reputation: 22
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).
 
Old 05-18-2013, 02:41 AM   #4
riddim55
LQ Newbie
 
Registered: May 2013
Posts: 2

Rep: Reputation: Disabled
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

Last edited by riddim55; 05-18-2013 at 07:30 AM.
 
Old 05-18-2013, 10:14 AM   #5
greenleaf
Member
 
Registered: Feb 2004
Location: Chester, UK
Distribution: Linux From Scratch. 64 bit. Kernel 5.8.3. Fluxbox.
Posts: 53

Rep: Reputation: 22
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware- Help with FTDI driver libftdi1-1.0 PeterUK Slackware 32 04-29-2013 01:53 AM
Lan driver installation issues for new card. pruthacreation Linux - Hardware 1 09-06-2011 05:09 PM
Problem installing driver for FTDI converter cable on my linux system kitfspc Linux - Newbie 2 01-18-2011 08:47 PM
FTDI driver for MIPS netbook vertexm Linux - Laptop and Netbook 0 08-16-2010 08:53 PM
USB serial driver(ftdi): there is error in receive data plumnut Linux - Newbie 0 03-23-2009 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration