Re: [Ftdi-usb-sio-devel] FTDI USB Serial Device 0403:6001 Driver Compile Errors
Brought to you by:
bryder
|
From: Bill R. <Bi...@Re...> - 2010-03-31 20:10:13
|
Ubuntu 9.10 supports the FTDI chipset right out of the box. No need to
compile anything!
Try this:
ls /dev/ttyUSB*
there should be nothing listed, but if there is, take note of
what's there]
Now plug in your FTDI dongle and again:
ls /dev/ttyUSB*
You'll see an additional port there. That's your new mock serial port.
From: Damian Leuthold [mailto:dam...@gm...]
Sent: Wednesday, March 31, 2010 3:53 PM
To: ftd...@li...
Subject: [Ftdi-usb-sio-devel] FTDI USB Serial Device 0403:6001 Driver
Compile Errors
Hello my new temporary best friends (if you can help me solve this),
I am trying to get my new cutting plotter to work in Ubuntu Linux 9.10,
kernel 2.6.31-20. It uses an FTDI usb-serial port chip. I have tried to
load the driver but it does not compile. The make file generates many
include errors. It appears to be looking in the wrong location for various
files. I've started to modify the make file to look in the correct location
for those files, but then it started getting messy. Before I go further I'm
hoping for confirmation that I am going in the right direction. Is it ok to
use the '/usr/src/linux-header' rather than '/lib/modules' files? What am I
missing?
Detail:
Standard driver loads (before I removed the ftdi-sio module 'rmmod ftdi-sio'
now no /dev/ttyUSB0)-
$ dmesg
[42999.312037] usb 5-2: new full speed USB device using uhci_hcd and address
2
[42999.490413] usb 5-2: configuration #1 chosen from 1 choice
[42999.635294] usbcore: registered new interface driver usbserial
[42999.635316] USB Serial support registered for generic
[42999.635356] usbcore: registered new interface driver usbserial_generic
[42999.635359] usbserial: USB Serial Driver core
[42999.652709] USB Serial support registered for FTDI USB Serial Device
[42999.652779] ftdi_sio 5-2:1.0: FTDI USB Serial Device converter detected
[42999.652820] usb 5-2: Detected FT232BM
[42999.652824] usb 5-2: Number of endpoints 2
[42999.652827] usb 5-2: Endpoint 1 MaxPacketSize 64
[42999.652830] usb 5-2: Endpoint 2 MaxPacketSize 64
[42999.652832] usb 5-2: Setting MaxPacketSize 64
[42999.654488] usb 5-2: FTDI USB Serial Device converter now attached to
ttyUSB0
[42999.654527] usbcore: registered new interface driver ftdi_sio
[42999.654532] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
$ lsusb
Bus 005 Device 002: ID 0403:6001 Future Technology Devices International,
Ltd FT232 USB-Serial (UART) IC
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
$ udevadm info -q all -n /dev/ttyUSB0
P: /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/ttyUSB0/tty/ttyUSB0
N: ttyUSB0
S: char/188:0
S: serial/by-path/pci-0000:00:1d.3-usb-0:2:1.0-port0
S: serial/by-id/usb-FTDI_USB__-__Serial-if00-port0
E: UDEV_LOG=3
E:
DEVPATH=/devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/ttyUSB0/tty/ttyUSB
0
E: MAJOR=188
E: MINOR=0
E: DEVNAME=/dev/ttyUSB0
E: SUBSYSTEM=tty
E: ID_PORT=0
E: ID_PATH=pci-0000:00:1d.3-usb-0:2:1.0
E: ID_VENDOR=FTDI
E: ID_VENDOR_ENC=FTDI
E: ID_VENDOR_ID=0403
E: ID_MODEL=USB__-__Serial
E: ID_MODEL_ENC=USB\x20\x3c-\x3e\x20Serial
E: ID_MODEL_ID=6001
E: ID_REVISION=0400
E: ID_SERIAL=FTDI_USB__-__Serial
E: ID_TYPE=generic
E: ID_BUS=usb
E: ID_USB_INTERFACES=:ffffff:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=ftdi_sio
E: ID_IFACE=00
E: ID_VENDOR_FROM_DATABASE=Future Technology Devices International, Ltd
E: ID_MODEL_FROM_DATABASE=FT232 USB-Serial (UART) IC
E: DEVLINKS=/dev/char/188:0
/dev/serial/by-path/pci-0000:00:1d.3-usb-0:2:1.0-port0
/dev/serial/by-id/usb-FTDI_USB__-__Serial-if00-port0
---------------------------
The original make command:
$ make
gcc -Wall -D__KERNEL__ -DMODULE
-I/lib/modules/2.6.31-20-generic/build/include -D__SMP__ -DSMP -DMODVERSIONS
-include /lib/modules/2.6.31-20-generic/build/include/linux/modversions.h
-I/usr/src/linux-2.6.31-20-generic/drivers/usb/serial/ -O -c -o ftdi_sio.o
ftdi_sio.c
Make errors:
cc1: error:
/lib/modules/2.6.31-20-generic/build/include/linux/modversions.h: No such
file or directory
In file included from
/lib/modules/2.6.31-20-generic/build/include/linux/kernel.h:11,
from ftdi_sio.c:251:
/lib/modules/2.6.31-20-generic/build/include/linux/linkage.h:5:25: error:
asm/linkage.h: No such file or directory
In file included from
/lib/modules/2.6.31-20-generic/build/include/linux/kernel.h:15,
from ftdi_sio.c:251:
...
ftdi_sio.c: In function 'ftdi_tiocmget':
ftdi_sio.c:2206: error: expected ')' before 'KBUILD_MODNAME'
ftdi_sio.c:2225: error: expected ')' before 'KBUILD_MODNAME'
ftdi_sio.c: In function 'ftdi_ioctl':
ftdi_sio.c:2276: error: 'current' undeclared (first use in this function)
make: *** [ftdi_sio.o] Error 1
Make search location:
/lib/modules/2.6.31-20-generic/build/include/linux/modversions.h
Correct location:
/usr/src/linux-headers-2.6.31-20-generic/include/config/modversions.h
Make search location:
/lib/modules/2.6.31-20-generic/build/include/linux/kernel.h
Correct location:
/usr/src/linux-headers-2.6.31-20-generic/include/linux/kernel.h
----------------------------
Modified make file:
$ make
gcc -Wall -D__KERNEL__ -DMODULE
-I/usr/src/linux-headers-2.6.31-20-generic/config -D__SMP__ -DSMP
-DMODVERSIONS -include
/usr/src/linux-headers-2.6.31-20-generic/include/linux/modversions.h
-I/usr/src/linux-headers-2.6.31-20-generic/include/config/
-I/usr/src/linux-2.6.31-20-generic/drivers/usb/serial/ -O -c -o ftdi_sio.o
ftdi_sio.c
New make errors:
$make
cc1: error:
/usr/src/linux-headers-2.6.31-20-generic/include/linux/modversions.h: No
such file or directory
ftdi_sio.c:253:24: error: linux/init.h: No such file or directory
ftdi_sio.c:254:24: error: linux/slab.h: No such file or directory
ftdi_sio.c:256:30: error: linux/tty_driver.h: No such file or directory
...
--
Damian Leuthold
co-owner Advanced Communications http://advancedcommunications.us/
(h) 970-375-5445 (m) 720-949-3988
|