Cardreader unter freetz fest verlinken mit udev: Unterschied zwischen den Versionen

Aus Zebradem WIKI
Zur Navigation springenZur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 15: Zeile 15:


Als erstes Serial auslesen per telnet :
Als erstes Serial auslesen per telnet :
 
<pre>
cat /proc/bus/usb/devices
cat /proc/bus/usb/devices
 
</pre>
Ergebnis:
Ergebnis:
 
<pre style="height: 300px; overflow: scroll;">
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
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
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
Zeile 30: Zeile 30:
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 
</pre>


Die Serial tragen wir jetzt über das freetz WI unter Menue Punkt freetz udev_first ein
Die Serial tragen wir jetzt über das freetz WI unter Menue Punkt freetz udev_first ein
[ATTACH=CONFIG]9656[/ATTACH]
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="[COLOR="#00FFFF"]Reader Serial[/COLOR]", SYMLINK+="[COLOR="#FFFF00"]Symlink[/COLOR]
[COLOR="#00FFFF"]Hier wird die ausgelesene Serial eingetragen.[/COLOR] [COLOR="#FFFF00"]Hier wird der Symlink eingetragen.[/COLOR]
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="[COLOR="#00FFFF"]12345678[/COLOR]", SYMLINK+="[COLOR="#FFFF00"]smargo1[/COLOR]"


<pre>
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="Reader Serial", SYMLINK+="Symlink
</pre>
Hier wird die ausgelesene Serial eingetragen. Hier wird der Symlink eingetragen.
<pre>
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="12345678", SYMLINK+="smargo1"
</pre>
Fritzbox neu starten damit die änderungen übernommen werden , die rules sind dann fest gespeichert
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  
Anschliessend In der oscam.server als device den erstellten symlink eintragen  


[CODE]
<pre>
[reader]
[reader]
label                        = smargo1
label                        = smargo1
Zeile 61: Zeile 60:
group                        = 1
group                        = 1
emmcache                      = 1,3,2
emmcache                      = 1,3,2
[/CODE]
</pre>
 
<pre style="height: 300px; overflow: scroll;">
2012/01/13  8:38:59      C04 r reader thread started (thread=    C04, label=smargo1, device=[COLOR="#FFFF00"]/dev/smargo1[/COLOR], detect=cd, mhz=369, cardmhz=368)
2012/01/13  8:38:59      C04 r reader thread started (thread=    C04, label=smargo1, device=[COLOR="#FFFF00"]/dev/smargo1[/COLOR], detect=cd, mhz=369, cardmhz=368)
2012/01/13  8:39:02      C04 r smargo1 card detected
2012/01/13  8:39:02      C04 r smargo1 card detected
Zeile 80: Zeile 79:
2012/01/13  8:39:13      C04 r Prv.ID: 00 00 11 03  
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      C04 r [nagra-reader] ready for requests
2012/01/13  8:39:13      400 s init for all local cards done[/CODE]
2012/01/13  8:39:13      400 s init for all local cards done
[CODE]
</pre>
<pre>
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/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: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/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)  
2012/01/13 9:12:20 1005 c um02 (1838&001103/7D66/92:1CB5): found (336 ms) by smargo1 (of 0 avail 0)  
 
</pre>






Funktioniert natürlich auch mit z.B. mit CCcam
Funktioniert natürlich auch mit z.B. mit CCcam

Version vom 13. Januar 2012, 09:48 Uhr


Das Board mit Freiheiten




Das zuweisen von Cardreadern mit udev unter anderen System ist ja bekannt : [url=http://www.zebradem.com/wiki/index.php?title=USB-Reader_fest_verlinken]USB-Reader fest verlinken[/url] Das funktioniert jetzt auch unter freetz ab trunk 8383 [url=http://freetz.org/wiki/patches/custom_udev_rules]patches/custom_udev_rules[/url]

Getestet mit smargo FW 1.07 Sollte aber auch mit Easymouse ect funktionieren wo eine Serial vorhanden ist

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=[COLOR="#00FFFF"]12345678[/COLOR]
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_first 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}=="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                        = [COLOR="#FFFF00"]/dev/smargo1[/COLOR]
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=[COLOR="#FFFF00"]/dev/smargo1[/COLOR], 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) 


Funktioniert natürlich auch mit z.B. mit CCcam