ubuntu 3+ Smargo cardreader udev rule Ubuntu

i have 3 (soon 5) Smargo card reader on my Linux server (ubuntu 8.10)

Quote:
[ 13.462082] usbcore: registered new interface driver usbserial
[ 13.462140] usbserial: USB Serial support registered for generic
[ 13.462228] usbcore: registered new interface driver usbserial_generic
[ 13.462233] usbserial: USB Serial Driver core
[ 13.547759] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 13.547829] ftdi_sio 4-3.2:1.0: FTDI USB Serial Device converter detected
[ 13.547895] ftdi_sio: Detected FT232BM
[ 13.548334] usb 4-3.2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 13.548369] ftdi_sio 2-2.2:1.0: FTDI USB Serial Device converter detected
[ 13.548435] ftdi_sio: Detected FT232BM
[ 13.548766] usb 2-2.2: FTDI USB Serial Device converter now attached to ttyUSB1
[ 13.548795] ftdi_sio 2-2.3:1.0: FTDI USB Serial Device converter detected
[ 13.548861] ftdi_sio: Detected FT232BM
[ 13.549141] usb 2-2.3: FTDI USB Serial Device converter now attached to ttyUSB2
[ 13.549176] usbcore: registered new interface driver ftdi_sio
[ 13.549181] ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver

Sometimes, when i reboot the server, the card readers are detected in a different order, so that the card in reader1 gets different parameters than needed.

Is there a way to specifiy the /dev/ttyUSBx to a port/USB device:

Quote:
root@server:/home/xxx# lsusb
Bus 004 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 004 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 007: ID 05e3:0604 Genesys Logic, Inc. USB 1.1 Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 046d:c30a Logitech, Inc. iTouch Composite
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I know how to address the device using the vendor, but as the vendor and product is always the same, i can’t use only those parms.

The device does not have a unique serial number

I have seen somewhere a parameter PLACE for udev.

Quote:
PLACE
Match the topological position on bus, like physical port of USB device

Can’t i use this parm to place the /dev/ttyUSBx device

As it’s a USB2serial adapter, mounting not possible

All 3 cardreaders are exactly the same! Only the Bus and Device changes.
So is it possible to tell udev to create the /dev/ttyUSBx device for each Busevice ?
Thanks !

Bus 004 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6001 FT232 USB-Serial (UART) IC
bcdDevice 4.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 46
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2 USB smartcard server
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 01 01
** UNRECOGNIZED: 04 24 02 07
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
root@server:/etc/udev/rules.d#

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image