LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Using the ftdi_sio driver with a device that is new and not recognized? (https://www.linuxquestions.org/questions/linux-hardware-18/using-the-ftdi_sio-driver-with-a-device-that-is-new-and-not-recognized-798178/)

Icepick3000 03-27-2010 12:34 AM

Using the ftdi_sio driver with a device that is new and not recognized?
 
Hi all,

I think my question is fairly simply..
I bought a uchameleon device that needs to use the ftdi_sio driver. On my linux box the ftdi_sio driver is present but when I plug in the device it say something like 'device not claimed by active driver'. This seems correct because in the information I got for the device one has to patch the kernel first before it will work.
Below is the patch script that was included.

However, the ftdi_sio driver is already present on my system.. and I can load it with modprobe.. but it won't recognize my hardware.

Is there a way of still having the driver recognize the device without patching and recompiling the whole kernel? I know how to recompile a kernel, for for various reasons in this case i prefer not to do this.

Is there a place in the system where I can add the vendor id and product id and and the driver will just recognize the device?

Cheers,
Alex


diff -uprN linux-2.6.15-vanilla/drivers/usb/serial/ftdi_sio.c linux-2.6.15/drivers/usb/serial/ftdi_sio.c
--- linux-2.6.15-vanilla/drivers/usb/serial/ftdi_sio.c 2006-06-23 16:36:56.000000000 +0200
+++ linux-2.6.15/drivers/usb/serial/ftdi_sio.c 2006-05-23 17:34:23.000000000 +0200
@@ -311,7 +311,8 @@ static struct usb_device_id id_table_com
{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
- { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
diff -uprN linux-2.6.15-vanilla/drivers/usb/serial/ftdi_sio.h linux-2.6.15/drivers/usb/serial/ftdi_sio.h
--- linux-2.6.15-vanilla/drivers/usb/serial/ftdi_sio.h 2006-06-23 16:37:35.000000000 +0200
+++ linux-2.6.15/drivers/usb/serial/ftdi_sio.h 2006-05-23 19:29:30.000000000 +0200
@@ -31,6 +31,9 @@
#define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */
#define FTDI_NF_RIC_PID 0x0001 /* Product Id */

+/* www.starting-point-systems.com µChameleon device */
+#define FTDI_MICRO_CHAMELEON_PID 0xCAA0 /* Product Id */
+
/* www.irtrans.de device */
#define FTDI_IRTRANS_PID 0xFC60 /* Product Id */

KernelDev0815 04-02-2010 11:12 AM

[SOLVED] yup, can make it recognise unlisted devices
 
Hi,

a reply by the (well, to be fair only "one of the") ftdi_sio maintainer directly ;)

One of my recent patches added this paragraph to ftdi_sio.c for exactly this purpose:

/*
* Device ID not listed? Test via module params product/vendor or
* /sys/bus/usb/ftdi_sio/new_id, then send patch/report!
*/

So either load the ftdi_sio.ko module with the product/vendor parameters
(via modprobe ftdi_sio.ko product=0xCAA0)
or use the new_id mechanism on the already loaded driver (_runtime_!).

BTW, rest 99% assured that it will work just fine, most unknown IDs use one of the half-dozen basic chip variants and will work well once you add it.


<i>Is there a place in the system where I can add the vendor id and product id and and the driver will just recognize the device?</i>

Yes, that should usually be done via module configuration files,
usually /etc/modprobe.conf or also /etc/modprobe.d/_local.conf on Debian-based distribution variants.

I added your patch content to my ftdi_sio ToDo list, will get it submitted in the medium future (but feel free to submit your own patch upstream).

KernelDev0815 04-02-2010 11:15 AM

ID had already been added
 
Quote:

Originally Posted by KernelDev0815 (Post 3921868)
I added your patch content to my ftdi_sio ToDo list, will get it submitted in the medium future (but feel free to submit your own patch upstream).

Erps, no, it's already there in newer versions (checked 2.6.34-rc3).
Just realized that you're on 2.6.15 still. Not entirely sure whether this version even has the new_id or even the vendor/product mechanism, might be a problem.

Icepick3000 04-05-2010 06:56 AM

Quote:

Originally Posted by KernelDev0815 (Post 3921868)

So either load the ftdi_sio.ko module with the product/vendor parameters
(via modprobe ftdi_sio.ko product=0xCAA0)
or use the new_id mechanism on the already loaded driver (_runtime_!).


Well, this seems to do something because I get;

usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
usbserial.c: USB Serial support registered for FTDI SIO
usbserial.c: USB Serial support registered for FTDI 8U232AM Compatible
usbserial.c: USB Serial support registered for FTDI FT232BM Compatible
usbserial.c: USB Serial support registered for USB-UIRT Infrared Tranceiver
usbserial.c: USB Serial support registered for Home-Electronics TIRA-1 IR Transceiver
ftdi_sio.c: v1.3.5:USB FTDI Serial Converters Driver

But on what device is it available? Does it usually go to /dev/ttyS0?

Alex

Icepick3000 04-05-2010 07:17 AM

Hmm.. a follow up here..
It seems like the product= option was not yet implemented in this version.. coz i noticed that it always gives me this message.. despite what is shows in the syslog.

Warning: ignoring product=0xCAA0, no such parameter in this module
Module ftdi_sio loaded, with warnings


All times are GMT -5. The time now is 03:41 PM.