[Hardy] FTDI based USB to Serial Converter not recognized

Bug #251952 reported by Lex Ross
6
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Hardy by Tormod Volden
linux-meta (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Hardy by Tormod Volden

Bug Description

Binary package hint: udev

FTDI chipset based USB to Serial converter does not create /dev/ttyUSB* device on Hardy 64-bit, kernel 2.6.24-19, udev 117-8.

/var/log/kern.log when plugging in the converter:

Jul 25 22:37:14 mars kernel: [ 1537.134393] usb 4-3: new full speed USB device using ohci_hcd and address 7
Jul 25 22:37:14 mars kernel: [ 1537.234553] usb 4-3: configuration #1 chosen from 1 choice

The output of lsusb command shows:
Bus 004 Device 008: ID 0403:e40b Future Technology Devices International, Ltd

There is no conflict with /etc/udev/rules.d/85-brltty.rules and 'sudo modprobe ftdi_sio' does not help. On the other hand, my Prolific chipset based USB to Serial cable works just fine. Attached is the output of 'lsusb -v' command for both devices.

Revision history for this message
Lex Ross (lross) wrote :
Revision history for this message
Frederik Kriewitz (freddy436) wrote :

You have to edit the ftdi_sio driver and recompile it.

A hint:

cd /usr/src
apt-get source linux-image-$(uname -r)
cd linux-2.6.24

Now you have to edit the drivers/usb/serial/ftdi_sio.c/h files (add your VID PID combination).

make oldconfig
make drivers/usb/serial/ftdi_sio.ko
rmmod ftdi_sio
cp -b drivers/usb/serial/ftdi_sio.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/
modprobe ftdi_sio

You should create a patch and send it to the linux-usb mailinglist.
Your device (0403:e40b) won't work even with the latest Kernel (2.6.27-rc1).

Revision history for this message
Lex Ross (lross) wrote :
Download full text (3.3 KiB)

Thank you Freddy for your prompt response! You made me so happy provided that most reported bugs stay unassigned for ages with no attention from Ubuntu team (I think that is because of the tight release cycle that leaves no room for bug fixing, forcing developers to bend over backwards to deliver new version on time).

Anyhow, you hint was of great help, as I am not a developer myself and would not figure out what to do without your help. Would you be so kind to review syslog output before I propose a patch to linux-usb mailing list. What worries me is that it became way too verbose with both FTDI and Prolific cables where it used to be just two lines, first saying that device was detected, and the second informing that it has been attached to /dev/ttyUSB0.

Do I need to reference specific patch in ftdi_sio.c or just leave it as it is? Please advise.

/var/log/syslog:

1. When cable is being plugged in
Jul 30 21:41:34 mars kernel: [52322.424986] usb 4-3: new full speed USB device using ohci_hcd and address 5
Jul 30 21:41:35 mars kernel: [52322.462913] usb 4-3: configuration #1 chosen from 1 choice
Jul 30 21:41:35 mars kernel: [52322.464134] ftdi_sio 4-3:1.0: FTDI USB Serial Device converter detected
Jul 30 21:41:35 mars kernel: [52322.464158] drivers/usb/serial/ftdi_sio.c: Detected FT232BM
Jul 30 21:41:35 mars kernel: [52322.464245] usb 4-3: FTDI USB Serial Device converter now attached to ttyUSB0
Jul 30 21:41:35 mars NetworkManager: <debug> [1217439695.084204] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_e40b_FTOXAIJ8').
Jul 30 21:41:35 mars NetworkManager: <debug> [1217439695.231275] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_e40b_FTOXAIJ8_if0').
Jul 30 21:41:35 mars NetworkManager: <debug> [1217439695.252065] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_e40b_FTOXAIJ8_if0_serial_usb_0').

==================================================
2. After cable has been unplugged

Jul 30 21:42:00 mars kernel: [52333.255274] usb 4-3: USB disconnect, address 5
Jul 30 21:42:00 mars kernel: [52333.255619] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
Jul 30 21:42:00 mars kernel: [52333.255635] ftdi_sio 4-3:1.0: device disconnected
Jul 30 21:42:00 mars NetworkManager: <debug> [1217439720.756023] nm_hal_device_removed(): Device removed (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_e40b_FTOXAIJ8_if0_serial_usb_0').
Jul 30 21:42:00 mars NetworkManager: <debug> [1217439720.765858] nm_hal_device_removed(): Device removed (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_e40b_FTOXAIJ8_if0').
Jul 30 21:42:00 mars NetworkManager: <debug> [1217439720.779818] nm_hal_device_removed(): Device removed (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_e40b_FTOXAIJ8').

===================================================

What went into ftdi_sio.c structure was the line:
 { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) },

And into ftdi_sio.h went this one:
#define FTDI_PHI_FISCO_PID 0xE40B /* PHI Fisco USB to Serial cable */

The question is, do ...

Read more...

Revision history for this message
Lex Ross (lross) wrote :

Where do these NetworkManager <debug> lines come from?

Revision history for this message
Frederik Kriewitz (freddy436) wrote :

That looks perfectly fine.
Don't ask me how to disable NetworkManager <debug> lines.

If it's just a simple FT232BM in RS232 converter mode you don't need any additional options.
I guess it working already?

The perfect Patch: http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
SubmittingPatches: http://lxr.linux.no/linux/Documentation/SubmittingPatches

To create the diff you should use the latest kernel sources:
git-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
cd linux-2.6

Now you have to edit the two files again.

git-diff drivers/usb/serial/

When editing the ftdi_sio.c file, please add your line somewhere in the middle of the list.
I've another patch pending (http://marc.info/?l=linux-usb&m=121742964102929&w=2) which will add two PIDs at the end of the List, two patches at the end of the list might cause problems.

Revision history for this message
Lex Ross (lross) wrote :

Patch created and is being submitted to linux-usb mailing list.

Changed in udev:
assignee: nobody → lross
status: New → Fix Released
Revision history for this message
Lex Ross (lross) wrote :

A patch, thanks to freddy.

Revision history for this message
Frederik Kriewitz (freddy436) wrote :

Ok, now here's another way how it could be done.

echo 0403 e40b > /sys/bus/usb-serial/drivers/ftdi_sio/new_id

That would have added the VID/PID to the ftdi_sio driver too, but it's just a temporary solution :)

http://lwn.net/Articles/143397/ (Manual driver binding and unbinding)

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Changed in linux-meta:
status: New → Invalid
Changed in linux:
assignee: lross → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.