Oscam on ffp-0.7arm

Marvell Kirkwood based
User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: HOWTO: Install/upgrade Tvheadend on FFP0.7-arm

Post by MrDini » Mon Jan 16, 2017 5:40 am

Will try to compile the ccid package too.
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Oscam on ffp-0.7arm

Post by barmalej2 » Mon Jan 16, 2017 7:16 am

Yep, ccid provides Alcor AU9540 smartreader drivers, but it is in unsupported device list due to bug in firmware:
http://pcsclite.alioth.debian.org/ccid/ ... 058F0x9540
Vendor and product ID's are identical to supported AU9560:
https://pcsclite.alioth.debian.org/ccid ... AU9560.txt

Ikolo
Posts: 37
Joined: Thu Sep 29, 2016 9:16 pm

Re: Oscam on ffp-0.7arm

Post by Ikolo » Mon Jan 16, 2017 11:11 am

@MrDini

Thanks in advance!

@barmalej2

So are the udev rules ok?

Do I need just ccid?

Ikolo

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Oscam on ffp-0.7arm

Post by barmalej2 » Mon Jan 16, 2017 11:41 am

pcsc-lite and ccid are interrelated. ccid provides drivers and udev rule to set USB power management for device to auto. pcsc-lite provides server and hotplug udev rule. Imo, 99-pcscd-hotplug.rules should be like this (while testing pcscd as root user):
# We add this here so that it runs after ccid's and ifd-gempc's rules;
# if we just added a pcscd-owned device, we hotplug the pcscd service.
ACTION=="add", ATTR{idVendor}=="058F", ATTR{idProduct}=="9540", RUN+="/ffp/bin/pcscd --hotplug"
pcscd daemon should be already running, before rule is applied by (e)udev. Check pcscd path:

Code: Select all

which pcscd
If it is installed in /ffp/sbin , then change the path in rule accordingly.
Maybe ENV{PCSCD}=="1" will work also, instead of ATTR{idVendor}=="058F", ATTR{idProduct}=="9540". Test it as well.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Oscam on ffp-0.7arm

Post by MrDini » Mon Jan 16, 2017 4:46 pm

Hi,

Sorry for the delay! I just came home (after work). :D

I uploaded a ccid package to the repo. Install command:

Code: Select all

slacker -UuiA mrdini:ccid
I included an udev rule, which Can be found at the ccid source folder's src directory. I just corrected the pathes, So it is almost untouched. You have to modify it by following barmalej2's post. (See this rule at the /ffp/etc/udev/rules.d/ folder.)

I hope, it will works! :)

@barmalej2

Yep, the original path (the source offers) of the binary is PREFIX/sbin, but I changed it to bin. So the pscsd is available at /ffp/bin/pcscd.

BTW, the udev "console" cannot use the FFp PATH? (Like the crontab)
Last edited by MrDini on Mon Jan 16, 2017 6:04 pm, edited 1 time in total.
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Oscam on ffp-0.7arm

Post by barmalej2 » Mon Jan 16, 2017 5:13 pm

MrDini wrote:BTW, the udev "console" cannot use the FFp PATH? (Like the crontab)
If asking about, why I specified full path in udev rule, when the answer-absolute path of the program is requirement, when running external programs upon certain events with udev rules.
Besides pcscd is not system tool and should reside in user side bin dir-/ffp/bin.

Ikolo
Posts: 37
Joined: Thu Sep 29, 2016 9:16 pm

Re: Oscam on ffp-0.7arm

Post by Ikolo » Mon Jan 16, 2017 6:21 pm

Hi!

Thanks a lot!

I had to copy 92_pcscd_ccid.rules to /ffp/lib/udev/rules.d to nas see it.

"Nothing" happened...

http://pastebin.com/PPSBaYG5

Ikolo

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Oscam on ffp-0.7arm

Post by MrDini » Mon Jan 16, 2017 6:28 pm

I had to copy 92_pcscd_ccid.rules to /ffp/lib/udev/rules.d to nas see it.
Don't do that. The /ffp/etc/udev/rules.d is for user side rules.

2. From my view, everything looks okay at the output. I think, You Can ignore the first not maching message. It comes from another rule.

Now, try to run

Code: Select all

pcscd -f -d
, and see its output. If it Can connect to the card reader, the NAS is ready for the oscam.
Thanks nas-central the lot of help! :)

Ikolo
Posts: 37
Joined: Thu Sep 29, 2016 9:16 pm

Re: Oscam on ffp-0.7arm

Post by Ikolo » Mon Jan 16, 2017 6:40 pm

Ok, ok...

Meanwhile I run pcscd --foreground --debug and your advice (pcscd -f -d).

The result:

pcscd -f -d
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug
00000769 configfile.l:282:DBGetReaderListDir() Parsing conf directory: /ffp/etc/reader.conf.d
00000119 configfile.l:358:DBGetReaderList() Parsing conf file: /ffp/etc/reader.conf.d/libccidtwin
00000275 configfile.l:319:DBGetReaderListDir() Skipping non regular file: ..
00000060 configfile.l:319:DBGetReaderListDir() Skipping non regular file: .
00000071 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready.
00015186 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000543 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000515 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/002
00000530 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1A40, PID: 0x0101, path: /dev/bus/usb/001/003
00000541 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1A40, PID: 0x0101, path: /dev/bus/usb/001/004
00000556 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1908, PID: 0x2311, path: /dev/bus/usb/001/005
00000641 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1908, PID: 0x2311, path: /dev/bus/usb/001/005
00000550 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1A40, PID: 0x0101, path: /dev/bus/usb/001/004
00000528 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1A40, PID: 0x0101, path: /dev/bus/usb/001/003
00000505 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/002
00000525 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x058F, PID: 0x9540, path: /dev/bus/usb/001/006
00000077 hotplug_libudev.c:433:HPAddDevice() Adding USB device: Alcor Micro AU9560
00000271 readerfactory.c:1079:RFInitializeReader() Attempting startup of Alcor Micro AU9560 00 00 using /ffp/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000468 dyn_unix.c:58:DYN_LoadLibrary() /ffp/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so: File not found
00000061 readerfactory.c:1086:RFInitializeReader() RFLoadReader failed: 0x80100014
00000047 readerfactory.c:375:RFAddReader() Alcor Micro AU9560 init failed.
00000050 hotplug_libudev.c:520:HPAddDevice() Failed adding USB device: Alcor Micro AU9560
00000626 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/002
^C06702012 pcscdaemon.c:192:signal_thread() Received signal: 2
00000058 pcscdaemon.c:225:signal_thread() Preparing for suicide
00011110 hotplug_libudev.c:710:HPStopHotPluggables() Hotplug stopped
01008666 readerfactory.c:1363:RFCleanupReaders() entering cleaning function
00000109 winscard_svc.c:152:ContextsDeinitialize() remaining threads: 0
00000053 pcscdaemon.c:781:at_exit() cleaning /ffp/var/run/pcscd

Now, I use the pcsc-lite-1.8.20-arm-2.txz.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Oscam on ffp-0.7arm

Post by MrDini » Mon Jan 16, 2017 6:49 pm

Interesting. Which NAS have You got?
Thanks nas-central the lot of help! :)

Ikolo
Posts: 37
Joined: Thu Sep 29, 2016 9:16 pm

Re: Oscam on ffp-0.7arm

Post by Ikolo » Mon Jan 16, 2017 7:07 pm

NSA310S. Libccid.so is in the directory.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Oscam on ffp-0.7arm

Post by MrDini » Mon Jan 16, 2017 7:17 pm

OK. Can You please run

Code: Select all

ldd /ffp/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
?
Thanks nas-central the lot of help! :)

Ikolo
Posts: 37
Joined: Thu Sep 29, 2016 9:16 pm

Re: Oscam on ffp-0.7arm

Post by Ikolo » Mon Jan 16, 2017 7:27 pm

ldd /ffp/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
ldd: can't open cache '/ffp/etc/ld.so.cache'
checking sub-depends for 'not found'
checking sub-depends for '/ffp/lib/libusb-1.0.so.0'
checking sub-depends for '/ffp/lib/libpthread.so.0'
ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)
libdl.so.0 => /ffp/lib/libdl.so.0 (0x4001d000)
libc.so.0 => /ffp/lib/libc.so.0 (0x40028000)
checking sub-depends for '/ffp/lib/libc.so.0'
ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)
checking sub-depends for '/ffp/lib/librt.so.0'
libc.so.0 => /ffp/lib/libc.so.0 (0x4000d000)
libdl.so.0 => /ffp/lib/libdl.so.0 (0x40078000)
libpthread.so.0 => /ffp/lib/libpthread.so.0 (0x40083000)
ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)
libfl.so.2 => not found (0x00000000)
libusb-1.0.so.0 => /ffp/lib/libusb-1.0.so.0 (0x00000000)
libpthread.so.0 => /ffp/lib/libpthread.so.0 (0x00000000)
libc.so.0 => /ffp/lib/libc.so.0 (0x00000000)
librt.so.0 => /ffp/lib/librt.so.0 (0x00000000)
/ffp/lib/ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x00000000)

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Oscam on ffp-0.7arm

Post by barmalej2 » Mon Jan 16, 2017 8:12 pm

Red colour line will show you the right path :idea: Meanwhile I would advise to run once:

Code: Select all

ldconfig

Ikolo
Posts: 37
Joined: Thu Sep 29, 2016 9:16 pm

Re: Oscam on ffp-0.7arm

Post by Ikolo » Mon Jan 16, 2017 8:32 pm

root@NSA310S:~# ldconfig
ldconfig: can't read header from /ffp/lib/libmenu.so, skipping
ldconfig: can't read header from /ffp/lib/libpanel.so, skipping
ldconfig: can't read header from /ffp/lib/libcurses.so, skipping
ldconfig: can't read header from /ffp/lib/libform.so, skipping
ldconfig: can't read header from /ffp/lib/libncurses.so, skipping
ldconfig: /ffp/lib/libstdc++.so.6.0.14-gdb.py is not a shared library, skipping
ldconfig: can't read header from /ffp/lib/libcursesw.so, skipping
ldconfig: skipping /ffp/usr/lib: No such file or directory

Post Reply