lxc - us card reader - oscam

gusto

Well-Known Member
Feb 10, 2018
78
0
46
24
Hi all

First, sorry for my english is very poor :(

Proxmox Virtual Environment 5.1-41
lxc from template (debian9 and ubuntu 16.04 (tested both)
I have a double card reader
Code:
dmesg
[ 187.943483] ftdi_sio 4-2:1.0: FTDI USB Serial Device converter detected
[ 187.943522] usb 4-2: Detected FT2232C
[ 187.946205] usb 4-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 187.946226] ftdi_sio 4-2:1.1: FTDI USB Serial Device converter detected
[ 187.946255] usb 4-2: Detected FT2232C
[ 187.948226] usb 4-2: FTDI USB Serial Device converter now attached to ttyUSB1

I need to run double card reader in lxc
btw The double card reader working in VM debian 9.
Code:
2018/02/10 14:39:30 00000000 s (main) System name = Linux
2018/02/10 14:39:30 00000000 s (main) Host name = oscam
2018/02/10 14:39:30 00000000 s (main) Release = 4.9.0-4-amd64
2018/02/10 14:39:30 00000000 s (main) Version = #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23)
2018/02/10 14:39:30 00000000 s (main) Machine = x86_64
2018/02/10 14:39:30 00000000 s (main) creating pidfile /tmp/.oscam/oscam.pid with pid 685
2018/02/10 14:39:30 00000000 s couldn't open statistics file: /usr/oscam/log/oscamuser.log
2018/02/10 14:39:30 00000000 s (config) userdb reloaded: 1 accounts loaded, 0 expired, 0 disabled
2018/02/10 14:39:30 00000000 s (main) signal handling initialized
2018/02/10 14:39:30 00000000 s (net) monitor: initialized (fd=4, port=989)
2018/02/10 14:39:30 00000000 s (net) cs357x: initialized (fd=5, port=21012)
2018/02/10 14:39:30 00000000 s (net) cs378x: initialized (fd=6, port=21012)
2018/02/10 14:39:30 00000000 s (net) newcamd: initialized (fd=7, port=10011)
2018/02/10 14:39:30 00000000 s (net) -> CAID: 0D96 PROVID: 000004
2018/02/10 14:39:30 00000000 s (net) newcamd: initialized (fd=8, port=10012)
2018/02/10 14:39:30 00000000 s (net) -> CAID: 0668 PROVID: 000004
2018/02/10 14:39:30 00000000 s (net) cccam: initialized (fd=9, port=12012)
2018/02/10 14:39:31 00000000 s (reader) skylink_ice0 [mouse] creating thread for device /dev/ttyUSB0
2018/02/10 14:39:31 00000000 s (reader) skylink_ice1 [mouse] creating thread for device /dev/ttyUSB1
2018/02/10 14:39:31 00000000 s (stat) loadbalancer: could not open /tmp/.oscam/stat for reading (errno=2 No such file or directory)
2018/02/10 14:39:31 00000000 s (anticasc) anti cascading disabled
2018/02/10 14:39:31 4BB41DC3 h (webif) webif: decompressed 177598 bytes back into 437688 bytes
2018/02/10 14:39:31 4BB41DC3 h (webif) HTTP Server running. ip=0.0.0.0 port=8888
2018/02/10 14:39:31 45E064B9 r (reader) skylink_ice0 [mouse] Buffers readed 0 bytes total time_us 75101
2018/02/10 14:39:31 0EAFFA6F r (reader) skylink_ice1 [mouse] Buffers readed 0 bytes total time_us 75102
........
2018/02/10 14:39:31 0EAFFA6F r (reader) skylink_ice1 [mouse] Flush readed byte Nr 13 value 00 time_us 3
2018/02/10 14:39:31 45E064B9 r (reader) skylink_ice0 [mouse] Buffers readed 13 bytes total time_us 125705
2018/02/10 14:39:31 45E064B9 r (reader) skylink_ice0 [mouse] Reader initialized (device=/dev/ttyUSB0, detect=none, mhz=357, cardmhz=357)
2018/02/10 14:39:31 0EAFFA6F r (reader) skylink_ice1 [mouse] Buffers readed 13 bytes total time_us 127724
2018/02/10 14:39:31 0EAFFA6F r (reader) skylink_ice1 [mouse] Reader initialized (device=/dev/ttyUSB1, detect=none, mhz=357, cardmhz=357)
2018/02/10 14:39:32 0EAFFA6F r (reader) skylink_ice1 [mouse] card detected
2018/02/10 14:39:32 45E064B9 r (reader) skylink_ice0 [mouse] card detected
2018/02/10 14:39:32 0EAFFA6F r (reader) skylink_ice1 [mouse] Buffers readed 0 bytes total time_us 75118
2018/02/10 14:39:32 45E064B9 r (reader) skylink_ice0 [mouse] Buffers readed 0 bytes total time_us 75116
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] ATR: 3B 78 12 00 00 54 C4 03 00 8F F1 90 00
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] ATR: 3B 78 12 00 00 54 C4 03 00 8F F1 90 00
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] Buffers readed 0 bytes total time_us 75102
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] Buffers readed 0 bytes total time_us 75105
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] Init card protocol T0, FI=1, F=372, D=2, N=0
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] Setting baudrate to 19200 bps
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] Init card protocol T0, FI=1, F=372, D=2, N=0
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] Setting baudrate to 19200 bps
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] Calculated work ETU is 52.10 us reader mhz = 357
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] Calculated work ETU is 52.10 us reader mhz = 357
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] Buffers readed 0 bytes total time_us 75098
2018/02/10 14:39:33 45E064B9 r (reader) skylink_ice0 [mouse] ATR Fsmax is 5 MHz, clocking card to wanted user cardclock of 3.57 MHz (specified in reader->mhz)
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] Buffers readed 0 bytes total time_us 75100
2018/02/10 14:39:33 0EAFFA6F r (reader) skylink_ice1 [mouse] ATR Fsmax is 5 MHz, clocking card to wanted user cardclock of 3.57 MHz (specified in reader->mhz)
2018/02/10 14:39:34 45E064B9 r (reader) skylink_ice0 [mouse] card detected
2018/02/10 14:39:34 45E064B9 r (reader) skylink_ice0 [mouse] type: CryptoWorks
2018/02/10 14:39:34 0EAFFA6F r (reader) skylink_ice1 [mouse] card detected
2018/02/10 14:39:34 0EAFFA6F r (reader) skylink_ice1 [mouse] type: CryptoWorks
2018/02/10 14:39:34 45E064B9 r (reader) skylink_ice0 [mouse] type: CryptoWorks, caid: 0D96, ascii serial: #########, hex serial: ##########
2018/02/10 14:39:34 0EAFFA6F r (reader) skylink_ice1 [mouse] type: CryptoWorks, caid: 0D96, ascii serial: #########, hex serial: ##########
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [mouse] issuer: CryptoWorks, id: 04, bios: v3, pin: unknown, mfid: 3F00
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [mouse] providers: 4 (04,08,0C,10)
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [mouse] found card system cryptoworks
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [cryptoworks] THIS WAS A SUCCESSFUL START ATTEMPT No 1 out of max alloted of 1
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [mouse] issuer: CryptoWorks, id: 04, bios: v3, pin: unknown, mfid: 3F00
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [mouse] providers: 4 (04,08,0C,10)
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [mouse] disable pincode to card
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [mouse] found card system cryptoworks
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] THIS WAS A SUCCESSFUL START ATTEMPT No 1 out of max alloted of 1
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [cryptoworks] provider: 1, id: 04, name: Operator: FFFF
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] provider: 1, id: 04, name: Operator: FFFF
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 7FFE, date: 2017/09/27 - 2017/10/27, name: Product 7FFE
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 1772, date: 2017/09/27 - 2017/10/27, name: Product 1772
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [cryptoworks] provider: 2, id: 08, name: Operator: FFFF
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: FFB0, date: 2017/09/27 - 2017/10/27, name: Product FFB0
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: FFE0, date: 2017/09/27 - 2017/10/27, name: Product FFE0
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 03E9, date: 2017/09/27 - 2017/10/27, name: Product 03E9
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 03EA, date: 2017/09/27 - 2017/10/27, name: Product 03EA
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 03EB, date: 2017/09/27 - 2017/10/27, name: Product 03EB
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 03EC, date: 2017/09/27 - 2017/10/27, name: Product 03EC
2018/02/10 14:39:35 45E064B9 r (reader) skylink_ice0 [cryptoworks] provider: 3, id: 0C, name: Operator: FFFF
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 03ED, date: 2017/09/27 - 2017/10/27, name: Product 03ED
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 07D1, date: 2017/09/27 - 2017/10/27, name: Product 07D1
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 07D2, date: 2017/09/27 - 2017/10/27, name: Product 07D2
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 07D3, date: 2017/09/27 - 2017/10/27, name: Product 07D3
2018/02/10 14:39:35 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 07D4, date: 2017/09/27 - 2017/10/27, name: Product 07D4
2018/02/10 14:39:36 45E064B9 r (reader) skylink_ice0 [cryptoworks] provider: 4, id: 10, name: Operator: FFFF
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 07DB, date: 2017/09/27 - 2017/10/27, name: Product 07DB
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 0BBA, date: 2017/09/27 - 2017/10/27, name: Product 0BBA
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 0BBC, date: 2017/09/27 - 2017/10/27, name: Product 0BBC
2018/02/10 14:39:36 45E064B9 r (reader) skylink_ice0 [cryptoworks] ready for requests
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 7FFC, date: 2017/09/27 - 2017/10/27, name: Product 7FFC
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: FFD8, date: 2017/09/27 - 2017/10/27, name: Product FFD8
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 0000, date: 1999/12/31 - 2000/01/07, name: DownLoad00000000
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] provider: 2, id: 08, name: Operator: FFFF
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 0000, date: 1999/12/31 - 2000/01/07, name: DownLoad00000000
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] provider: 3, id: 0C, name: Operator: FFFF
2018/02/10 14:39:36 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 0000, date: 1999/12/31 - 2000/01/07, name: DownLoad00000000
2018/02/10 14:39:37 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] provider: 4, id: 10, name: Operator: FFFF
2018/02/10 14:39:37 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] chid: 0000, date: 1999/12/31 - 2000/01/07, name: DownLoad00000000
2018/02/10 14:39:37 0EAFFA6F r (reader) skylink_ice1 [cryptoworks] ready for requests
I've found a lot of manuals but it does not work
Code:
New users aren't allowed to post external links, for anti-spam measurement reasons.
etc...
I have done this
Code:
lsusb
Bus 004 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Code:
ls -l /dev/bus/usb/004/002
crw-rw-r-- 1 root root 189, 385 Feb 6 09:57 /dev/bus/usb/004/002
Code:
nano /etc/pve/nodes/proxmox/lxc/101.conf
lxc.cgroup.devices.allow: c 189:385 rwm
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file

I also tried
Code:
lxc-device add -n 101 /dev/ttyUSB1 /dev/ttyUSB1
lxc-device add -n 101 /dev/ttyUSB0 /dev/ttyUSB0
lxc ubuntu 16.04
In lxc, create /dev/ttyUSB0 and /dev/ttyUSB1

Oscam
oscam.server
Code:
[reader]
label                         = skylink_ice0
protocol                      = mouse
device                        = /dev/ttyUSB0
caid                          = 0D96
detect                        = none
ident                         = 0D96:000004
group                         = 1
audisabled                    = 1

[reader]
label                         = skylink_ice1
protocol                      = mouse
device                        = /dev/ttyUSB1
pincode                       = 1234
caid                          = 0D96
detect                        = none
ident                         = 0D96:000004
group                         = 2
audisabled                    = 1
log from oscam
Code:
2018/02/10 14:26:16 00000000 s     (main) System name    = Linux
2018/02/10 14:26:16 00000000 s     (main) Host name      = ubuntu
2018/02/10 14:26:16 00000000 s     (main) Release        = 4.13.13-2-pve
2018/02/10 14:26:16 00000000 s     (main) Version        = #1 SMP PVE 4.13.13-32 (Thu, 21 Dec 2017 09:02:14 +0100)
2018/02/10 14:26:16 00000000 s     (main) Machine        = x86_64
2018/02/10 14:26:16 00000000 s     (main) creating pidfile /tmp/.oscam/oscam.pid with pid 446
2018/02/10 14:26:16 00000000 s couldn't open statistics file: /usr/oscam/log/oscamuser.log
2018/02/10 14:26:16 00000000 s   (config) userdb reloaded: 1 accounts loaded, 0 expired, 0 disabled
2018/02/10 14:26:16 00000000 s     (main) signal handling initialized
2018/02/10 14:26:16 00000000 s      (net) monitor: initialized (fd=4, port=989)
2018/02/10 14:26:16 00000000 s      (net) cs357x: initialized (fd=5, port=21012)
2018/02/10 14:26:16 00000000 s      (net) cs378x: initialized (fd=6, port=21012)
2018/02/10 14:26:16 00000000 s      (net) newcamd: initialized (fd=7, port=10011)
2018/02/10 14:26:16 00000000 s      (net) -> CAID: 0D96 PROVID: 000004
2018/02/10 14:26:16 00000000 s      (net) newcamd: initialized (fd=8, port=10012)
2018/02/10 14:26:16 00000000 s      (net) -> CAID: 0668 PROVID: 000004
2018/02/10 14:26:16 00000000 s      (net) cccam: initialized (fd=9, port=12012)
2018/02/10 14:26:16 00000000 s   (reader) skylink_ice0 [mouse] creating thread for device /dev/ttyUSB0
2018/02/10 14:26:16 00000000 s   (reader) skylink_ice1 [mouse] creating thread for device /dev/ttyUSB1
2018/02/10 14:26:16 00000000 s     (stat) loadbalancer: could not open /tmp/.oscam/stat for reading (errno=2 No such file or directory)
2018/02/10 14:26:16 00000000 s (emmcache) loaded 0 emmcache records from /tmp/.oscam/oscam.emmcache in 0 ms
2018/02/10 14:26:16 00000000 s (emmcache) loaded 0 emmstat records from /tmp/.oscam/oscam.emmstat in 0 ms
2018/02/10 14:26:16 00000000 s (anticasc) anti cascading disabled
2018/02/10 14:26:16 6A5CE5C2 r   (reader) skylink_ice0 [mouse] ERROR: Opening device /dev/ttyUSB0 (errno=1 Operation not permitted)
2018/02/10 14:26:16 6A5CE5C2 r   (reader) skylink_ice0 [mouse] Cannot open device: /dev/ttyUSB0
2018/02/10 14:26:16 5A6FBE28 r   (reader) skylink_ice1 [mouse] ERROR: Opening device /dev/ttyUSB1 (errno=1 Operation not permitted)
2018/02/10 14:26:16 5A6FBE28 r   (reader) skylink_ice1 [mouse] Cannot open device: /dev/ttyUSB1
2018/02/10 14:26:16 2582C098 h    (webif) webif: decompressed 177598 bytes back into 437688 bytes
2018/02/10 14:26:16 2582C098 h    (webif) HTTP Server running. ip=0.0.0.0 port=8888
2018/02/10 14:26:18 6A5CE5C2 r   (reader) skylink_ice0 [mouse] ERROR: Opening device /dev/ttyUSB0 (errno=1 Operation not permitted)
2018/02/10 14:26:18 6A5CE5C2 r   (reader) skylink_ice0 [mouse] Cannot open device: /dev/ttyUSB0
2018/02/10 14:26:18 5A6FBE28 r   (reader) skylink_ice1 [mouse] ERROR: Opening device /dev/ttyUSB1 (errno=1 Operation not permitted)
2018/02/10 14:26:18 5A6FBE28 r   (reader) skylink_ice1 [mouse] Cannot open device: /dev/ttyUSB1
2018/02/10 14:26:20 6A5CE5C2 r   (reader) skylink_ice0 [mouse] ERROR: Opening device /dev/ttyUSB0 (errno=1 Operation not permitted)
2018/02/10 14:26:20 6A5CE5C2 r   (reader) skylink_ice0 [mouse] Cannot open device: /dev/ttyUSB0
2018/02/10 14:26:20 5A6FBE28 r   (reader) skylink_ice1 [mouse] ERROR: Opening device /dev/ttyUSB1 (errno=1 Operation not permitted)
I do not know how to set up it
 
What kind of card reader is this? It's presented as a serial device?

Please check if you can access the serial lines on the command line, please also check the permissions on the files in /dev and also check if the user that runs oscam software has access to the files
 
Thank you for your answer.
It is serial to usb concerter
Code:
h++p://ftdichip.com/Products/ICs/FT2232D.htm
I do everything as an root
I tried also
Code:
chmod 755 /dev/ttyUSB0
chmod 755 /dev/ttyUSB1
:(
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!