nx111 / oscam

My working oscam code,update with http://www.streamboard.tv/svn/oscam trunk.
GNU General Public License v3.0
50 stars 52 forks source link

天柏使用pcsc读卡器(scr3310)无法读卡(凤凰可以读卡) #46

Closed megaduo closed 3 years ago

megaduo commented 4 years ago

The oscam not works with DVN JET though protocol pcsc ,but it was successful read by phoenix reader(pl2303,protocol mouse). 2020/09/09 23:53:28 00000000 s (main) System name = Linux 2020/09/09 23:53:28 00000000 s (main) Host name = OpenWrt 2020/09/09 23:53:28 00000000 s (main) Release = 5.4.61 2020/09/09 23:53:28 00000000 s (main) Version = #0 SMP Fri Sep 4 01:39:46 2020 2020/09/09 23:53:28 00000000 s (main) Machine = mips 2020/09/09 23:53:28 00000000 s (main) creating pidfile /tmp/.oscam/oscam.pid with pid 1881 2020/09/09 23:53:29 00000000 s (emu) OSCam-Emu version 789 2020/09/09 23:53:29 00000000 s (config) userdb reloaded: 2 accounts loaded, 0 expired, 0 disabled 2020/09/09 23:53:29 00000000 s (main) signal handling initialized 2020/09/09 23:53:29 00000000 s (net) newcamd: initialized (fd=5, port=34000) 2020/09/09 23:53:29 00000000 s (net) -> CAID: 0000 PROVID: 000000 2020/09/09 23:53:29 00000000 s (net) cccam: initialized (fd=6, port=12100) 2020/09/09 23:53:29 00000000 s (reader) card [pcsc] creating thread for device 0 2020/09/09 23:53:29 00000000 s (reader) emulator [emu] creating thread for device emulator 2020/09/09 23:53:29 00000000 s (main) waiting for local card init 2020/09/09 23:53:29 1335EDB8 r (emu) Stream key delayer initialized 2020/09/09 23:53:29 1335EDB8 r (emu) Stream relay server initialized 2020/09/09 23:53:29 1335EDB8 r (reader) emulator [emu] Reader initialized (device=emulator, detect=cd, mhz=357, cardmhz=357) 2020/09/09 23:53:29 00000000 (emu) INFO: FFDecsa parallel mode = 64 2020/09/09 23:53:29 629AF94D h (webif) webif: decompressed 167487 bytes back into 407936 bytes 2020/09/09 23:53:29 629AF94D h (webif) HTTP Server running. ip=0.0.0.0 port=8888 2020/09/09 23:53:29 6B9C018C r (reader) card [pcsc] Reader initialized (device=0, detect=cd, mhz=357, cardmhz=357) 2020/09/09 23:53:30 1335EDB8 r (reader) emulator [emu] card detected 2020/09/09 23:53:30 6B9C018C r (reader) card [pcsc] Error getting card status. 2020/09/09 23:53:31 1335EDB8 r (reader) emulator [emu] found card system emu 2020/09/09 23:53:31 1335EDB8 r (reader) emulator [emu] THIS WAS A SUCCESSFUL START ATTEMPT No 1 out of max allotted of 1 2020/09/09 23:53:31 1335EDB8 r (emu) Key file not found in: /etc/oscam/config 2020/09/09 23:53:31 1335EDB8 r (emu) Cannot open key file path: /var/keys 2020/09/09 23:53:31 1335EDB8 r (emu) Total keys in memory: W:0 V:0 N:0 I:0 S:0 F:0 P:0 D:0 T:0 A:0 2020/09/09 23:53:31 6B9C018C r (reader) card [pcsc] Error getting card status. 2020/09/09 23:53:31 00000000 s (main) init for all local cards done 2020/09/09 23:53:31 00000000 s (emmcache) loaded 0 emmcache records from /tmp/.oscam/oscam.emmcache in 0 ms 2020/09/09 23:53:31 00000000 s (emmcache) loaded 0 emmstat records from /tmp/.oscam/oscam.emmstat in 0 ms 2020/09/09 23:53:31 26CD4B35 c (client) plain dvbapi-client granted (anonymous, au=off) 2020/09/09 23:53:31 26CD4B35 c (dvbapi) dvbapi channelcache loaded from /etc/oscam/config/oscam.ccache 2020/09/09 23:53:31 26CD4B35 c (dvbapi) Using /tmp/camd.socket listen socket, API forced to DVBAPIv3 (0), userconfig boxtype: 11 2020/09/09 23:53:32 6B9C018C r (reader) card [pcsc] Error getting card status.

xiaole51 commented 4 years ago

根本没有连接到读卡器. 这是驱动问题,先排除驱动问题. 至少用pcsc_list能读取到ATR

megaduo commented 4 years ago

根本没有连接到读卡器. 这是驱动问题,先排除驱动问题. 至少用pcsc_list能读取到ATR

你试过pcsc能读天柏吗,没试过不要自己脑补推测。我换别的卡都可以读(信用卡、医保卡),怀疑是天柏协议的问题,不是标准的iso7816。“因為天柏CA不完全匹配ISO7816,所以讀卡器的ATR應答要比T更長,否則會引起ATR錯誤"--引用自一篇介绍天柏CA的新闻。不知此问题在oscam应用层面能否解决,还是只能从驱动层面入手。

xiaole51 commented 4 years ago

根本没有连接到读卡器. 这是驱动问题,先排除驱动问题. 至少用pcsc_list能读取到ATR

你试过pcsc能读天柏吗,没试过不要自己脑补推测。我换别的卡都可以读(信用卡、医保卡),怀疑是天柏协议的问题,不是标准的iso7816。“因為天柏CA不完全匹配ISO7816,所以讀卡器的ATR應答要比T更長,否則會引起ATR錯誤"--引用自一篇介绍天柏CA的新闻。不知此问题在oscam应用层面能否解决,还是只能从驱动层面入手。

一张嘴就暴露了你的智商. 自己智商不够就脑补别人智商也跟你一样? 知道读卡先决条件是啥吗? 知道为啥要先关注ATR吗? 抄来几个名字就感觉很懂了? 先去我发的issue下学点东西吧. 在N大的项目下跟你扯皮感觉都掉价, 不用回复了!

megaduo commented 4 years ago

根本没有连接到读卡器. 这是驱动问题,先排除驱动问题. 至少用pcsc_list能读取到ATR

你试过pcsc能读天柏吗,没试过不要自己脑补推测。我换别的卡都可以读(信用卡、医保卡),怀疑是天柏协议的问题,不是标准的iso7816。“因為天柏CA不完全匹配ISO7816,所以讀卡器的ATR應答要比T更長,否則會引起ATR錯誤"--引用自一篇介绍天柏CA的新闻。不知此问题在oscam应用层面能否解决,还是只能从驱动层面入手。

一张嘴就暴露了你的智商. 自己智商不够就脑补别人智商也跟你一样? 知道读卡先决条件是啥吗? 知道为啥要先关注ATR吗? 抄来几个名字就感觉很懂了? 先去我发的issue下学点东西吧. 在N大的项目下跟你扯皮感觉都掉价, 不用回复了!

你哪只眼看到log有说显示没有连接到读卡器了?你能看懂log吗?还不用回复了?github是你家开的?stupid sucker!

megaduo commented 4 years ago

root@OpenWrt:/# pcscd -f -d 00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug 00000986 configfile.l:282:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d 00000144 configfile.l:319:DBGetReaderListDir() Skipping non regular file: . 00000065 configfile.l:319:DBGetReaderListDir() Skipping non regular file: .. 00000120 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready. 00018191 hotplug_libusb.c:536:HPAddHotPluggable() Adding USB device: 1:2:0 00000592 readerfactory.c:1079:RFInitializeReader() Attempting startup of SCM Microsystems Inc. SCR 3310 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so 00001250 readerfactory.c:954:RFBindFunctions() Loading IFD Handler 3.0 00127681 readerfactory.c:395:RFAddReader() Using the reader polling thread 00001262 hotplug_libusb.c:440:HPEstablishUSBNotifications() Driver ifd-ccid.bundle does not support IFD_GENERATE_HOTPLUG. Using active polling instead. 00000135 hotplug_libusb.c:449:HPEstablishUSBNotifications() Polling forced every 1 second(s) 00000561 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00013279 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00012004 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00011987 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00012002 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00011995 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00012001 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00012007 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00011989 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00012001 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00012017 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR 3310 00 00 00011714 eventhandler.c:301:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED 00000099 eventhandler.c:302:EHStatusHandlerThread() Error powering up card: -2146435050 0x80100016

nx111 commented 3 years ago

经检测代码,从2019年以来pcsc部分代码基本没有变动。所以检查与卡片相关的设置是否正确。