www.leniwiec.org

I have a few ftdi serial devices in which the manufacturer has changed the standard ftdi chips product and vendor numbers to some custom values (you can check those values using the lsusb command, vendor and product ID are two numbers separated by a colon). Until recently this was not a big deal, because there was a way to pass the vendor and product id params to fdti_sio module during the loading with the use of modproble command. So I was always able to do that using this command:

/sbin/modprobe ftdi_sio vendor=0x1424 product=0x1001

but since 3.12 kernel, this two params have been deleted and now I get something like this in my logs:

# dmesg
ftdi_sio: unknown parameter 'vendor' ignored
ftdi_sio: unknown parameter 'product' ignored

Basically the developers use these two only for debugging purpose, and they were not intended to be used by the end users. Luckily, they give as a nice interface in which we can change the default vendor and product values. We can find it in the file: /sys/bus/usb-serial/drivers/ftdi_sio/new_id. This file contains a pair of vendor and product id, so all we need is to put those values into this file, doing something like this:

/sbin/modprobe ftdi_sio
echo "1424 1001" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id

I also include these two lines in my /etc/rc.local start script, so as to restore this setting on every boot.

1 COMMENT
test
4 November 2014
ad

To automate this, add the following to /etc/udev/rules.d/99-ftdi.rules:

ACTION==”add”, ATTRS{idVendor}==”0403″, ATTRS{idProduct}==”9090″, RUN+=”/sbin/modprobe ftdi_sio” RUN+=”/bin/sh -c ‘echo 0403 9090 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id’”

Post comment