Cardreader unter freetz fest verlinken mit udev

Aus Zebradem WIKI
Zur Navigation springenZur Suche springen

ZD-Logo.png
Das Board mit Freiheiten




Einleitung

Das zuweisen von Cardreadern mit udev unter anderen System ist ja bekannt : USB-Reader fest verlinken

Das funktioniert jetzt auch unter freetz ab trunk 8383 http://freetz.org/wiki/patches/custom_udev_rules]patches/custom_udev_rules Mit aktuellen Firmwares . Für ältere Firmwares : 7170,7141 ect ect gibt es diese Möglichkeit nicht

geeignete Cardreader:

  • smargo FW 1.03 über Vendor ID
  • smargo FW 1.04- 1.07 über Serial
  • Apollo Cardreader über Serial
  • Easymouse2 über Serial
  • WB Smartmouse USB über Vendor ID
  • und andere

Beispiel smargo FW 1.05 und Oscam

Als erstes Serial auslesen per telnet :

cat /proc/bus/usb/devices

Ergebnis:

T:  Bus=01 Lev=02 Prnt=03 Port=03 Cnt=03 Dev#=  6 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 4.00
S:  SerialNumber=Reader 8442B01
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Die Serial tragen wir jetzt über das freetz WI unter Menue Punkt freetz udev_final ein

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="Reader Serial", SYMLINK+="Symlink

Hier wird die ausgelesene Serial eingetragen. Hier wird der Symlink eingetragen.

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="Reader 8442B01", SYMLINK+="smargo1"

Fritzbox neu starten damit die änderungen übernommen werden , die rules sind dann fest gespeichert

Anschliessend In der oscam.server als device den erstellten symlink eintragen

[reader]
label                         = smargo1
protocol                      = mouse
device                        = /dev/smargo1
smargopatch                   = 1
fallback                      = 1
caid                          = 1838
rsakey                        = B5................FF
boxkey                        = A7.......7C
detect                        = cd
mhz                           = 369
cardmhz                       = 368
group                         = 1
emmcache                      = 1,3,2
2012/01/13  8:38:59      C04 r reader thread started (thread=     C04, label=smargo1, device=/dev/smargo1, detect=cd, mhz=369, cardmhz=368)
2012/01/13  8:39:02      C04 r smargo1 card detected
2012/01/13  8:39:09      C04 r ATR: 3F FF 95 00 FF 91 81 71 FE 47 00 44 4E 41 53 50 31 34 32 20 52 65 76 47 30 36 12 
2012/01/13  8:39:11      C04 r Maximum frequency for this card is formally 5 Mhz, clocking it to 3.69 Mhz
2012/01/13  8:39:12      C04 r detect native nagra card
2012/01/13  8:39:12      C04 r -----------------------------------------
2012/01/13  8:39:12      C04 r |id  |tier    |valid from  |valid to    |
2012/01/13  8:39:12      C04 r +----+--------+------------+------------+
2012/01/13  8:39:13      C04 r found cardsystem
2012/01/13  8:39:13      C04 r ROM:    D N A S P 1 4 2
2012/01/13  8:39:13      C04 r REV:    R e v G 0 6
2012/01/13  8:39:13      C04 r SER:    12 34 56 78
2012/01/13  8:39:13      C04 r CAID:   1838
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 04 01 (sysid)
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 00 00 
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 11 03 
2012/01/13  8:39:13      C04 r [nagra-reader] ready for requests
2012/01/13  8:39:13      400 s init for all local cards done
2012/01/13 9:12:10 1005 c um02 (1838&001103/7D67/92:F57A): found (331 ms) by smargo1 (of 0 avail 0) 
2012/01/13 9:12:10 1005 c um02 (1838&001103/7D66/92:371C): found (317 ms) by smargo1 (of 0 avail 0) 
2012/01/13 9:12:20 1005 c um02 (1838&001103/7D67/92:DF0A): found (329 ms) by smargo1 (of 0 avail 0) 
2012/01/13 9:12:20 1005 c um02 (1838&001103/7D66/92:1CB5): found (336 ms) by smargo1 (of 0 avail 0) 

Beispiel smargo FW 1.07 und Oscam

Als erstes Serial auslesen per telnet :

cat /proc/bus/usb/devices

Ergebnis:

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 4.00
S:  Manufacturer=Argolis BV
S:  Product=Smartreader plus
S:  SerialNumber=12345678
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbfs
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Die Serial tragen wir jetzt über das freetz WI unter Menue Punkt freetz udev_final ein

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="Serial", SYMLINK+="Symlink

Hier wird die ausgelesene Serial eingetragen. Hier wird der Symlink eingetragen.

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="12345678", SYMLINK+="smargo1"

Fritzbox neu starten damit die änderungen übernommen werden , die rules sind dann fest gespeichert

Anschliessend In der oscam.server als device den erstellten symlink eintragen

[reader]
label                         = smargo1
protocol                      = mouse
device                        = /dev/smargo1
smargopatch                   = 1
fallback                      = 1
caid                          = 1838
rsakey                        = B5................FF
boxkey                        = A7.......7C
detect                        = cd
mhz                           = 369
cardmhz                       = 368
group                         = 1
emmcache                      = 1,3,2
2012/01/13  8:38:59      C04 r reader thread started (thread=     C04, label=smargo1, device=/dev/smargo1, detect=cd, mhz=369, cardmhz=368)
2012/01/13  8:39:02      C04 r smargo1 card detected
2012/01/13  8:39:09      C04 r ATR: 3F FF 95 00 FF 91 81 71 FE 47 00 44 4E 41 53 50 31 34 32 20 52 65 76 47 30 36 12 
2012/01/13  8:39:11      C04 r Maximum frequency for this card is formally 5 Mhz, clocking it to 3.69 Mhz
2012/01/13  8:39:12      C04 r detect native nagra card
2012/01/13  8:39:12      C04 r -----------------------------------------
2012/01/13  8:39:12      C04 r |id  |tier    |valid from  |valid to    |
2012/01/13  8:39:12      C04 r +----+--------+------------+------------+
2012/01/13  8:39:13      C04 r found cardsystem
2012/01/13  8:39:13      C04 r ROM:    D N A S P 1 4 2
2012/01/13  8:39:13      C04 r REV:    R e v G 0 6
2012/01/13  8:39:13      C04 r SER:    12 34 56 78
2012/01/13  8:39:13      C04 r CAID:   1838
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 04 01 (sysid)
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 00 00 
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 11 03 
2012/01/13  8:39:13      C04 r [nagra-reader] ready for requests
2012/01/13  8:39:13      400 s init for all local cards done
2012/01/13 9:12:10 1005 c um02 (1838&001103/7D67/92:F57A): found (331 ms) by smargo1 (of 0 avail 0) 
2012/01/13 9:12:10 1005 c um02 (1838&001103/7D66/92:371C): found (317 ms) by smargo1 (of 0 avail 0) 
2012/01/13 9:12:20 1005 c um02 (1838&001103/7D67/92:DF0A): found (329 ms) by smargo1 (of 0 avail 0) 
2012/01/13 9:12:20 1005 c um02 (1838&001103/7D66/92:1CB5): found (336 ms) by smargo1 (of 0 avail 0) 

Beispiel smargo FW 1.07 und CCcam

SERIAL READER : /dev/smargo1
Jan 13 10:06:00 fritz daemon.debug CCcam: ======================================================================
Jan 13 10:06:00 fritz daemon.debug CCcam: starting CCcam 2.1.1 compiled on May  2 2009@20:00:30
Jan 13 10:06:00 fritz daemon.debug CCcam: ======================================================================
Jan 13 10:06:00 fritz daemon.debug CCcam: online using nodeId ff997a593223778b
Jan 13 10:06:00 fritz daemon.debug CCcam: DM7025 detected
Jan 13 10:06:00 fritz daemon.debug CCcam: create 8 cam device(s)
Jan 13 10:06:00 fritz daemon.debug CCcam: card detect fail
Jan 13 10:06:00 fritz daemon.debug CCcam: calculated EGT: 0 us
Jan 13 10:06:00 fritz daemon.debug CCcam: irdeto card found
Jan 13 10:06:01 fritz daemon.debug CCcam: camkey challenge ok
Jan 13 10:06:01 fritz daemon.debug CCcam: card added to broker with caid 1722
Welcome to CCcam 2.1.1 server

card reader /dev/smargo1
handled 2(2) ecms and 7(7) emms
Caid 1722 Betacrypt ACS 900 TEL
Cardserial 9002012346 (112233)

Beispiel WB smartmouse USB und CCcam

(getestet zusammen mit 1 smargo und 1 WB Smartmouse)

Da dieser keine Serial beutzt , wird hier zum Beispiel die Vendor Nummer genutzt. Hierbei darf dann aber auch nur ein Cardreader dieser Art vorhanden sein weil die Vendor ID s identisch sind. Bei mehreren Cardreadern der selben Art ohne Serial funktioniert das nicht .

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=104f ProdID=0002 Rev= 4.00
S:  Manufacturer=WB Electronics ApS
S:  Product=Smartmouse USB
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="12345678", SYMLINK+="smargo1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="104f", SYMLINK+="smartmouse1"
SERIAL READER : /dev/smartmouse1
Welcome to CCcam 2.1.1 server

card reader /dev/smartmouse1
handled 47(47) ecms and 7(7) emms
Caid 1722 Betacrypt ACS 900 TEL
Cardserial 9002012346 (112233)mms

Easymouse2

T:  Bus=01 Lev=02 Prnt=03 Port=01 Cnt=01 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 6.00
S:  Manufacturer=FTDI
S:  Product=FT232R USB UART
S:  SerialNumber=A80090pq
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

T:  Bus=01 Lev=02 Prnt=03 Port=02 Cnt=02 Dev#=  5 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 6.00
S:  Manufacturer=FTDI
S:  Product=FT232R USB UART
S:  SerialNumber=A80090ry
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
Bus 001 Device 005: ID 0403:6001
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0403
  idProduct          0x6001
  bcdDevice            6.00
  iManufacturer           1 FTDI
  iProduct                2 FT232R USB UART
  iSerial                 3 A80090ry
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255
      bInterfaceSubClass    255
      bInterfaceProtocol    255
      iInterface              2 FT232R USB UART
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 001: ID 1d6b:0002
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9
  bDeviceSubClass         0
  bDeviceProtocol         1
  bMaxPacketSize0        64
  idVendor           0x1d6b
  idProduct          0x0002
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.32.41 musb-hcd
  iProduct                2 MUSB HDRC host driver
  iSerial                 1 musb_hdrc
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0011
    Per-port power switching
    No overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood        5 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
Device Status:     0x0001
  Self Powered

Bus 001 Device 004: ID 0403:6001
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0403
  idProduct          0x6001
  bcdDevice            6.00
  iManufacturer           1 FTDI
  iProduct                2 FT232R USB UART
  iSerial                 3 A80090pq
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255
      bInterfaceSubClass    255
      bInterfaceProtocol    255
      iInterface              2 FT232R USB UART
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="A80090pq", SYMLINK+="easy1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="A80090ry", SYMLINK+="easy2"
root@fritzbox_7270:/var/mod/root# ls -la /dev |grep ttyUSB
lrwxrwxrwx    1 root     root             7 Feb  1 02:13 easy2 -> ttyUSB1
lrwxrwxrwx    1 root     root             7 Feb  1 02:13 easy1-> ttyUSB0

Argolis Triple

Leider funktioniert die Methode nicht mit Serial Dazu nehmen wir die "Interfacenumber"

listusb -v
Bus 001 Device 002: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0x6011 FT4232H Quad HS USB-UART/FIFO IC
  bcdDevice            5.00
  iManufacturer           1 Argolis
  iProduct                2 Triple Reader+
  iSerial                 3 00000044
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength        19968
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              150mA
    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 Triple Reader+
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x4000  1x 0 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x4000  1x 0 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 Triple Reader+
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x4000  1x 0 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x4000  1x 0 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 Triple Reader+
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x4000  1x 0 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x4000  1x 0 bytes
        bInterval               0
Device Status:     0x4c00
  (Bus Powered)


folgendes einfach im freetz-WebIF in der udev_final eintragen, dann sollten alle drei Ports erkannt und eingebunden werden.

SUBSYSTEMS=="usb",KERNEL=="ttyUSB*", ATTRS{interface}=="Triple Reader+",ATTRS{bInterfaceNumber}=="00", SYMLINK+="triple1"
SUBSYSTEMS=="usb",KERNEL=="ttyUSB*", ATTRS{interface}=="Triple Reader+",ATTRS{bInterfaceNumber}=="01", SYMLINK+="triple2"
SUBSYSTEMS=="usb",KERNEL=="ttyUSB*", ATTRS{interface}=="Triple Reader+",ATTRS{bInterfaceNumber}=="02", SYMLINK+="triple3"


nach einem Reboot sollte die Eingabe von "ls -la /dev |grep ttyUSB" folgendes Ergebniss liefern:


root@fritzbox_7270:/var/mod/root# ls -la /dev |grep ttyUSB
lrwxrwxrwx    1 root     root             7 Mar  8 18:03 triple1 -> ttyUSB0
lrwxrwxrwx    1 root     root             7 Mar  8 18:03 triple2 -> ttyUSB1
lrwxrwxrwx    1 root     root             7 Mar  8 18:03 triple3 -> ttyUSB2


eingetragen in der CCcam.cfg könnte es dann z.B so aussehen:

SERIAL READER : /dev/triple3 smartreader+
card reader /dev/triple3
handled 728(614) ecms and 0(0) emms 
Caid 1702 Betacrypt ACS 900 GER[/CODE]

2.Version

lsusb -d 403:6011 -v | grep iSerial
Serial number: 00000001
Readername: triplereader_
SUBSYSTEMS=="usb" ENV{ID_IFACE}="$attr{bInterfaceNumber}"
KERNEL=="ttyUSB*", ATTRS{serial}=="00000001" SYMLINK+="triplereader$env{ID_IFACE}" 
P1 = /dev/triplereader00
P2 = /dev/triplereader01
P3 = /dev/triplereader02

Quadmouse

listusb -v
Bus 001 Device 005: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Device Descriptor:
bLength                18
bDescriptorType         1
bcdUSB               2.00
bDeviceClass            0 (Defined at Interface level)
bDeviceSubClass         0
bDeviceProtocol         0
bMaxPacketSize0        64
idVendor           0x0403 Future Technology Devices International, Ltd
idProduct          0x6011 FT4232H Quad HS USB-UART/FIFO IC
bcdDevice            8.00
iManufacturer           1 FTDI
iProduct                2 <span style="color:#006400">Quad RS232-HS</span>
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          101
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    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 <span style="color:#006400">Quad RS232-HS</span>
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 <span style="color:#006400">Quad RS232-HS</span>
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 <span style="color:#006400">Quad RS232-HS</span>
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 <span style="color:#006400">Quad RS232-HS</span>
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x08  EP 8 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

folgendes einfach im freetz-WebIF in der udev_final eintragen, dann sollten alle drei Ports erkannt und eingebunden werden.

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{interface}=="Quad RS232-HS", ATTRS{bInterfaceNumber}=="00", SYMLINK+="quad1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{interface}=="Quad RS232-HS", ATTRS{bInterfaceNumber}=="01", SYMLINK+="quad2"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{interface}=="Quad RS232-HS", ATTRS{bInterfaceNumber}=="02", SYMLINK+="quad3"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{interface}=="Quad RS232-HS", ATTRS{bInterfaceNumber}=="03", SYMLINK+="quad4"

nach einem Reboot sollte die Eingabe von "ls -la /dev |grep ttyUSB" folgendes Ergebniss liefern:

root@fritzbox_7270:/var/mod/root# ls -la /dev |grep ttyUSB
lrwxrwxrwx    1 root     root             7 May  4 10:06 quad1 -> ttyUSB0
lrwxrwxrwx    1 root     root             7 May  4 10:06 quad2 -> ttyUSB1
lrwxrwxrwx    1 root     root             7 May  4 10:06 quad3 -> ttyUSB2
lrwxrwxrwx    1 root     root             7 May  4 10:06 quad4 -> ttyUSB3

2x Quadmouse

Da die Quadmouse keine serial hat , muss für udev die usb id genommen werden

dmesg | grep -i usb
12.727429] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected
12.728733] usb 1-4: Detected FT4232H
12.728749] usb 1-4: Number of endpoints 2
12.728758] usb 1-4: Endpoint 1 MaxPacketSize 512
12.728767] usb 1-4: Endpoint 2 MaxPacketSize 512
12.728775] usb 1-4: Setting MaxPacketSize 512
12.753645] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0
12.772763] ftdi_sio 1-4:1.1: FTDI USB Serial Device converter detected
12.774629] usb 1-4: Detected FT4232H
12.774645] usb 1-4: Number of endpoints 2
12.774654] usb 1-4: Endpoint 1 MaxPacketSize 512
12.774790] usb 1-4: Endpoint 2 MaxPacketSize 512
12.774798] usb 1-4: Setting MaxPacketSize 512
12.790216] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB1
12.798047] ftdi_sio 1-4:1.2: FTDI USB Serial Device converter detected
12.799833] usb 1-4: Detected FT4232H
12.799847] usb 1-4: Number of endpoints 2
12.799857] usb 1-4: Endpoint 1 MaxPacketSize 512
12.799864] usb 1-4: Endpoint 2 MaxPacketSize 512
12.799872] usb 1-4: Setting MaxPacketSize 512
12.808284] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB2
12.831059] ftdi_sio 1-4:1.3: FTDI USB Serial Device converter detected
12.831502] usb 1-4: Detected FT4232H
12.831513] usb 1-4: Number of endpoints 2
12.831522] usb 1-4: Endpoint 1 MaxPacketSize 512
12.831530] usb 1-4: Endpoint 2 MaxPacketSize 512
12.831537] usb 1-4: Setting MaxPacketSize 512
12.837281] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB3
12.837394] usbcore: registered new interface driver ftdi_sio
12.837405] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
17.844227] usb 1-3: new high speed USB device using ehci_hcd and address 4
17.977444] usb 1-3: New USB device found, idVendor=0403, idProduct=6011
17.977461] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
17.977472] usb 1-3: Product: Quad RS232-HS
17.977480] usb 1-3: Manufacturer: FTDI
17.980081] usb 1-3: configuration #1 chosen from 1 choice
17.981518] ftdi_sio 1-3:1.0: FTDI USB Serial Device converter detected
17.981759] usb 1-3: Detected FT4232H
17.981767] usb 1-3: Number of endpoints 2
17.981775] usb 1-3: Endpoint 1 MaxPacketSize 512
17.981783] usb 1-3: Endpoint 2 MaxPacketSize 512
17.981791] usb 1-3: Setting MaxPacketSize 512
17.984480] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB4
17.985194] ftdi_sio 1-3:1.1: FTDI USB Serial Device converter detected
17.985386] usb 1-3: Detected FT4232H
17.985396] usb 1-3: Number of endpoints 2
17.985404] usb 1-3: Endpoint 1 MaxPacketSize 512
17.985411] usb 1-3: Endpoint 2 MaxPacketSize 512
17.985418] usb 1-3: Setting MaxPacketSize 512
17.988802] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB5
17.989414] ftdi_sio 1-3:1.2: FTDI USB Serial Device converter detected
17.989602] usb 1-3: Detected FT4232H
17.989612] usb 1-3: Number of endpoints 2
17.989620] usb 1-3: Endpoint 1 MaxPacketSize 512
17.989627] usb 1-3: Endpoint 2 MaxPacketSize 512
17.989634] usb 1-3: Setting MaxPacketSize 512
17.990083] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB6
17.990887] ftdi_sio 1-3:1.3: FTDI USB Serial Device converter detected
17.991075] usb 1-3: Detected FT4232H
17.991084] usb 1-3: Number of endpoints 2
17.991092] usb 1-3: Endpoint 1 MaxPacketSize 512
17.991100] usb 1-3: Endpoint 2 MaxPacketSize 512
17.991107] usb 1-3: Setting MaxPacketSize 512
17.992386] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB7

ergibt folgende udev Regel

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-4:1.0",  ATTRS{bInterfaceNumber}=="00", SYMLINK+="quad-1-1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-4:1.1",  ATTRS{bInterfaceNumber}=="01", SYMLINK+="quad-1-2"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-4:1.2",  ATTRS{bInterfaceNumber}=="02", SYMLINK+="quad-1-3"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-4:1.3",  ATTRS{bInterfaceNumber}=="03", SYMLINK+="quad-1-4"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-3:1.0",  ATTRS{bInterfaceNumber}=="00", SYMLINK+="quad-2-1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-3:1.1",  ATTRS{bInterfaceNumber}=="01", SYMLINK+="quad-2-2"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-3:1.2",  ATTRS{bInterfaceNumber}=="02", SYMLINK+="quad-2-3"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ID=="1-3:1.3",  ATTRS{bInterfaceNumber}=="03", SYMLINK+="quad-2-4"