frankmorgner / vsmartcard

umbrella project for emulation of smart card readers or smart cards
http://frankmorgner.github.io/vsmartcard/
684 stars 197 forks source link

Stuck at instalation process - help please (polish IDcard) #282

Closed ManiekGrob86 closed 1 week ago

ManiekGrob86 commented 1 week ago

Hi, I followed the instructions https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html. I would like to use my smartphone as a reader for my Polish ID. But I get the following message.

vicc -t relay Traceback (most recent call last): File "/usr/local/bin/vicc", line 116, in from virtualsmartcard.VirtualSmartcard import VirtualICC ModuleNotFoundError: No module named 'virtualsmartcard'

I will add that the reader must support proximity cards compliant with ISO 14443 1-4 Type A and ISO 14443 1-4 Type B, communicating via radio waves with a frequency of 13.56 MHz (MIFARE®/NFC). Another requirement for the E-ID reader is support for extended APDU and a number of protocols, including: Chip Authentication based on ECDH, PACEv2: ECDH and EAC2, ensuring encryption and security of transmitted data. Will you help me complete the installation process and set it up for Polish ID?

ManiekGrob86 commented 1 week ago

The enf of Log from sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee -i log.txt

00000028 [140364014413824] readerfactory.c:1093:RFInitializeReader() Attempting startup of Virtual PCD 00 00 using /usr/lib/pcsc/drivers/serial/libifdvpcd.so 00000123 [140364014413824] readerfactory.c:968:RFBindFunctions() Loading IFD Handler 3.0 00000013 [140364014413824] ifd-vpcd.c:126:IFDHCreateChannel() Waiting for virtual ICC on port 35963 00000051 [140364014413824] ifd-vpcd.c:340:IFDHGetCapabilities() unknown tag 4019 00000001 [140364014413824] readerfactory.c:393:RFAddReader() Using the pcscd polling thread 00000060 [140364014413824] readerfactory.c:524:RFAddReader() Driver is slot thread safe 00000001 [140364014413824] readerfactory.c:1093:RFInitializeReader() Attempting startup of Virtual PCD 00 01 using /usr/lib/pcsc/drivers/serial/libifdvpcd.so 00000001 [140364014413824] readerfactory.c:881:RFLoadReader() Reusing already loaded driver for /usr/lib/pcsc/drivers/serial/libifdvpcd.so 00000001 [140364014413824] readerfactory.c:968:RFBindFunctions() Loading IFD Handler 3.0 00000005 [140364014413824] ifd-vpcd.c:126:IFDHCreateChannel() Waiting for virtual ICC on port 35964 00000014 [140364014413824] ifd-vpcd.c:340:IFDHGetCapabilities() unknown tag 4019 00000000 [140364014413824] readerfactory.c:558:RFAddReader() Using the pcscd polling thread 00000030 [140364014413824] pcscdaemon.c:799:at_exit() cleaning /run/pcscd

frankmorgner commented 1 week ago

Relaying the card should work for any card that is available via PC/SC, i.e. also for your ID card.

 ModuleNotFoundError: No module named 'virtualsmartcard'

This means, that the python package could not be found. I assume that you did not install the package globally, which means that you need to adjust the environment variable PYTHONPATH to add your specific install directory of the module to python's search path

ManiekGrob86 commented 1 week ago

How can i do this please give me specific instruction

śr., 26 cze 2024, 16:09 użytkownik Frank Morgner @.***> napisał:

Relaying the card should work for any card that is available via PC/SC, i.e. also for your ID card.

ModuleNotFoundError: No module named 'virtualsmartcard'

This means, that the python package could not be found. I assume that you did not install the package globally, which means that you need to adjust the environment variable PYTHONPATH to add your specific install directory of the module to python's search path

— Reply to this email directly, view it on GitHub https://github.com/frankmorgner/vsmartcard/issues/282#issuecomment-2191809827, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJNDDG7MWXC3APXY3WQFF6LZJLDRDAVCNFSM6AAAAABJ5PRWOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJRHAYDSOBSG4 . You are receiving this because you authored the thread.Message ID: @.***>

frankmorgner commented 1 week ago

What's the output of your ./configure command?

ManiekGrob86 commented 1 week ago

ok i reinstall it. but now I have so problem

/usr/sbin/pcscd --version show me pcsc-lite version 1.9.9. Copyright (C) 1999-2002 by David Corcoran corcoran@musclecard.com. Copyright (C) 2001-2022 by Ludovic Rousseau ludovic.rousseau@free.fr. Copyright (C) 2003-2004 by Damien Sauveron sauveron@labri.fr. Report bugs to pcsclite-muscle@lists.infradead.org. Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd filter configdir=/etc/reader.conf.d MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16

command pcsc-relay --emulator vpcd shows Could not connect to PC/SC Service Service not available.

pcsc_scan PC/SC device scanner V 1.6.2 (c) 2001-2022, Ludovic Rousseau ludovic.rousseau@free.fr SCardEstablishContext: Service not available.

vicc -H 100.115.92.200 -P 35964 26.06.2024 22:24:43 [CRITICAL] Failed to open socket: [Errno 111] Connection refused 26.06.2024 22:24:43 [CRITICAL] Is pcscd running at 100.115.92.200? Is vpcd loaded? Is a firewall blocking port 35964?

and I'm stuck :(

frankmorgner commented 1 week ago

run sudo pcscd -fda to start the PC/SC service

ManiekGrob86 commented 1 week ago

its give me error log

[...] 00000002 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33022 in /etc/reader.conf.d/get-pip.py: & 00000002 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33022 in /etc/reader.conf.d/get-pip.py: bb 00000001 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33023 in /etc/reader.conf.d/get-pip.py: "" 00000002 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33025 in /etc/reader.conf.d/get-pip.py: if 00000002 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33025 in /etc/reader.conf.d/get-pip.py: == 00000002 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33025 in /etc/reader.conf.d/get-pip.py: : 00000001 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33026 in /etc/reader.conf.d/get-pip.py: ( 00000002 [140597508720640] configfile.l:272:tok_error() tok_error: invalid value line 33026 in /etc/reader.conf.d/get-pip.py: ) 00000037 [140597508720640] readerfactory.c:1093:RFInitializeReader() Attempting startup of Virtual PCD 00 00 using /usr/lib/pcsc/drivers/serial/libifdvpcd.so 00000151 [140597508720640] readerfactory.c:968:RFBindFunctions() Loading IFD Handler 3.0 00000035 [140597508720640] ifd-vpcd.c:126:IFDHCreateChannel() Waiting for virtual ICC on port 35963 00000091 [140597508720640] ifd-vpcd.c:340:IFDHGetCapabilities() unknown tag 4019 00000003 [140597508720640] readerfactory.c:393:RFAddReader() Using the pcscd polling thread 00000070 [140597508720640] readerfactory.c:524:RFAddReader() Driver is slot thread safe 00000003 [140597508720640] readerfactory.c:1093:RFInitializeReader() Attempting startup of Virtual PCD 00 01 using /usr/lib/pcsc/drivers/serial/libifdvpcd.so 00000002 [140597508720640] readerfactory.c:881:RFLoadReader() Reusing already loaded driver for /usr/lib/pcsc/drivers/serial/libifdvpcd.so 00000003 [140597508720640] readerfactory.c:968:RFBindFunctions() Loading IFD Handler 3.0 00000007 [140597508720640] ifd-vpcd.c:126:IFDHCreateChannel() Waiting for virtual ICC on port 35964 00000018 [140597508720640] ifd-vpcd.c:340:IFDHGetCapabilities() unknown tag 4019 00000002 [140597508720640] readerfactory.c:558:RFAddReader() Using the pcscd polling thread 00000038 [140597508720640] pcscdaemon.c:799:at_exit() cleaning /run/pcscd 00000017 [140597508720640] pcscdaemon.c:829:clean_temp_files() Cannot remove /run/pcscd/pcscd.comm: No such file or directory 00000007 [140597508720640] pcscdaemon.c:835:clean_temp_files() Cannot remove /run/pcscd/pcscd.pid: No such file or directory

ManiekGrob86 commented 1 week ago

ok done it. but now I type vicc and nothing happens. How to generate log of vicc?

frankmorgner commented 1 week ago

please read --help or the documentation